Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Official moOde 8 support thread
Did you create the playlists in 8.1.x ?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Here's an update of the fix in case there's anyone else annoyed by the 'Unknown AlbumArtist' bugfeature.
Simply transfer the attached patchmusiclib.sh file to your pi, log in  via SSH and enter the following:
Code:
chmod a+x patchmusiclib.sh
sudo ./patchmusiclib.sh
Then update the library and the misfiled entries will be back in their proper places.



(04-07-2022, 11:01 AM)charlesky Wrote:
(04-06-2022, 10:08 AM)charlesky Wrote: 'Performer' and 'Conductor' tags appear to be interfering with retrieval of 'Artist' or 'Album Artist' data.

I see there have been a few issues with music tags in the past and heartily agree with @TheOldPresbyope that this whole thing is a dumpster fire with no standards. But right now (release 8.0.2) it appears that any files that have a 'Performer' or 'Conductor' tag defined end up being dumped in the 'Unknown Artist'/'Unknown AlbumArtist' category in tag view. This occurs with all of the choices in the 'Tag view artist' field. 

My music is stored on a USB drive connected directly to the Pi. If I edit the file tags (using MP3tag 3.14 on a PC), solely remove the 'Performer' or 'Conductor' tag and update the library then the album turns up correctly listed under the relevant artist in tag view.

I should note that this is happening on AAC files (with the .m4a extension) that have been tagged using MP3Tag.

Ok, I found the place in the code that is causing this and fixed it. 

/var/www/inc/playerlib.php controls the way the library handles tags. If a file doesn't have the 'AlbumArtist' tag defined then it tries to construct this by building an array containing the contents of the 'Artist', 'Performer' and 'Conductor' tags (if they are present). This works fine. Unfortunately, it looks like a trap was built in at some point to catch cases in which a file has multiple 'Artist' tags defined - this is certainly undesirable, though not really fatal - and spit them out as 'Unknown AlbumArtist'. This gets tripped when it encounters the Artist/Performer/Conductor array that was accumulated earlier, which certainly looks like an unintended behaviour. 

The easiest way to fix this is simply to remove the trap. While multiple 'Artist' tags are a bad practice, music tags are such a wild west that it's not unknown, and probably not a good reason to disrupt the way the library is displayed. 

The problem occurs at line 577 in playerlib.php:
Code:
'album_artist' => ($flatData['AlbumArtist'] ? $flatData['AlbumArtist'] : (count($flatData['Artist']) == 1 ? $flatData['Artist'][0] : 'Unknown AlbumArtist')),
I changed this to:
Code:
'album_artist' => ($flatData['AlbumArtist'] ? $flatData['AlbumArtist'] : ($flatData['Artist'][0] ? $flatData['Artist'][0] : 'Unknown AlbumArtist')),
in a freshly-flashed copy of moode and rebuilt the library. Everything now works fine, with no aberrant 'Unknown AlbumArtist' categories. A file will now only get assigned to this if none of 'Album Artist', 'Artist', 'Performer' or 'Conductor' are defined. Since there are no real standards when it comes to music tagging this allows the tag view display to be more flexible to handle different approaches.

If anyone else is bothered by this behaviour and wants to make such a change feel free to PM me, though it's a slightly tricky process doing it from a Windows PC and needs special tools.

[Edit] The same change needs to be made to line 772 since there's a separate function to handle UTF8 encoding.


Attached Files
.zip   patchmusiclib.zip (Size: 229 bytes / Downloads: 1)
(07-19-2022, 11:45 PM)Tim Curtis Wrote: Did you create the playlists in 8.1.x ?

I've created the playlists on my windows pc using the software musicbee.
I can play the music, i.e. I klick on the Playlist and add the music to the play queue. That works fine. But for some lists (all lists were generated the same way) nothing happens when I klick on "Edit playlist".

Kind regards
    duke.g

1x RPi 3B, 1x RPi 4, 1x RPi 5, Moode 9; 6k flac Songs; 180k MP3 Songs; Asset-UpnP 186k Songs
The blues has got a hold of me, I believe I'm gettin' dizzy - ZZ Top
The playlist feature expects playlist files in the format generated by MPD. When a playlist is created by MPD moOde adds two #EXT tags at the top of the file to store Genre and Cover information. If the playlist does not confirm to this format it may or may not be able to be edited via the UI.

An import utility would need to be developed to convert playlist formats created in other applications to the format needed by moOde's Playlist view. This would be a good project for an interested developer :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
(07-19-2022, 10:13 PM)duke.g Wrote: Hi all,
I have a little problem editing my playlists.
For some of them nothing happens if  I klick on edit playlist.
Is there a logfile I can have a look at to see whats going on?
If Yes, can someone please point me in the right direction.
I'm using Moode 8.1.2, 32 Bit installation, Pi 4B, 4GB.

