Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: CueTools does not parse my cue file correctly and sets %artist% to Untitled1 (Read 2782 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CueTools does not parse my cue file correctly and sets %artist% to Untitled1


I have a cue file that Cuetools 2.2.2 does not parse correctly when encoding and sets the %artist% variable to "Untitled1."
The same cue file can be loaded by using foobar2000 and displays the artist correctly for all of the tracks in the WAV file.
The specific file is attached. This is a hand crafted file, but foobar2000 handles it correctly.  I believe that the PERFOMER clause on line 3 is the problem, but what is the problem? I couldn't see any kind of debug flag for cue file parsing...

Thanks.




Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #1
Hi dpr,
the file contains a mixture of spaces and tabs.
See attached screenshot.

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #2
Hi

Thanks. I will remove them and give it another try
 What is the legal spec? Interesting that foobar2000 was ok with them...
Think cuetools should be more permissive...

Regards
David

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #3
No whitespaces and still a problem...(still works with foobar2000)


Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #4
Perhaps it's an encoding issue? I see two uses of a non-ASCII apostrophe in the titles for tracks 4 and 12.

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #5
what application are you using to see this please?

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #6
I used HxD. It has a statistics view I used to look for bytes that aren't part of ASCII. It's probably not the best tool for this job, but it's what I know how to use.

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #7
So far, I could not reproduce the issue on the Windows 10 system here.
The originally posted carly.cue is working properly and %artist% expands to Carly Simon
What about the attached carly_UTF-8-BOM.cue file? It has been converted from ANSI to UTF-8-BOM. Is it working for you?

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #8
let me check that one
thanks

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #9
What about the attached carly_UTF-8-BOM.cue file? It has been converted from ANSI to UTF-8-BOM. Is it working for you?

It still evaluates to %artist% = Untitled1.

For other cue files, %artist% works properly.



Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #10
Problem Solved!

I noticed that the carly.wav file referenced in the cue file had a value for the attribute 'Contributing artists' = Untitled1

- When I removed the value from the carly.wav, the cue file works! - and the value for %artist% is 'Carly Simon' as set in the cue file.
- When I set the attribute value for a wav file created by EAC, then that attribute value is used to set the value of %artist%.

Summary.
The problem is nothing to do with the cue file and the encoding etc. Somehow the value of %artist% is set by the attribute value of the wav file and the PERFORMER line at the top of the cue file is ignored.

@c72578, thanks for the fast response to my question and the clue that you could not reproduce it on your windows 10 box and the cleaned up file to test with.

A second experiment playing with the attributes of the  .wav file for ABBA's Gold CD from 2004 is attached. Running Cuetools on the cue file using the template
f:\ripsout\%artist%\[%year% - ]%album%\[%discnumber%]\%artist% - %album%.cue

creates a folder F:\ripsout\Elvis\1950 - shook up... Interesting. Is this intended?
David

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #11
Do you have "Overwrite CUE data" checked?

This gives priority to the file tag data over the CUE file.

If you want to use only information in the CUE file (in batch mode) and prevent using tags within the audio file you can untick everything except "Write basic tags from CUE data".


Edit: metadata stored in your local database will be reused. You should clear the entry for any cue you previously processed that had an incorrect artist field before trying a new tagging setting.
korth

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #12
Do you have "Overwrite CUE data" checked?

This gives priority to the file tag data over the CUE file.

yes I do have it checked, but I'm surprised that it applies and that it has priority over the CUE file data because 'Overwrite CUE data' is indented under 'Fill up missing CUE data from tags' and in my view there is no missing CUE data - it is specified in the file. I'll uncheck it, but it is misleading in my view.

If you want to use only information in the CUE file (in batch mode) and prevent using tags within the audio file you can untick everything except "Write basic tags from CUE data".

I will do so. Thanks.


Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #13

I tried to find more information on settings, but could only find http://cue.tools/wiki/CUETools_Settings
Is there more to read?

I noticed that there is or was a feature called custom scripts. Has this been retired?
Thanks
David

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #14
http://cue.tools/wiki/Category:Usage_Guides
I originally wrote several of the pages using the ToolTips from the GUI then expanded the text from forum discussions or trial & error.

Custom scripts were retired quite a while ago. Only the included scripts remain.

http://cue.tools/wiki/CUETools_Changelog
Quote
[...]
04.07.2013: CUETools 2.1.5:
[...]
CUETools: removed reference to the CSScriptLibrary

korth

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #15
http://cue.tools/wiki/Category:Usage_Guides
I originally wrote several of the pages using the ToolTips from the GUI then expanded the text from forum discussions or trial & error.

Custom scripts were retired quite a while ago. Only the included scripts remain.

http://cue.tools/wiki/CUETools_Changelog
Quote
[...]
04.07.2013: CUETools 2.1.5:
[...]
CUETools: removed reference to the CSScriptLibrary

Are they editable? Can't see any files.... where are they?

Re: CueTools does not parse my cue file correctly and sets %artist% to Untitled1

Reply #16
scripts? (You quoted my entire post)
The code for Custom scripts was stored as text in the settings.txt file.
excerpt from CUETools 2.1.4 settings.txt file.
Code: [Select]
CustomScript0Name=default
CustomScript0Code=return processor.Go();
CustomScript0Condition0=1
CustomScript0Condition1=0
CustomScript0Conditions=2
CustomScript1Name=only if found
CustomScript1Code=if (processor.ArVerify.AccResult != HttpStatusCode.OK)
= return processor.WriteReport();
=return processor.Go();
CustomScript1Condition0=1
CustomScript1Conditions=1
CustomScript2Name=fix offset
CustomScript2Code=if (processor.ArVerify.AccResult != HttpStatusCode.OK)
=    return processor.WriteReport();
=processor.WriteOffset = 0;
=processor.Action = CUEAction.Verify;
=string status = processor.Go();
=uint tracksMatch;
=int bestOffset;
=processor.FindBestOffset(processor.Config.fixOffsetMinimumConfidence, !processor.Config.fixOffsetToNearest, out tracksMatch, out bestOffset);
=if (tracksMatch * 100 < processor.Config.fixOffsetMinimumTracksPercent * processor.TrackCount)
=    return status;
=processor.WriteOffset = bestOffset;
=processor.Action = CUEAction.Encode;
=//MessageBox.Show(null, processor.AccurateRipLog, "Done"MessageBoxButtons.OK, MessageBoxIcon.Information);
=return processor.Go();
CustomScript2Condition0=0
CustomScript2Conditions=1
CustomScript3Name=encode if verified
CustomScript3Code=if (processor.ArVerify.AccResult != HttpStatusCode.OK)
=    return processor.WriteReport();
=processor.Action = CUEAction.Verify;
=string status = processor.Go();
=uint tracksMatch;
=int bestOffset;
=processor.FindBestOffset(processor.Config.encodeWhenConfidence, false, out tracksMatch, out bestOffset);
=if (tracksMatch * 100 < processor.Config.encodeWhenPercent * processor.TrackCount || (processor.Config.encodeWhenZeroOffset && bestOffset != 0))
=    return status;
=processor.Action = CUEAction.Encode;
=return processor.Go();
CustomScript3Condition0=0
CustomScript3Conditions=1
CustomScript4Name=repair
CustomScript4Code=
=processor.UseCUEToolsDB();
=processor.Action = CUEAction.Verify;
=if (processor.CTDB.DBStatus != null)
= return CTDB.DBStatus;
=processor.Go();
=processor.CTDB.DoVerify();
=if (!processor.CTDB.Verify.HasErrors)
= return "nothing to fix";
=if (!processor.CTDB.Verify.CanRecover)
= return "cannot fix";
=processor._useCUEToolsDBFix = true;
=processor.Action = CUEAction.Encode;
=return processor.Go();
CustomScript4Condition0=0
CustomScript4Conditions=1
CustomScripts=5
DefaultVerifyScript=default
DefaultVerifyAndConvertScript=default
but the code moved to the source when the CSScriptLibrary was removed.

There was also an option in the settings to compile a custom script prior to the removal of the CSScriptLibrary.
http://cue.tools/wiki/CUETools_Advanced_Settings:_Scripts

The CSScriptLibrary was removed because it appeared the feature wasn't being used (scripts were not shared).
korth