Bug 63938 - Tag guesser behavior for pattern matching
Summary: Tag guesser behavior for pattern matching
Status: ASSIGNED
Alias: None
Product: juk
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
: 70658 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-09 07:51 UTC by Konstantinos Georgokitsos
Modified: 2004-10-13 21:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch to improve tagguessing (2.60 KB, patch)
2003-10-05 23:17 UTC, Richard Lärkäng
Details
Fix tagguessertest (9.39 KB, patch)
2003-10-05 23:19 UTC, Richard Lärkäng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantinos Georgokitsos 2003-09-09 07:51:34 UTC
Version:            (using KDE 3.1.3)
Installed from:    SuSE
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19-4GB

When I have filenames with dots (.) in some part of the title Juk uses only the right part after the dot e.g. album name is "Compilation Vol. 03", tag guesser uses only 03.
Similarly if a Song title has brackets (round or square) tag guesser does not use it's contents for the song title, e.g. "song title (radion mix)", only "song title" is used.

I understand that the above are special characters, but I still would like to be able to force the tag guesser to use them to fill in tags.
Comment 1 Richard Lärkäng 2003-10-05 19:34:03 UTC
It will also happen when the name contains a ',' 
 
btw, isn't this more of a bug than a whishlist? 
Comment 2 Richard Lärkäng 2003-10-05 23:17:43 UTC
Created attachment 2694 [details]
Patch to improve tagguessing

Here's a patch that I think will improve tagguessing.

First, it will strip the homedir out of the filename which it matches, this
isn't neccessary for fixing this bug, but without it the tests break, and I
think it makes sense anyway as I can't see why you would want to match
something with your homedir.

Also it strips the fileextension out of the end (only '.mp3' and '.ogg' now),
and makes it match all the way to the end of the path, because at least to me
it looks like you would always want that. That part could be improved by having
the extensions that are supported somewhere else and look those up.

And the most important change is that it will match any character except for an
'/' for everything except the tracknumber, so things like '.' and '(' can be
matched too (before it was only letters, numbers and whitespaces).

And it will skip the reading of regexps from the configfile, as  it's not
possible to change with the gui, and I don't see the need for it either.

Also it will add some more patterns to match, as I found them on some of my
files, and I thought they were useful.

Of course, all of those changes doesn't need to be merged in, but at least to
me all of them makes sense.

And also, unless people agree that this is a bug, it will have to wait until
KDE 3.3

I will also attach some changes to the test-code, as it was broken atm.

This will still now work the way I want with files like: "Randy - Religion,
Religion (demo version)", as it would result in "Religion, religion" as track
name, and "demo version" as comment, where I would like "Religion, religion
(demo version)" as track name, but as I can fix this by removing all patterns
with '%c' in, that's good enough for me, and I definately can see why you would
want it to be like that.
Comment 3 Richard Lärkäng 2003-10-05 23:19:14 UTC
Created attachment 2695 [details]
Fix tagguessertest

Patch to fix tagguessertest, and add another test with a ',' in.
Comment 4 Frerich Raabe 2004-02-15 21:28:04 UTC
Current JuK CVS version will accept "," and "." in the artist, album and title fields.

By the way, it's a feature (not a bug) that "song title (remix)" gets parsed as title = "song title". That's because stuff at the end of the filename which appears in parentheses is treated as a comment (and in this case, having a comment "remix" makes sense to me).
Comment 5 Renato Machado de Sousa 2004-07-07 22:43:29 UTC
Maybe you could change that patch (haven't tested yet) to match any character that is not a separator in the pattern. e.g. for %a/%A/%T - %t it would match anything but / and -, while for %a/%A/[%T] - %t it would match anything but [, ] and /.

I think this would make most patterns work as expected...
Comment 6 Michael Pyne 2004-08-04 09:13:55 UTC
*** Bug 70658 has been marked as a duplicate of this bug. ***
Comment 7 mycroft 2004-10-13 21:11:15 UTC
I have albums with "!" in their name, which is not matched with a pattern like:

%a - %A/%T %t

That is to say, the pattern doesn't seem to match at all.  This is vaguely irritating.