Kodi Community Forum

Full Version: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ok, I think I managed to get the same result as you guys. It seems like xbmc caches zip files somewhere. As soon as I renamed the zip file, it updated correctly.
Try downloading this one:
http://lastfmplaylistgenerator.googlecod...-1.0.3.zip
Hi ErlendSB,

While XBMC does now report the correct version of the addon, I keep getting pm.py script failed error when I try to run it...

Perhaps I didn't uninstall the old version fully enough...?
Let me have a look at your xbmc.log file or parts of it showing the error.
Did you download the last zip file? What platform are you on? (i've only tested it on windows - and paths might be a problem)
OK figured it out.

Didn't realize that the PM script depended on the standard last.fm Playlist generator script being installed. Reinstalled the standard version and now have 1.03 up and running beautifully Smile

Few points / questions:

1. There is a typo in the "do you want to exit partymode" dialogue. It says partmode instead of partymode.

2. Is the playlist generation based on file name or tags? My library's tags are organised meticulously; filenames not so much Smile

3. Would it be possible for the toggle status to default to "on" status rather than off each time XBMC restarts? (Or just remember last status).

Thanks so much! Don;t know if you changed anything else but the script seems to be responding much more snappily now too Smile Love it!
I was having a look at your code Erlend as I wanted to see if I could contribute. Here's a couple of enhancements I have thought of trying to implement, but perhaps you can do it quicker than me (I have very little coding skill!):

1) Make the number of tracks to add configurable
2) Make the added tracks a bit more configurable.

For point 2 - last.fm returns a <match> tag in the xml. This is a value from 0 to 1 of the similarity between tracks. Values below 0.2 usually are from different artists. You could have a setting to 'prefer different artist' in the plugin.

EDIT: Just tried your new version with 'Random' added tracks - seems to be doing a very nice job on its own. I'd just like to see number 1 now Smile

EDIT2: Just to let you know. I have to change pm.py line 24 from id='script.lastfmplaylistgenerator' to id='script.lastfmplaylistgeneratorPM' otherwise I get script failed error. I think this is why it is failing unless you have the other version installed as it is looking for the settings for that version of the plugin.

EDIT3: There is something weird going on. I'm using reFocus as my skin. Tracks that are added via this script are not showing the artist fanart when they are playing in the MusicVisualization screen.
mortstar Wrote:EDIT3: There is something weird going on. I'm using reFocus as my skin. Tracks that are added via this script are not showing the artist fanart when they are playing in the MusicVisualization screen.

Yeah, noticed that too. I'm using Transparency so it's likely not related to the skin.

ErlendSB Wrote:I have not seen results from the files selection. The selected tracks are picked from the database, where i believe only library tracks reside?! Maybe you need to clean the music database. The tracks are added to the playlist through their path name, so I guess it could also be missing/corrupt mp3 tags.

I really believe my files are nicely tagged. This could be related to the fanart thingy above or not.

Could you or anyone try this please to see if you get the same results: Start Partymode, play a song, stay in the now playing screen (this is important), pick other song from the list (hit enter on that song), so that the script generates more and more songs. Do that repeatedly so that the list gets fuller. Don't the names of the songs change to the paths of that particular songs every once in a while (maybe when a new song is added?) in the now playing screen?

Using one the remotes on my android phone or ipod touch will show the now playing list either empty or with the paths of the song but not just the names of the track like "normal" playlists.

There seems to be some wrong connection between the generated playlist and the database.

By the way, updating worked with the renamed file. Brillant work on the now really random song selection.

I get a script error on the autoexec.py after a restart however and I'm asked whether I want to exit partymode when I restart the script after a restart.

Edit: Did not get the script error after another start. Odd, will keep an eye on that.

Anyway here's a debug log with me fiddling around with party mode and the "show the path instead of the name of the song" thing.

http://pastebin.ca/2056404
Quote:EDIT3: There is something weird going on. I'm using reFocus as my skin. Tracks that are added via this script are not showing the artist fanart when they are playing in the MusicVisualization screen.

I have seen this too. I asked about it here: http://forum.xbmc.org/showthread.php?tid=98536
I need expert help to fix that one Wink

Quote:Could you or anyone try this please to see if you get the same results: Start Partymode, play a song, stay in the now playing screen (this is important), pick other song from the list (hit enter on that song), so that the script generates more and more songs. Do that repeatedly so that the list gets fuller. Don't the names of the songs change to the paths of that particular songs every once in a while (maybe when a new song is added?) in the now playing screen?
I see it too. I must be because of the way tracks are added to the playlist (via their file paths). There might be another way of doing it. I'll do some research.


EDIT 1:
Quote:EDIT2: Just to let you know. I have to change pm.py line 24 from id='script.lastfmplaylistgenerator' to id='script.lastfmplaylistgeneratorPM' otherwise I get script failed error. I think this is why it is failing unless you have the other version installed as it is looking for the settings for that version of the plugin.
Thanks for that. Fix has been commited.

-E
ErlendSB Wrote:I have seen this too. I asked about it here: http://forum.xbmc.org/showthread.php?tid=98536
I need expert help to fix that one Wink
-E

Have you considered bumping that thread or opening a ticket on trac? Just sayin' after a month with no reply.
I'm now a bit closer to enlightenment Smile

It seems, according to Ronie, that music is queued in filemode when done via an addon/plugin/script through the xbmc api.

So, to fix the fanart/metadata problem, I'll need to find a way to queue music in librarymode. This might be difficult, so don't expect a quick fix. Wink
Does the party mode script keep adding new tracks just based upon the first song selected? Or does it select three from the first song, and then start fresh selecting three new ones from the last song played?

The reason I ask is that despite having a large library, If i start the script twice on a single slightly obscure song the resulting playlist is almost identical both times, even once I get to the 12th song. If started on a well known song then the resulting playlist changes every time.

It would seem more fun to me if the next three tracks were always based on the last song played, not on the originally selected song. Perhaps that's the way it already is and I've just been getting some funky results?

Anyway - I have been enjoying this script so much so thanks again Smile
Every time a new song starts playing, the script asks last.fm for similar tracks based on the song that it started palying. But it might be that last.fm returns the same result every time for the same song.

I do not do any randomization of the result coming from last.fm. That might be a good idea though. I'll see what I can do about it Smile
ErlendSB Wrote:Every time a new song starts playing, the script asks last.fm for similar tracks based on the song that it started palying. But it might be that last.fm returns the same result every time for the same song.

Sorry if I'm being thick, but do you mean that i keeps querying last.fm based on the originally chosen song?

If so, what would you think about adding the option to requery last.fm based on the track that was just played instead? That way you could go on a fun musical journey and perhaps gradually end up somewhere pleasantly unexpected!

Quote:I do not do any randomization of the result coming from last.fm. That might be a good idea though. I'll see what I can do about it Smile

I think that would make a massive difference. Thanks so much Smile
I though I was being vague. Smile
Tracks are NOT added based on the originally chosen track. It DOES add tracks based on the just playing song.
Cool, thanks Smile

In that case the total randomisation of all results from last.fm would be all the more necessary if possible. Good luck and thanks again Smile
Isn't the whole purpose of the script to generate a playlist with similar tracks and not totally random tracks?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20