If you have questions, comments, ideas about iPodScrobbler...

 
  • If you have questions, comments, ideas about iPodScrobbler...

    Please do post them here!

    :-)

    Check it out:
    - the Flavour Exchange for iPod users at http://flavox.hoc.net
    - iPodScrobbler at http://www.hoc.net/~mike/source/iPodScrobbler
    • _Lewis said...
    • User
    • 16 Feb 2007, 19:26
    Im having some problems with the setting up of the scrobbler.

    Do you need Python23 specifically? Becuase I have Python25 and I follow all of the instructions and keep getting:

    "The system cannot find the path specified"

    • dkhc said...
    • User
    • 21 Feb 2007, 08:07
    I'm running iPodScrobbler on my Ubuntu Edgy machine and it works fine. One question; I wrote a little scripts that looks where my iPod is mounted, then uses iPodScrobbler to upload songs to last.fm, and in the end I remove the "Play Counts" file. I do that last step because I don't want to submit songs twice. Is this necessary or is there a flag somewhere that figures out when the last time was an upload was done?

    Thanks!

    The word planning lacks all meaning here....
  • I'm running it on Kubuntu and the "Play Counts" file is deleted, I assume Amarok does it before unmounting the iPod, like iTunes does on Windows.

    It would be nice to choose the first track to scrobble or to choose a start time for scrobbling.

    Nice script. Thanks !

    • hado said...
    • User
    • 2 Mar 2007, 12:28
    Choosing a start time can already be done by using the '-t' tag. For instance, to only upload the tracks listened to after 10am on 1 march 2007 add '-t20070301-10:00:00'. You can get a dry run with '-d' so you can even easily check which time to choose to start with a specific track.

    Indeed, nice script!

  • Possible misunderstanding about how this counts plays

    I've just installed iPodScrobbler, and it all seems to work ok (it submits tracks to last.fm, at least). However, I have noticed something rather odd, and I'm not sure if I understand how these playcounts work correctly. I'm asking my question here because I am using iPodScrobbler, though it may be an issue with ipod usage that I cannot clarify elsewhere.

    I bought an album (Klaxons - just so you can look it up in my playlists), and I copied it across to my ipod (using gtkpod) at around 22:30 on March 5th 2007. Before I did this, I scrobbled everything I'd previously listened to.

    I have since listened to the album 3 or 4 times through (no track skipping, I just listened to it a lot), but when I came to scrobble the songs, only the very last listen for each song was scrobbled:

    http://www.last.fm/user/junglebarry/charts/?charttype=recenttracks&subtype=artist&page=1

    I have looked back through the "recent tracks" and can't find any other references to this album after (approx. 10pm) on 5th March (when I uploaded it). I was expecting to see a few...

    So my question is: does the ipod retain all timestamps for different plays of a single song, Or does it just keep the last-play time, and then a play count? How does the iPodScrobbler script deal with this?

    (Good work btw. - easiest way I've found to scrobble under linux)

    to beard or not to beard, that is the question
    • hubpod said...
    • User
    • 4 Apr 2007, 17:55

    ipod limitations

    junglebarry: the ipod unfortunately only retains the "last played" time, and apparently only records when you've played a track right to the end.

    • Jaggo said...
    • User
    • 22 Apr 2007, 23:15
    junglebarry: My iPod has successfully submitted 2 and 3 plays for a single track. I have a 5th gen [video]. Is your iPod older?
    perhaps you could try updating its firmware...

    Also,
    you have to hear a song from beginning to end in order for it to scrobble when ya mount it. This is part of the way the iPod works and is also true for play-counts in iTunes. [If you use them.]

    _Lewis:, I suppose you already managed this out but still, make sure path is the path to which you installed the python executable [python.exe], in my case it's c:\python25\python.exe, with other installs it may and will vary.

    dkhc:, lol. It actually will be interesting to have the script write the time of the last song updated to a file and should I [or mike] find the spare moment an update may be in place.

  • Thanks for the replies. I knew about the play-to-the-end limitation, but since everything I've read says that iPods don't store anything other than the last-played timestamp, I was surprised to find that a number of other scrobblers claim to generate timestamps for multiple-plays. Apparently it works for mac users, but no-one else; the nearest competitor (iSproggler) "recursively generates timestamps" in the words of the author, which I take to mean "falsifies plausible timestamps" (not sure why recursion should make any difference).

    I have a 5th generation iPod video, with firmware fresh out of the box (so possibly not so up-to-date, but I only run linux, and it shouldn't matter anyway given the iTunesDB format). I use Ubuntu (Edgy).

    Still, if I play the same song 3 times (without uploading in the intervening times) it only records the last played time, as expected... so I modified the source code for my copy of iPodScrobbler to incorporate a timestamp generator for multiple plays. My code works (modulo a couple of bugs), and I'll post it somewhere for you to have a look at/break.

    Also, the link to the iPodScrobbler homepage is broken (server error of some kind). Is it hosted elsewhere?

    Cheers guys,
    D

    to beard or not to beard, that is the question
  • Also, those regexps

    I should have posted this above, but it's a slightly different question. I play in a band and I want to filter out any songs by my band (generally demos) according, but I can't find any resource that tells me how to create a negated regexp for the name filter.

    I want to do something like: "filter out those songs where the artist matches 'band\sname'", but my regexps don't stretch that far. I've had a look around but it's tough searching on google unless you know exactly what the term for such a negated match is: not-match, negated-match, inverted-match... help!

    :$

    D

    to beard or not to beard, that is the question
    • Jaggo said...
    • User
    • 3 May 2007, 19:12

    Junglebarry:

    Hey.

    First, As of the multiple plays function, I am close to certain that the script has before uploaded me multiple plays of the same songs with no code-manipulation on my side, but I will test it again just to make sure.

    Now, the patch you requested:

    You seem to know a little python, so rather than [finding a way to-] upload the entire modified code, I will guide you to a simple hack which should solve your problem smoothly:

    search the file for the following comment, it should be ~ line 317 but my code is already editted, so I can't be sure where is it in yours.

    The comment:

    # add it here

    and after it, add the following lines:
    if artist='FooBand':
    ^^if verbose>2:
    ^^^^sys.stdout.write('\tskipping, no match name pattern: \"'+SafeDecode(artist)+', '+SafeDecode(title)+'\"\n')
    ^^continue

    [replace "^^" with a tab, I wasn't sure what would a tab look like in this forum.
    Also, the indentation of the first line should be identical to that of the comment.]

    Explanation: artist contains the artist name, read from the Play Counts file, afterwards the series of terms requested on the command line format are applied, and at the end of the block the processed song is added to a waiting-to-be-uploaded- dictionary.

  • cheers Jaggo - I've altered my code for the scrobbler to have an artist/song exclusion regexp, along the same lines as Mike's original filter. I think it'll do the same thing as you suggest above, but many thanks for the code as it's helped me figure it out!

    As I say, when I've got my multiple-play code tested properly I'll upload it somewhere, hopefully through Mike...

    D

    to beard or not to beard, that is the question
  • I'm trying to run iPodScrobbler on Ubuntu 7.04. I did this in a terminal:iPodScrobbler.py -u pdedecker -p SOMETHING "/media/PIETER'S NA"But then I got this error:Error: Could not find iTunesDB and Play Counts file on "/media/PIETER'S NA".
    Maybe iTunes removed the Play Counts file. Please read the README.
    What do I do? I'm sure that my iPod is mounted on "/media/PIETER'S NA". There nothing wrong with my iTunesDB either; it's in "/media/PIETER'S NA/iPod_Control/iTunes" as usual. One more thing: I'm using an iPod Nano (1G) 4GB.

    • Jaggo said...
    • User
    • 24 May 2007, 13:50
    Hmm.

    Did ya make sure Play Counts file exists in the same directory as your iTunesDB file? Did ya let iTunes touch your iPod between mounting it and running the script?

  • > Did ya let iTunes touch your iPod between
    > mounting it and running the script?
    That's impossible, I'm on Linux.

    > Did ya make sure Play Counts file exists
    > in the same directory as your iTunesDB file?
    I found a file named "Play Counts.bak" in "/media/PIETER'S NA/iPod_Control/iTunes". Is that the file you need? If no, what can I do to fix this?

    • Jaggo said...
    • User
    • 26 May 2007, 21:48
    Having played a single song on my iPod there appeared a file named simply "Play Counts" - no extension. the .bak extension probably means some script or something created a backup of the original before trashing or changing it.
    On my case I know that iTunes deletes my Play Counts file on every sync.
    If you still have the original files you could try renaming play counts.bak into play counts and see what happens.
    Anyway, you should find out whatever it was that deleted your original play counts file and make it stop. I don't know enough about linux to advise you on how to do that.
    Good luck =]

  • pdedecker: could it just be that you haven't escaped the space in the path to your iPod? I always have to escape mine ("PIETER'S\ NA") - the same might apply to the apostrophe...

    Forgive me if you've already tried this or if the double-quoting does this by default.

    D

    to beard or not to beard, that is the question
  • dkhc said:
    I'm running iPodScrobbler on my Ubuntu Edgy machine and it works fine. One question; I wrote a little scripts that looks where my iPod is mounted, then uses iPodScrobbler to upload songs to last.fm, and in the end I remove the "Play Counts" file. I do that last step because I don't want to submit songs twice. Is this necessary or is there a flag somewhere that figures out when the last time was an upload was done?


    Currently it doesn't do that, this timestamp would have to be stored in a preferences file somewhere. If you remove the play counts file (iTunes does that when you start it), everything is fine.

    On the other hand this sounds like a nice feature, the script could check on last.fm when your last upload was and then use that timestamp to avoid duplicate uploads.
    I'll check that out.

    Check it out:
    - the Flavour Exchange for iPod users at http://flavox.hoc.net
    - iPodScrobbler at http://www.hoc.net/~mike/source/iPodScrobbler
  • pdedecker said:
    > Did ya let iTunes touch your iPod between
    > mounting it and running the script?
    That's impossible, I'm on Linux.

    > Did ya make sure Play Counts file exists
    > in the same directory as your iTunesDB file?
    I found a file named "Play Counts.bak" in "/media/PIETER'S NA/iPod_Control/iTunes". Is that the file you need? If no, what can I do to fix this?


    The play counts file is created by the iPod when you listen to tracks while being disconnected (from iTunes/your PC). So when you reconnect your iPod as a HD to your linux box, this file should be there (in iPod_Control/iTunes). The only explanation I have is that maybe some other kind of software accesses the iPod and renames it. Did you run anything manually? Or maybe Ubuntu does automatically?

    Check it out:
    - the Flavour Exchange for iPod users at http://flavox.hoc.net
    - iPodScrobbler at http://www.hoc.net/~mike/source/iPodScrobbler
  • kaneda42 said:

    Currently it doesn't do that, this timestamp would have to be stored in a preferences file somewhere. If you remove the play counts file (iTunes does that when you start it), everything is fine.

    On the other hand this sounds like a nice feature, the script could check on last.fm when your last upload was and then use that timestamp to avoid duplicate uploads.
    I'll check that out.


    I meant to say once it's submitted and I've made the code readable!

    D

    to beard or not to beard, that is the question
  • kaneda42 said:

    Currently it doesn't do that, this timestamp would have to be stored in a preferences file somewhere. If you remove the play counts file (iTunes does that when you start it), everything is fine.

    On the other hand this sounds like a nice feature, the script could check on last.fm when your last upload was and then use that timestamp to avoid duplicate uploads.
    I'll check that out.


    My version of the scrobbler that handles multiple plays does precisely this - I'll upload it when my thesis is submitted (next 10 days!)

    D

    to beard or not to beard, that is the question
  • On the website, my times are about 4 hours earlier than when I actually listened to them. Anyone know how to fix this?
    I have a video ipod and I'm using Terminal on a Mac

    • Jaggo said...
    • User
    • 26 Sep 2007, 13:09
    find the following 2 lines:
    # iPod date timestamps are number of seconds since 1.1.1904, set an offset for POSIX time (epoch)
    iPodDateOffset = long(-2082848400.0)

    Add the following line:
    iPodDateOffset = iPodDateOffset - 14400

    (The number is the number of seconds in 4 hours.)

    (Experiment with it a bit, it's possible that rather than subtracting 14400, you should add it to the iPodDateOffset.)

    hth,
    Jaggo.

  • Thank you very much!
    Yes, I needed to add rather than subtract.
    For those who need it here's the corrected code:
    iPodDateOffset = iPodDateOffset + 14400

  • Play Counts File

    Looks like iPodScrobbler.py doesn't delete the Play Count file after uploading the stats. Should that be done manually to prevent multiple submissions, considering that I use iTunes/gtkpod very rarely.

Anonymous users may not post messages. Please log in or create an account to post in the forums.