(07-03-2022, 12:04 PM)Tim Curtis Wrote: Currently moOde code does not correctly parse the cover art and tracks from cue/flac format either non-embedded cue or embedded cue. The non-embedded format is much more straight forward and so thats where the improvements were made.
By non-embedded cue I mean there is a separate flac and cue file in the Album directory and the flac file does not contain an embedded cue sheet. I used XLD to create the example test files.
Example:
Code:
pi@moode:~ $ ls -l /media/VFAT128/Test_mixed/cue-test-no-embedded/
total 229504
-rw-r--r-- 1 root root 1388 Jun 27 02:56 Spectrum.cue
-rw-r--r-- 1 root root 234972804 Jun 27 02:56 Spectrum.flac
pi@moode:~ $ metaflac --list --block-number=2 /media/VFAT128/Test_mixed/cue-test-no-embedded/Spectrum.flac
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 198
vendor string: reference libFLAC 1.3.3 20190804
comments: 7
comment[0]: ENCODER=X Lossless Decoder 20211018
comment[1]: ALBUM=Spectrum
comment[2]: GENRE=Jazz
comment[3]: COMPOSER=Billy Cobham
comment[4]: ALBUMARTIST=Billy Cobham
comment[5]: DATE=1973
comment[6]: MCN=4943674071838
Folder view
This shows the drill down starting with the Album directory "cue-test-no-embedded". When this is clicked the cue virtual directory named "Spectrum" is displayed. When this is clicked the tracks are displayed.
Audio info for one of the tracks
Playback and Playbar showing the embedded cover art in the flac file and the thumbnails for the Queue and Playbar that were generated during Library update.
Tag and Album view. There is still a bogus album header in the tracks list but this should be fixed for the upcoming 8.1.2 release.
The first five images reflect exactly how it is currently working on my "branch".
The main problem with album art was the appended "track0005" (for example) which resulted in the parent folder being the name of the cue file, messing up things (checked for ".cue/track" and removed it before looking for album art, and this fixed the problem)
Last two images show the cue file itself added as a track... I saw this today too, as I was messing around with the preferences - never saw it before, and got fixed with a "rebuild library"...
Anyway, I discovered that when parsing the entries for building the various library / folder views there is special attention that has to be paid to the .cue extension. Also, cue's are (well, were, for what is worth on my "branch... ) doubled (one browseable, as you show in your pics, and one not), and I believe that one entry is the cue itself, while the other one is the cue treated as a folder.
I do not remember what I actually did, but spent much time monitoring what every single entry in the folder view was about, and fixed the behavior.
For the TAG / ARTIST / ALBUM views, the problem was only related to the album art not being displayed; and the problem was "only" the appended "track<4_zeroes_padded_track_number>" => pathinfo(PATHINFO_DIRNAME) returned <cue filename> => not a valid audio file nor a real folder => no album art found.
Everything else is correctly parsed by MPD, I believe: I can add a single track, a whole album, or a whole DISC (if my cue embeds more than one disk, as per Pink Floyd - The Wall for instance), or the whole DOUBLE ALBUM directly from the TAG / ARTIST / ALBUM view. Folder view does not allow for single disk, but allows whole album and single track.
Again, I have not a single song as FLAC: I only have around 300 discs, all ripped to single FLAC + CUE, and I can do whatever I want from whatever view.
The fact that in audio info there is track000? in the filename is IMO correct (could be displayed differently, if you like, but is correctly showing what info we are looking at).
Also, track number and disc number are correctly shown (track number from CUE info, and disc number from the FLAC file the track belongs to)
I will compare your changes to mine; and if they fix everything as I was able to do, I'll be more than happy to discard all my code; if not I will see what is missing, and come back to you for a chat about embedding further changes... does it sound ok to you?
cannot attach text files... here is how "The Wall" is set up in my library:
This is an example of a CUE file addressing 2 FLACS in my library:
DIRECTORY CONTENTS:
pi@moode-lounge:/media/Spare 2/Music/P/Pink Floyd/The Wall $ ls -l
total 455036
-rw-r--r-- 1 pi pi 218268704 Jun 17 19:16 'Pink Floyd - The Wall - disc 1.flac'
-rw-r--r-- 1 pi pi 247668935 Jun 17 19:16 'Pink Floyd - The Wall - disc 2.flac'
-rw-rw-r-- 1 pi pi 1924 Jun 20 17:14 'Pink Floyd - The Wall.cue'
METAFLAC INFO of file 1
pi@moode-lounge:/media/Spare 2/Music/P/Pink Floyd/The Wall $ metaflac --list --block-type=VORBIS_COMMENT ./Pink\ Floyd\ -\ The\ Wall\ -\ disc\ 1.flac
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 178
vendor string: reference libFLAC 1.3.3 20190804
comments: 7
comment[0]: ALBUM=The Wall
comment[1]: ARTIST=Pink Floyd
comment[2]: DISCNUMBER=1
comment[3]: GENRE=Progressive Rock
comment[4]: DATE=1979
comment[5]: TOTALDISCS=02
comment[6]: TITLE=The Wall - disc 1
METAFLAC INFO of file 2
pi@moode-lounge:/media/Spare 2/Music/P/Pink Floyd/The Wall $ metaflac --list --block-type=VORBIS_COMMENT ./Pink\ Floyd\ -\ The\ Wall\ -\ disc\ 2.flac
METADATA block #2
type: 4 (VORBIS_COMMENT)
is last: false
length: 178
vendor string: reference libFLAC 1.3.3 20190804
comments: 7
comment[0]: ALBUM=The Wall
comment[1]: ARTIST=Pink Floyd
comment[2]: DISCNUMBER=2
comment[3]: GENRE=Progressive Rock
comment[4]: DATE=1979
comment[5]: TOTALDISCS=02
comment[6]: TITLE=The Wall - disc 2
THE FLAC FILE ITSELF
TITLE "The Wall"
PERFORMER "Pink Floyd"
FILE "Pink Floyd - The Wall - disc 1.flac" WAVE
TRACK 01 AUDIO
TITLE "In The Flesh?"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "The Thin Ice"
INDEX 01 03:20:30
TRACK 03 AUDIO
TITLE "Another Brick in the Wall, Part 1"
INDEX 01 05:47:07
TRACK 04 AUDIO
TITLE "The Happiest Days of Our Lives"
INDEX 01 08:58:63
TRACK 05 AUDIO
TITLE "Another Brick in the Wall, Part 2"
INDEX 01 10:49:51
TRACK 06 AUDIO
TITLE "Mother"
INDEX 01 14:48:43
TRACK 07 AUDIO
TITLE "Goodbye Blue Sky"
INDEX 01 20:23:23
TRACK 08 AUDIO
TITLE "Empty Spaces"
INDEX 01 23:10:49
TRACK 09 AUDIO
TITLE "Young Lust"
INDEX 01 25:18:28
TRACK 10 AUDIO
TITLE "One of My Turns"
INDEX 01 28:48:26
TRACK 11 AUDIO
TITLE "Don’t Leave Me Now"
INDEX 01 32:25:11
TRACK 12 AUDIO
TITLE "Another Brick in the Wall, Part 3"
INDEX 01 36:41:06
TRACK 13 AUDIO
TITLE "Goodbye Cruel World"
INDEX 01 37:55:36
FILE "Pink Floyd - The Wall - disc 2.flac" WAVE
TRACK 14 AUDIO
TITLE "Hey You"
INDEX 01 00:00:00
TRACK 15 AUDIO
TITLE "Is There Anybody Out There?"
INDEX 01 04:40:33
TRACK 16 AUDIO
TITLE "Nobody Home"
INDEX 01 07:22:26
TRACK 17 AUDIO
TITLE "Vera"
INDEX 01 10:45:18
TRACK 18 AUDIO
TITLE "Bring the Boys Back Home"
INDEX 01 12:18:44
TRACK 19 AUDIO
TITLE "Comfortably Numb"
INDEX 01 13:45:58
TRACK 20 AUDIO
TITLE "The Show Must Go On"
INDEX 01 20:08:07
TRACK 21 AUDIO
TITLE "In the Flesh"
INDEX 01 21:44:47
TRACK 22 AUDIO
TITLE "Run Like Hell"
INDEX 01 26:00:22
TRACK 23 AUDIO
TITLE "Waiting for the Worms"
INDEX 01 30:23:64
TRACK 24 AUDIO
TITLE "Stop"
INDEX 01 34:20:68
TRACK 25 AUDIO
TITLE "The Trial"
INDEX 01 34:51:53
TRACK 26 AUDIO
TITLE "Outside the Wall"
INDEX 01 40:10:25
Cheers, Al.