Thanks in advance
   duke.g

(07-22-2022, 09:49 PM)duke.g Wrote:
(07-19-2022, 11:45 PM)Tim Curtis Wrote: Did you create the playlists in 8.1.x ?

I've created the playlists on my windows pc using the software musicbee.
I can play the music, i.e. I klick on the Playlist and add the music to the play queue. That works fine. But for some lists (all lists were generated the same way) nothing happens when I klick on "Edit playlist".

Kind regards
    duke.g

Sorry, but how did you import your playlists from Musicbee to moOde and where did you store them? What format are they in and what file extension do they have?

There are a number of different playlist file formats in use these days. From its documentation I gather that Musicbee can generate many of them and MPD has been compiled for moOde with plugins for a number of them (notably M3U, Extended M3U, XSPF, PLS). 

However, the moOde/MPD playlist files reached using the Library pulldown menu specifically are in Extended M3U format, have the file extension .m3u, and are stored in /var/lib/mpd/playlists. Although they should include the #EXTGENRE: and #EXTIMG: directives I just confirmed that I can edit a playlist file (via "Edit playlist") which lacks them.

Regards,
Kent
True. If the playlist is a plain MPD generated playlist (not created by the + in Playlist view) it will only contain URI's and no EXT tags. moOde's Playlist feature adds the tags when the playlist is edited/saved or the Queue is saved to a Playlist or when a new playlist is created via "Add to playlist", etc.

Playlists generated by other apps most likely won't conform to the "only URI's" format generated by MPD or the unique EXT tags that moOde adds.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Which reminds me. In these MPD playlist files the URI for a file is a pathname relative to the music directory location defined in /etc/mpd.conf. In moOde this location is usually /var/lib/mpd/music.

A playlist file copied from some other system likely would have either absolute pathnames or pathnames relative to the M3U file location.

Regards,
Kent
(07-23-2022, 02:47 AM)TheOldPresbyope Wrote:
(07-19-2022, 10:13 PM)duke.g Wrote: Hi all,
I have a little problem editing my playlists.
For some of them nothing happens if  I klick on edit playlist.
Is there a logfile I can have a look at to see whats going on?
If Yes, can someone please point me in the right direction.
I'm using Moode 8.1.2, 32 Bit installation, Pi 4B, 4GB.

Thanks in advance
   duke.g

(07-22-2022, 09:49 PM)duke.g Wrote:
(07-19-2022, 11:45 PM)Tim Curtis Wrote: Did you create the playlists in 8.1.x ?

I've created the playlists on my windows pc using the software musicbee.
I can play the music, i.e. I klick on the Playlist and add the music to the play queue. That works fine. But for some lists (all lists were generated the same way) nothing happens when I klick on "Edit playlist".

Kind regards
    duke.g

Sorry, but how did you import your playlists from Musicbee to moOde and where did you store them? What format are they in and what file extension do they have?

There are a number of different playlist file formats in use these days. From its documentation I gather that Musicbee can generate many of them and MPD has been compiled for moOde with plugins for a number of them (notably M3U, Extended M3U, XSPF, PLS). 

However, the moOde/MPD playlist files reached using the Library pulldown menu specifically are in Extended M3U format, have the file extension .m3u, and are stored in /var/lib/mpd/playlists. Although they should include the #EXTGENRE: and #EXTIMG: directives I just confirmed that I can edit a playlist file (via "Edit playlist") which lacks them.

Regards,
Kent

Hi Kent, hi Tim,

thank you very much for your replies.
The Playlist were exported in Ext M3U format with linux notation (slash vs. backslash) with the correct relative path. The lists are than placed in the mpd playlist folder. As I said, every playlist ist playable without a single problem. But some of them are not editable in moode. For curiosity: I have two Moode-Systems. the playlist that are not editable on the two systems differ. That's why I asked if there is a logfile to see wht is going on.
Next thing I can try is, to rebuild a list that is not playable direct in moode and then compare it to the exported list, to see if there are any differences.

Kind regards
   Klaus

1x RPi 3B, 1x RPi 4, 1x RPi 5, Moode 9; 6k flac Songs; 180k MP3 Songs; Asset-UpnP 186k Songs
The blues has got a hold of me, I believe I'm gettin' dizzy - ZZ Top
Post one of the playlist files (in a code box) or post a download link to one of the files. I'll see if I can repro the issue.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
(07-23-2022, 12:07 PM)Tim Curtis Wrote: Post one of the playlist files (in a code box) or post a download link to one of the files. I'll see if I can repro the issue.

