MuxScrobbler

By digitalspaghetti Last update Jun 8, 2008 — Installed 770 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 13 posts, 7 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
GeekShadow Scriptwright

This script work well with OpenTape !

 
jstn User

Muxtape now supports Last.fm natively!

 
casperbp Scriptwright

Muxtape has changed their CSS-layout. The class names of the song-container has changed from "songs" to "stripes" and the songs themselves from "song" to "stripe". The jQuery-queries should be changed to look for these new class-names to make the script functional again. Cheers. :)

 
digitalspagh... Script's Author

Thanks very much for these fixes casperbp, and thanks for the blog post too! I've added your fixes to the file.

 
casperbp Scriptwright

Nice script!

I had a problem where I got my track submitted twice or even up to 5 times. I changed the interval to 10 seconds instead of 5 and added a return statement after setting lastid to currentid:

...
            onload: function(responseDetails) {
              muxscrobbler.vars.sendresponse = responseDetails.responseText.split('\n');
              if (muxscrobbler.vars.sendresponse[0] == 'OK') {
                muxscrobbler.vars.lastid = muxscrobbler.vars.currentid
                el.append('Your song has been scrobbled.');
		return;
              } else {
                throw Error('Unable to scrobble Song');
                el.append('Unable to scrobble song.');
              }
            }
...

Don't know which of the two did the trick, but I don't get multiple submissions per track any longer. I am running Firefox 2.0.0.14 @ Ubuntu 7.10.

Another small problem I had was when playing tracks with ampersand (&) in the track- or artist-name. Instead of splitting by spaces and joining by '%20', I simply used javascripts escape()-function to URL-escape the track- and artist-name:

...
        muxscrobbler.vars.track = el.find('.name').text()
        muxscrobbler.vars.track = muxscrobbler.vars.track.split("\n").join("");
        muxscrobbler.vars.track = muxscrobbler.vars.track.split("-")
        muxscrobbler.vars.currentartists = Trim(muxscrobbler.vars.track[0]);
        muxscrobbler.vars.currentsong = Trim(muxscrobbler.vars.track[1]);
        muxscrobbler.vars.currentartists = escape(muxscrobbler.vars.currentartists);
        muxscrobbler.vars.currentsong = escape(muxscrobbler.vars.currentsong);
        
...

Apart from that the script works wonders. :-)

 
Dan1el User

OK I tried to edit the script and change the prompt sequence to my own password and it still doesn't work. I'm no expert on programming so I may be doing any stupid thing, but I think it is not running the script from the beggining. It works fine on Firefox, but I like Safari better, I downloaded GreaseKit for Safari and I think the problem may be in there. Thanks...

 
jongam User

Dan1el, try editing the script and add your username and password manually.

 
Dan1el User

Does it work on Leopard?
I'm using a Muxtape standalone player I downloaded from the muxtape blog. It has the Userscripts menu and the script shows as installed, but nothing else happens...

 
jongam User

This was from XP, Firefox 2, EST.

 
digitalspagh... Script's Author

@jongam - Very weird, the script should be getting UTC time and passing this. I'm not able to confirm this.

Can you tell me what OS your on, and your Timezone, that would be great!

 
jongam User

On second look, it looks as though it's telling last.fm that I listened (will listen?) to the tracks in the future. For example "in 59 minutes" opposed to "2 minutes ago". Seems to be about an hour into the future for all songs. An hour plus the song length possibly? I know it's still in alpha, just making sure you know about this particular issue.

 
jongam User

Works great so far. Thank you so much for this script. I've been hoping for a last.fm/muxtape solution ever since I first used muxtape.