[gpodder-devel] Using Audioscrobbler Log Files To Mark Shows As Played

  • From: me at nikosapi.org (nikosapi)
  • Date: Fri, 28 Mar 2008 11:11:28 -0500

On March 28, 2008 09:38:53 Thomas Perl wrote:
> Hello, Nick!
> On Thu, 2008-03-27 at 20:54 -0500, nikosapi wrote:
> > A new gPodder release is out so it's time to start adding features ;)
> >
> > If you have a player that is capable of running the Rockbox firmware[1]
> > you can enable logging everything you play to an audioscrobbler portable
> > player format logfile[2]. (Go to: Settings-->General
> > Settings-->Playback-->Last.fm Log and set it to "Yes")
> >
> > I wrote a patch that is able to use this logfile to mark episodes that
> > you've listened to as played in gPodder while you're syncing. For this to
> > work you must be using gPodder's tag update feature (set update_tags to
> > True) because the audioscrobbler logfile only reports the metadata of the
> > tracks you've listened to not an actual filename.
> Great work! I've looked through your patch and cleaned up some things
> (moved the find_mount_point function to gpodder.util, rename the config
> option, so people know this is related to mp3 players, re-structure some
> other parts of the code, move the list of possible file names to the
> class instead of having it per-instance, etc..). I have attached the
> updated patch, please have a look at it and try it out if it doesn't
> break anything.
> I'll merge the patch to SVN trunk if everything works and you are happy
> with the patch. I think this could really be an useful feature. One
> question remains, however: Which program is supposed to "clean" that
> file, or is Rockbox keeping it down to a maximum size, so it doesn't
> grow endlessly?
> Thanks,
> Thomas

Hello Thomas,

Thank you for looking over and improving my code :)  

I added one small thing, if find_mount_point() returns '/' then to prevent 
find_scrobbler_log() from os.walk()'ing your whole root filesystem we simply 
set mp3_player_mount_point to the the directory that we're syncing to. Appart 
from that I think the patch is ready.

Ideally the .scrobbler.log file should be cleaned by scrobbler software that 
submits tracks to last.fm. I wrote a small python module that can scrobble 
tracks but I don't really think that it belongs in gPodder. (Unless you 
really think otherwise...)

Have a good day,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpodder-r643-scrobbler_v3.patch
Type: text/x-diff
Size: 5488 bytes
Desc: not available

Other related posts: