PDA

View Full Version : guess tags crash in trunk



kdf
2005-07-22, 22:25
I am guessing this must be a side effect of the infoFormat change.
regex is too much for me to deal with, but the log follows.

-kdf

2005-07-22 21:52:14.7587 reading tags for:
file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
foo_fighters-all_my_life-rns.mp3
2005-07-22 21:52:14.7608 Info: no tags found for /media/Album
Collection/FOO FIGHTERS/One By One/01-foo_fighters-all_my_life-rns.mp3
2005-07-22 21:52:14.7619 Info: no title found, using plain title for
file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
foo_fighters-all_my_life-rns.mp3
2005-07-22 21:52:14.7634 Guessing tags for:
file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
foo_fighters-all_my_life-rns.mp3
2005-07-22 21:52:14.7662 Using format "(ARTIST - ALBUM) TRACKNUM -
TITLE" =
/
([^\/]+)\([^\/]+)(([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T
([^\/]+) ([^\/]+)-([^\/]+)
([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/...
Unmatched ) in regex; marked by <-- HERE in m/([^\/]+)\([^\/]+) <--
HERE (([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T([^\/]+)
([^\/]+)-([^\/]+)
([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/ at
/mnt/mandrake/usr/local/slimserver/trunk/Slim/Music/Info.pm line 1162,
<GEN31> line 1.

mwphoto
2005-07-23, 04:08
The Regex Coach is great for debugging expressions like this

http://www.weitz.de/regex-coach/

I'll take a look and see if I can find the problem.

Malcolm

> -----Original Message-----
> From: developers-bounces (AT) lists (DOT) slimdevices.com
> [mailto:developers-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of kdf
> Sent: 23 July 2005 06:25
> To: Slim Devices Developers
> Subject: [Developers] guess tags crash in trunk
>
>
> I am guessing this must be a side effect of the infoFormat change.
> regex is too much for me to deal with, but the log follows.
>
> -kdf
>
> 2005-07-22 21:52:14.7587 reading tags for:
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7608 Info: no tags found for /media/Album
> Collection/FOO FIGHTERS/One By One/01-foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7619 Info: no title found, using plain title for
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7634 Guessing tags for:
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7662 Using format "(ARTIST - ALBUM) TRACKNUM -
> TITLE" =
> /
> ([^\/]+)\([^\/]+)(([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T
> ([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
> ([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/...
> Unmatched ) in regex; marked by <-- HERE in m/([^\/]+)\([^\/]+) <--
> HERE (([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T([^\/]+)
> ([^\/]+)-([^\/]+)
> ([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
> ([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/ at
> /mnt/mandrake/usr/local/slimserver/trunk/Slim/Music/Info.pm line 1162,
> <GEN31> line 1.
>
>

mwphoto
2005-07-23, 04:17
Ok,

on line 1160 in Info.pm

$pat =~ s/($elems)/\(\[^\\\/\]\+\)/g;

The variable $elems is uninitialised and has no value, unless it's a global
variable, which I doubt.

Not sure what it's meant for but I'm guessing it was meant to be something
like:

for $elems ('ARTIST','ALBUM', . . . . . ) {
$pat =~ s/($elems)/\(\[^\\\/\]\+\)/g;
}

I hope that helps someone take it a bit further . . . .

Malcolm
> -----Original Message-----
> From: developers-bounces (AT) lists (DOT) slimdevices.com
> [mailto:developers-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of kdf
> Sent: 23 July 2005 06:25
> To: Slim Devices Developers
> Subject: [Developers] guess tags crash in trunk
>
>
> I am guessing this must be a side effect of the infoFormat change.
> regex is too much for me to deal with, but the log follows.
>
> -kdf
>
> 2005-07-22 21:52:14.7587 reading tags for:
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7608 Info: no tags found for /media/Album
> Collection/FOO FIGHTERS/One By One/01-foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7619 Info: no title found, using plain title for
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7634 Guessing tags for:
> file:///media/Album%20Collection/FOO%20FIGHTERS/One%20By%20One/01-
> foo_fighters-all_my_life-rns.mp3
> 2005-07-22 21:52:14.7662 Using format "(ARTIST - ALBUM) TRACKNUM -
> TITLE" =
> /
> ([^\/]+)\([^\/]+)(([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T
> ([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
> ([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/...
> Unmatched ) in regex; marked by <-- HERE in m/([^\/]+)\([^\/]+) <--
> HERE (([^\/]+)A([^\/]+)R([^\/]+)T([^\/]+)I([^\/]+)S([^\/]+)T([^\/]+)
> ([^\/]+)-([^\/]+)
> ([^\/]+)A([^\/]+)L([^\/]+)B([^\/]+)U([^\/]+)M([^\/]+)\([^\/]+))([^\/]+)
> ([^\/]+)(([^\/]+)\([^\/]+)d([^\/]+)+([^\/]+))([^\/]+) ([^\/]+)-([^\/]+)
> ([^\/]+)T([^\/]+)I([^\/]+)T([^\/]+)L([^\/]+)E([^\/]+)/ at
> /mnt/mandrake/usr/local/slimserver/trunk/Slim/Music/Info.pm line 1162,
> <GEN31> line 1.
>
>

Grotus
2005-07-23, 08:42
Malcolm Wotton blurted out:
> Ok,
>
> on line 1160 in Info.pm
>
> $pat =~ s/($elems)/\(\[^\\\/\]\+\)/g;
>
> The variable $elems is uninitialised and has no value, unless it's a global
> variable, which I doubt.
>
> I hope that helps someone take it a bit further . . . .
>
> Malcolm

$elems is a package variable, which I didn't use in my change and didn't
check to see if it was used elsewhere. It was previously inited in
init(), now init_old(). That variable should be changed to $elemRegex.

Sorry about that. I can't fix it, I have to get going for my trip.

kdf
2005-07-23, 12:05
Quoting Malcolm Wotton <malcolmwotton (AT) yahoo (DOT) co.uk>:

> Ok,
>
> on line 1160 in Info.pm
>
> $pat =~ s/($elems)/\(\[^\\\/\]\+\)/g;
>
> The variable $elems is uninitialised and has no value, unless it's a global
> variable, which I doubt.

it used to be. the guessTags stuff wasn't converted with the infoFormat
changes.
Dan too care of it :)

-kdf