Hello Tim,

again, thank you for your support.
This is not a big problem for me, as I can edit the playlists on my computer. So please do not invest too much time  Wink

Here is one list:
Code:
#EXTGENRE:
#EXTIMG:local
NAS/LINKI/MP3/_Various Artists/Rock/The All Time Greatest Rock Songs Vol 2 (CD2)/06 - Neil Young - Heart Of Gold.mp3
NAS/LINKI/MP3/_Alben/Scorpions/Best Of/005 - Holiday.mp3
NAS/LINKI/MP3/_Alben/The Rolling Stones/1970 - Get Yer Ya-Ya's Out/04 - Love In Vain.mp3
NAS/LINKI/MP3/_Alben/Dire Straits/1984 - Alchemy/CD 1/006 - Sultans Of Swing.mp3
NAS/LINKI/MP3/_Alben/Fury in the Slaughterhouse/Mono/04 - Radio Orchid.mp3
NAS/LINKI/MP3/_Alben/Golden Earring/The Devil Made Us Do It (35 Years) - 2000/DISC 2 - I Do Rock 'n Roll/013 - The Devil Made Me Do It.mp3
NAS/LINKI/MP3/_Various Artists/Billboard/Billboard Top 100 of 1985/016 - Simple Minds - Don't You Forget About Me.mp3
NAS/LINKI/MP3/_Alben/The Rolling Stones/1970 - Get Yer Ya-Ya's Out/01 - Jumpin' Jack Flash.mp3
NAS/LINKI/MP3/_Alben/Gary Moore/1993 - Blues Alive/002 - Walking By Myself.mp3
NAS/LINKI/MP3/_Alben/Dire Straits/1984 - Alchemy/CD 2/005 - Going Home (Theme From 'Local Hero').mp3
NAS/LINKI/MP3/_Alben/Golden Earring/1977 Live/09 - Radar Love.mp3
NAS/LINKI/MP3/_Alben/Gun/Swagger - 1994/010 - Vicious Heart.mp3
NAS/LINKI/MP3/_Various Artists/Rock/Party Rock (CD 3)/11 - Toto - Hold The Line.mp3
NAS/LINKI/MP3/_Alben/Frank Zappa/Joe's Garage/CD 1/02 - Joe's Garage.mp3
NAS/LINKI/MP3/_Alben/Metallica/S&M (1999)/cd 2/01 - Nothing Else Matters.mp3
NAS/LINKI/MP3/_Alben/The Rolling Stones/1968 - Beggar's Banquet/01 - Sympathy For The Devil.mp3
NAS/LINKI/MP3/_Alben/The Rolling Stones/1969 - Let It Bleed/01 - Gimme Shelter.mp3
NAS/LINKI/MP3/_Alben/Innes Sibun/Superstitious/03 - I'll Be There.mp3
NAS/LINKI/MP3/_Alben/Spandau Ballet/The Twelve Inch Mixes/02 - Lifeline.mp3
NAS/LINKI/MP3/_Alben/Heroes Del Silencio/Senderos De Traicion/01 - Entre Dos Tierras.mp3
NAS/LINKI/MP3/_Various Artists/Rock/The All Time Greatest Rock Songs Vol 2 (CD1)/07 - ZZ Top - Gimme All Your Lovin'.mp3
NAS/LINKI/MP3/_Alben/BAP/1983 - Bess demnähx (Live)/CD1/07 - Kristallnaach.mp3
NAS/LINKI/MP3/_Alben/ACDC/1992 - ACDC Live/CD 1/009 - The Jack.mp3
NAS/LINKI/MP3/_Alben/ZZ Top/1992 - Greatest Hits/008 - Viva Las Vegas.mp3
NAS/LINKI/MP3/_Alben/Guns N' Roses/Live Era '87 - '93 (1999)/CD 2/007 - Sweet Child O' Mine.mp3
NAS/LINKI/MP3/_Alben/Eloy/1980 - Colours/007 - Silhouette.mp3
NAS/LINKI/MP3/_Alben/Peter Green/In The Skies - 1979/002 - Slabo Day.mp3
NAS/LINKI/MP3/_Alben/Pink Floyd/The Wall - 1979/CD 2/006 - Comfortably Numb.mp3
NAS/LINKI/MP3/_Alben/Led Zeppelin/Led Zeppelin IV - 1971/004 - Stairway To Heaven.mp3

Kind regards
   Klaus

1x RPi 3B, 1x RPi 4, 1x RPi 5, Moode 9; 6k flac Songs; 180k MP3 Songs; Asset-UpnP 186k Songs
The blues has got a hold of me, I believe I'm gettin' dizzy - ZZ Top


Forum Jump: