bug-gnupod
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnupod] GNUpod 0.90 and playlists


From: Mathieu Chouquet-Stringer
Subject: [Bug-gnupod] GNUpod 0.90 and playlists
Date: Wed, 17 Sep 2003 18:35:57 -0400
User-agent: Mutt/1.4.1i

[Note I wasn't subscribed to this mailing list so the message was waiting
approval, this is a resend now that I'm a member]

        Hi all,

I've been a very happy user of GNUpod for quite a long time but I'm
suprised by the way the playlists work in 0.90.

First if you don't use any ids to match a song and if you have a large
number of playlists (that's my case, I've got all my albums sorted),
mktunes.pl crawls like a dog. It's because of this piece of code (which
iterates over all the keys for every playlist entry, note the comment is
actually ultrahyper right):

#Slow but ultrahyper flexible matching for 'add' target

foreach my $xid (keys(%{$quickhash})) {
          foreach my $xkey (keys(%{${$quickhash}{$xid}})) {
            next if $xkey ne $key;
            next if lc(${$quickhash}{$xid}{$xkey}) ne lc((${$cadd}{$key}));
             #If we are still here, it did match!
            $matchkey{$xid}++;
            push @sortedkeys, $xid;
          }
        }

Now it takes more than 5 minutes on my PIII to create the iTunes.db file.

Second, it looks like the songs in a playlist are not sorted anymore. Ie
say, I create a playlist called PL with 2 albums X and Y (with <add
artist="..." album="X" />), I expect to get all the songs (in order) from X
first followed by all the songs from Y but it's not the case (it used to be
like this). It's because the xids are added to a hash (%pldata) meaning
there's no real order when you create the final big playlist.

Third (I haven't tried but looking at the code makes me think so), the
order of the songs will be even more random if you use regex or iregex.
Example, say if my playlist looks like this:

<playlist name="Regex sample 1">
 <regex album="\d" />
 <iregex title="^a" />
 <regex title="^O" />
 <add artist="X" album="Y" />
</playlist>

I would expect to get all the songs (sorted, if point #2 wasn't there) of
all the albums matching \d, then matching ^a, then matching ^O and finally
matching X&Y. But because mktunes goes through the add tag first, then
regex and then iregex it's not the case anymore. In the end, I admit it
isn't relevant because of point #2.

So before sending patches like crazy, I would like to know if this is on
purpose? If not, are patches welcome? If yes, what kind (ie in
src/mktunes.pl, function genpldata I see a lot of duplicated work, is this
also acceptable)?

Although it looks like I'm bitching way too much, it's not my intention:
GNUpod is a great tool and it's the only tool I use in a day to day basis
to manage my mp3s on the iPod so I appreciate the work and I thank you
again for this cool piece of software.

Cheers, Mathieu.

-- 
Mathieu Chouquet-Stringer              E-Mail : address@hidden
       Never attribute to malice that which can be adequately
                    explained by stupidity.
                     -- Hanlon's Razor --




reply via email to

[Prev in Thread] Current Thread [Next in Thread]