bug-gnupod
[Top][All Lists]
Advanced

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

Re: [Bug-gnupod] Questions about play counts


From: H. Langos
Subject: Re: [Bug-gnupod] Questions about play counts
Date: Fri, 10 Apr 2009 23:04:35 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Frank,

My knowledge of the iPod is limited to say the least but I'll try
to answer anyway. I can be completely wrong or even completely mad ... 
hey, it's the internet. dont trust anybody ;-)

There used to be last-fm support builtin in gnupod. I don't know why it was 
removed. Happend before I started using gnupod and since I don't like the
idea of telling the whole world which music I listen to, I didn't care when
I found out.

On Fri, Apr 10, 2009 at 04:39:52PM +0200, Frank Blendinger wrote:
> Hi,
> 
> I am using GNUpod with my iPod nano (3G) and I am very happy with it.
> There is just one thing I am still missing (and currently trying to get
> done): submit the songs played on the iPod to last.fm.

I use the same iPod. 4g nano is nice but i know people who complain about
the short battery life. my guess is, they don't use the hold switch and the 
acceleration sensors kick in all the time when they walk and the ipod shakes
in their pocket... backlight goes up ... battery goes down...

> I have tried to use qtscrob[1], which tries to the ``iTunesDB'' and
> ``Play Count'' files in iPod_Control/iTunes. However, it fails, as I
> don't have such a file on my iPod. 

I have the "Play Count" file in iPod_Control/iTunes but as soon as you 
start a gnupod_search or any other gnupod command, gnupod detects that
the iPod has done something that is not yet included in the GNUtunesDB.xml

You will see:
> On-The-Go data sync needed...
> On-The-Go data synced

This means that gnupod reads the files, incorporated that information 
in GNUtunesDB.xml, and deletes those files.

At this point your GNUtunesDB.xml is up to date and the playcount,
played_flag and lastplay should be correct. (more or less correct. I messed 
with the played_flag to also be changed to "1" for podcasts that you didn't 
listen to completely.)

> I have seen that the GNUtunesDB.xml
> also has some information that could possibly be used, ``playcount'',
> ``played_flag'' and ``lastplay''.
> 
> Now I am not sure where I should go from there. Should I try to get that
> missing ``Play Count'' file on my iPod? Or I better try to parse the
> GNUtunesDB.xml?

I guess you can try both ways. Use qtscrob _before_ running gnupod, or parse
GNUtunesDB.xml afterwards. BTW: the CVS version of gnupod contains
gnupod_find.pl with that tool you can access any attribute that you see in
GNUtunesDB.xml

E.g.
gnupod_find.pl --sort "lastplay" --view "lastplay,default"

I just tried that and currently lastplay is reported back in MACTIME (
seconds since 1.1.1900) I'll change that to human readable output tonight.

> Some clarifications about how the play count data is handled would be
> very helpful. I assume that the iPod device itself increases a play
> counter in the iTunesDB file and also sets a timestamp there. 

No. AFAIK the iPod only reads the iTunesDB. It never writes to it. Whatever
the iPod writes, is written to separate files and later merged back into the
iTunesDB either by iTunes or gnupod's mktunes.

> What about
> that ``Play Count'' file? Where should that come from? iTunes maybe?
> And how and when does the information get from the iTunesDB to the
> GNUtunesDB.xml - when mktunes is called?

mktunes.pl only _writes_ a new iTunedDB file. 

tunes2pod.pl _reads_ iTunedDB and creates a GNUtunesDB.xml (you only use it once
when you already have data on your ipod and want to start managing it with
gnupod.)

gnupod_otgsync.pl is the one that reads the "Play Count" file an updates
the GNUtunesDB.xml. It is called automatically by e.g. gnupod_search or 
pretty much any other gnupod programm.

> How would I reset the play counts after I have submitted them?

why should you? why not keep the old value and only transmit a delta?

-henrik





reply via email to

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