Bug 4077 - CUE files YEAR and GENRE not always working
: CUE files YEAR and GENRE not always working
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Formats
: 6.3.1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-10 05:32 UTC by Greg Erskine
Modified: 2008-12-18 11:11 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Erskine 2006-09-10 05:32:35 UTC
Browse Genres doesn't work for single-worded genres.
Browse Years never works.

When EAC V0.95 beta 4 generates CUE files for single WAV files, the GENRE field is not quoted for single-worded genres. The YEAR field is actually called DATE and never has quotes.

The code parses GENRE expecting expecting it to be always quoted. The code is looking for a quoted YEAR field but should be looking for an unquoted DATE field.

Example 1:

REM GENRE Pop
REM DATE 2004
REM DISCID 900B650C
REM COMMENT "ExactAudioCopy v0.95b4"
PERFORMER "Anastacia"
TITLE "Anastacia"
FILE "D:\CD\Anastacia\Anastacia\Anastacia.wav" WAVE

Example 2:

REM GENRE "Hard Rock"
REM DATE 1980
REM DISCID F3103F0F
REM COMMENT "ExactAudioCopy v0.95b3"
PERFORMER "Heart"
TITLE "Greatest Hits"
FILE "Greatest Hits.wav" WAVE
Comment 1 Chris Owens 2006-09-10 15:33:46 UTC
Ross, how are you at hacking CUE files?  I'd like to try to reproduce this to verify 6.5 is not affected.
Comment 2 Ross Levine 2006-09-11 15:48:36 UTC
Chris thank you for your help earlier, I'm learning a lot about Cuesheets today! 

Greg, are you certain this bug is related to whether the Genre tag is one word or two? Whether I use a 1 word or 2 word Genre, it doesn't seem to matter. SlimServer indexes the genre field as long as long as quotes are used. It seems I can get them to work just fine with one word genre's so long as their wrapped in quotes. 

Should this work without quotes?
Comment 3 Greg Erskine 2006-09-12 00:52:00 UTC
Subject: Re:  CUE files YEAR and GENRE not always working

Chris, you're right as long as there are quotes it works.  But EAC only seems to put the quotes in 
if the GENRE is more than one word. It's really a bug with EAC, but I thought it would be easy to 
get Slimserver to handle it.

Quoting Slim Devices Bugzilla <bugs@web.slimdevices.com>:

> https://bugs-archive.lyrion.org/show_bug.cgi?id=4077
> 
> 
> 
> 
> 
> ------- Comment #2 from ross@slimdevices.com  2006-09-11 15:48
> -------
> Chris thank you for your help earlier, I'm learning a lot about
> Cuesheets
> today! 
> 
> Greg, are you certain this bug is related to whether the Genre tag is
> one word
> or two? Whether I use a 1 word or 2 word Genre, it doesn't seem to
> matter.
> SlimServer indexes the genre field as long as long as quotes are
> used. It seems
> I can get them to work just fine with one word genre's so long as
> their wrapped
> in quotes. 
> 
> Should this work without quotes?
> 
> 
> 
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> 


Comment 4 Chris Owens 2006-09-15 17:07:55 UTC
I use EAC all the time and I've never seen this!  I see I have EAC .95 beta 4 installed.  I looked through the program options in EAC menu but couldn't find anything that looked like it might fix this problem.

I'm going to mark this as 'invalid' since it's not technically our bug, but Ross and I can continue to correspond to you here.  I just don't want this bug to stop the 6.5 release.
Comment 5 Blackketter Dean 2006-09-16 17:01:22 UTC
Does the CUE sheet format require quote?  It sounds like our parser should make the quotes optional.  Dan: do you know?
Comment 6 Greg Erskine 2006-09-16 19:18:36 UTC
Subject: RE:  CUE files YEAR and GENRE not always working

Here is the code I added to CUE.pm to make YEAR/DATE and GENRE work for
me (using a single WAV file and generated CUE sheet). I'm not sure if it
is suitable for other users of EAC or will cause other issues??

            # EAC CUE sheet has REM DATE not REM YEAR, and no quotes

		} elsif ($line =~ /^(?:REM\s+)?(DATE)\s+(.*)/i) { 

			$cuesheet->{'YEAR'} = $2;
                   
            # Single worded GENRE doesn't have quotes

		} elsif ($line =~ /^(?:REM\s+)?(GENRE)\s+(.*)/i) {

			$cuesheet->{uc($1)} = $2;


> -----Original Message-----
> From: Slim Devices Bugzilla [mailto:bugs@web.slimdevices.com] 
> Sent: Sunday, 17 September 2006 10:01 AM
> To: gerskine@tpg.com.au
> Subject: [Bug 4077] CUE files YEAR and GENRE not always working
> 
> 
> https://bugs-archive.lyrion.org/show_bug.cgi?id=4077
> 
> 
> dean@slimdevices.com changed:
> 
>            What    |Removed                     |Added
> --------------------------------------------------------------
> --------------
>                  CC|                            |dan@slimdevices.com
> 
> 
> 
> 
> ------- Comment #5 from dean@slimdevices.com  2006-09-16 
> 17:01 ------- Does the CUE sheet format require quote?  It 
> sounds like our parser should make the quotes optional.  Dan: 
> do you know?
> 
> 
> 
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> 

Comment 7 Dan Sully 2006-09-17 09:38:00 UTC
Yes, the CUE sheet format requires quotes. I seem to recall we tried to make them optional at one point and it caused issues.
Comment 8 Dan Sully 2006-09-22 16:44:04 UTC
Fixed in change 9990
Comment 9 Greg Erskine 2006-09-29 16:25:12 UTC
I've been testing on SlimServer_6.5_v2006-09-28 and GENRE is fixed but, the YEAR is still not working.

You have added the following 3 lines:

} elsif ($line =~ /^(?:REM\s+)?(DATE)\s+(.*)/i) {

    # EAC CUE sheet has REM DATE not REM YEAR, and no quotes
    $cuesheet->{uc($1)} = $2;

I'm not a programmer so I don't know the right terminology, but the last line is equating to:

    cuesheet->DATE = the year

It should be:

    cuesheet->YEAR = the year

So the code should be something like:

    $cuesheet->{'YEAR'} = $2;

This takes the DATE field from the EAC cue sheet and equates to the YEAR field in your database.

This seems to work properly on my PC.

6.5.1 is looking really great, thanks :)


Comment 10 Dan Sully 2006-09-29 16:55:32 UTC
Fixed! Change 10105