Kodi Community Forum
[RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
+---- Thread: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists (/showthread.php?tid=83915)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - ErlendSB - 2013-01-29

I thought the required modules would be downloaded by xbmc automatically upon start.
I have no knowledge of OpenElec, but it might work differently there.

Elementtree is used to parse the advancedsettings.xml for finding out what sql backend you are using. So if you are using mysql , missing this module might prevent the addon from working.

simplejson is required for communication with the new jsonRPC api (introduced with Frodo). Without this, the addon will not be able to search through your library for similar tracks.

pysqlite I believe is unnecessary when using mysql.

Which xbmc version is running on your OpenElec? For the addon to work, you should be on a pre-Frodo build. (preferably RC)
A link to a version fro Eden is a few posts back (1.0.8 I think)


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-29

(2013-01-29, 10:34)ErlendSB Wrote: I thought the required modules would be downloaded by xbmc automatically upon start.
script.module.pysqlite does not seem to be available on openelec, the rest of the dependencies are met:

Code:
10:05:12 T:3016083200   DEBUG: Addon script.lastfmplaylistgeneratorPM requires script.module.pysqlite version 2.5.6 which is not available

i guess it is now a built-in plugin as it is not available on http://mirrors.xbmc.org/addons/frodo/ either and therefore could be removed from the addons.xml?


(2013-01-29, 10:34)ErlendSB Wrote: Which xbmc version is running on your OpenElec? For the addon to work, you should be on a pre-Frodo build. (preferably RC)
openelec 2.99.2 == frodo rc3




RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-29

when removing the pysqlite requirement, it is installable.

but then again, it does not really work: it always reports "no similar tracks found", although the logfile clearly shows differently:

Code:
10:29:36 T:2688547648  NOTICE: [LFM PLG(PM)] onPlayBackStarted waiting:  2 seconds
10:29:38 T:2641251136  NOTICE: [LFM PLG(PM)] onPlayBackStarted started
10:29:38 T:2641251136  NOTICE: [LFM PLG(PM)] Mind Heist started playing
10:29:40 T:2641251136  NOTICE: [LFM PLG(PM)] Count: 250
10:29:40 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Dream Is Collapsing by: [u'Hans Zimmer']
10:29:40 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Earth to Asgard by: [u'Patrick Doyle']
10:29:41 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Adagio for TRON by: [u'Daft Punk']
10:29:41 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Chateau by: [u'Rob Dougan']
10:29:42 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Overture by: [u'Daft Punk']
10:29:43 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Tania (End Credits) by: [u'James Horner']
10:29:43 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Immigrant Song by: [u'Karen O with Trent Reznor and Atticus Ross']
10:29:43 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Optimus by: [u'Steve Jablonsky']
10:29:45 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Quartermaster by: [u'Thomas Newman']
10:29:45 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Clubbed to Death 2 by: [u'Rob Dougan']
10:29:46 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Autobots by: [u'Steve Jablonsky']
10:29:47 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Prologue by: [u'Patrick Doyle']
10:29:48 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Winter: Lux Aeterna by: [u'Clint Mansell feat. Kronos Quartet']
10:29:50 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Hovercraft Chase by: [u'David Arnold']
10:29:51 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Main Title by: [u'Don Davis']
10:29:51 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Half Remembered Dream by: [u'Hans Zimmer']
10:29:51 T:2641251136  NOTICE: [LFM PLG(PM)] Found: Wrong Floor by: [u'Cliff Martinez']
10:29:55 T:2641251136  NOTICE: [LFM PLG(PM)] None found
so while it did find matching songs in my library, it also reports "none found"


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - ErlendSB - 2013-01-29

Hmmm.
Have you been into the addon settings?
If not, try setting "Allow same track to play more than once" to true, and "Prefer different artist" to false

Edit: I think I found a bug. Something must have gone wrong with the last merge. A boolean conversion was fixed earlier, but is now back. I'll push out a new version soon


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-29

cheers, looking forward to it


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - ErlendSB - 2013-01-29

If you want to check if it works, you can make the following changes to pm.py (lines: 142 and 143):
Change all "true" -> 1
and "false" -> 0



RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-29

actually, "true" and "false" are correct - it's a string value and not parsed to integer at this code location:

Code:
<settings>
    <setting id="allowtrackrepeat" value="false" />
    <setting id="delaybeforesearching" value="0" />
    <setting id="limitlastfmresult" value="2" />
    <setting id="numberoftrackstoadd" value="1" />
    <setting id="preferdifferentartist" value="false" />
</settings>

but it seems that if you install the addon with never visiting/saving the settings, the values are set to 0 and therefore the conditions to add the song are never met. to reproduce, delete the settings.xml in your userdata/addon_data/script.lastfmplaylistgeneratorPM folder

there's no need to test the parameters for both "true" and "false" in each of the two if-clauses in lines 142/143, therefore the problem can be easily circumvented. i sent you a pull-request:
https://github.com/mortstar/repository-mortstar-addons/pull/6




RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-29

i already love this addon, thanks alot! Smile

is there a reason it is currently a "programm addon" instead of a "music addon"? the later would IMO be the more obvious place for it...


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - ErlendSB - 2013-01-30

@heldchen: Thanks for helping out! Hopefully Mortstar will be able to do the merge. I'm having some trouble with git at the moment.

It started out as a script-plugin(which later became program addon) back in the days, when there was no such thing as a music addon. Now though, I agree, it should be a music addon.
Anyone who knows how to change it? Hopefully just a tweak to the addon.xml



RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-30

as you guessed correctly, it's a simple change in the addon.xml to have the plugin show under the Music section. i've updated the pull-requestion on github accordingly.


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - Reefermadness - 2013-01-30

Just read through your dialog with a smile, because it was pretty much what i found out myself now, and just went online to let people here know. So thx for your work, i really appreciate it. I will have time next week to play around a bit, i want to make this the "app" apple always wanted to make out of genius Smile


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - mortstar - 2013-01-31

Pulled changes in Git and updated the repo. Users of this plugin will now find it in the Music Addons section.

(2013-01-30, 22:36)Reefermadness Wrote: Just read through your dialog with a smile, because it was pretty much what i found out myself now, and just went online to let people here know. So thx for your work, i really appreciate it. I will have time next week to play around a bit, i want to make this the "app" apple always wanted to make out of genius Smile

This sounds promising....here's a couple of thoughts on how this could be a killer plugin:

- Change to a service structure so that the plugin can monitor when music is played from library and (optionally) automatically start creating a playlist
- Expose enabling of the plugin to skins, so that a GUI button can be added to begin 'playlist generation' from current song in, e.g. OSD of Music Visualisation screen or mapped directly to a remote button.

Finally - Erlend do you want to contact a mod to get this thread moved to the music section? I think there would be a lot of interest in this plugin and some people may be missing it here in the Programs section.




RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - ErlendSB - 2013-01-31

Great!

I asked Ronie to move this thread into the Music addons subforum.

Mortstar: I agree, these points should be on the top of our todo list.


RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - heldchen - 2013-01-31

some suggestions i'd love to see:
  • add context menu entry on song/album/artist: "Use as starting point in LFM PG"
  • when starting the plugin, instead of just emitting the message "Play a song to start", switch to the music library. saves a click or two :-)
  • when the plugin is running, and i'm starting it again, change the dialog to something like "LFM PG is already running [Switch to Now Playing] [Stop Generator]"... depending on the skin, i often have a hard time finding the "now playing"-playlist (i'm looking at you, xeebo skin!)
  • when more than x matching songs found, add those with higher ratings
  • when there were no (viable) matches and the current item is the last one in the list, do the following to prevent playlist starving:
    • pick a match that was discarded in a previous search due to too many matches
    • - or - add song anyway if discarding reason was a setting like "prevent same song"
    • - or - pick a random entry from the library



RE: [RELEASE] Last.FM Playlist Generator Script - Auto Generate Similar Music Playlists - Reefermadness - 2013-02-01

Ok, for a Start, the Update from with the Add-On's Menu went smoothly, it moved to the Music Section, has no further dependency Problems and works like a charm - Thx4that, the Time2Market was really quick Wink

For all the Feature Requests - i am not to familiar with github, but is there any possibility to set up an feature/Bug Request List like in Trac ? I think if we really want to work on this add-on, we should start maintaining it properly Smile

Next Question - should/Do we want to Rename it and give it "cool" Logo ? I think of something more catchy than "Last.fm Playlist Generator" - and Closer to Apples "Genius" to get more people to look at it and get a bigger Community to support our "Dreams" ?

Should we maybe start a new "sticky" Thread - Beginning with a clean explaination of what the History was (the Idea came from), what the Status Quo is now, and what our plans for the Future are ? Smile

Many Thoughts...