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


- lodder - 2011-06-12

thx it works now


- ErlendSB - 2011-06-12

DarkHelmet Wrote:Okay, something weird was happening here. I deinstalled both scripts (normal and party mode), because I thought I could install them both fresh from the repository. However only the party mode script is available on the repo. So I installed that and installed the normal version from your google code page. Now I get "no similar tracks were found" for every song in party mode. I now have party mode version 1.05 installed and normal version 1.01.

I suggest you upload both scripts to the repo and make it clear that the party mode needs the normal script.

A restart solved the issue, yet still this could lead to frustration by new users.

The normal script should not be needed for the partymode script to work. They are separate standalone addons. There might have been an issue before, when the partymode version used the settings from the normal version, but this should be fixed now.

If someone´s still using the normal version (playlist), I´m sure it can be added to the repo as well. But I probably won´t do any more work on it.


- TeknoJnky - 2011-06-13

ErlendSB Wrote:If you don´t mind, I´d like to implement some of the features you have into my addon. Especially some of the settings you have.

sure, thanks for asking


- DarkHelmet - 2011-06-15

I'm using 1.05 of the party mode script on xbmc 10.1 on Vista Home. For me the missing fanart bug in the playlist has returned. Also in the playlist the names of the songs are usually displayed like this "track number. artist - track name", which is great. Now and then this changes to just the track name and then back again. Maybe when a new song gets added to the list?


- ErlendSB - 2011-06-15

Hmm. I didn't change the fanart part. It's working at this end. Whenever there exists fanart for the artist that is. Are you using a pre-eden nightly build by any chance?

The flickering you mention is caused by the script having to refresh itself after adding new songs, as you said. I haven't found any other way of updating the listing than refreshing the whole window/container. I'll keep it in mind.


- ErlendSB - 2011-06-27

DarkHelmet Wrote:I'm using 1.05 of the party mode script on xbmc 10.1 on Vista Home. For me the missing fanart bug in the playlist has returned. Also in the playlist the names of the songs are usually displayed like this "track number. artist - track name", which is great. Now and then this changes to just the track name and then back again. Maybe when a new song gets added to the list?

In 1.0.7 I've changed he way playlistitems appear. Instead of just adding a track by its path, I now add metadata to the listitem.
At the moment I've added TrackTitle, Artist and Album along with fanart and a thumbnail.

I'm not sure if this solves the refresh "problem", but it should make the result look more consistent. (hopefully no more pathnames to the mp3 file)

If there's something I've missed, let me know. I will soon be adding tracks duration as I just saw this myself.


- kiboy6 - 2011-07-01

Hi Erlend

1.07 is working beautifully - really like all the settings available now.

One observation: the script seems a lot more "fussy" when sending song info to last.fm than it is in receiving it and matching songs.

I'll try to explain what I mean.

Many times I try to start the script on a particular song, only to find "no matching songs were found". However these are often reasonably popular songs that then would play later as a matched result for a now playing song.

It seems as though any song suggestions generated by last.fm find matches easily in the XBMC library, but song info sent from XBMC will not always find a match at the last.fm end...

Have you noticed this too?

(All my files are named / tagged fairly meticulously)

Thanks!


- ErlendSB - 2011-07-01

I haven't noticed this myself, but I suspect it can occur if the trackname or artist contains special characters. Do you have an example?


- RockDawg - 2011-07-11

Does this work with mysql libraries? I ask because when I run the addon and then play a song it plays for a couple seconds and then XBMC reboots. It's right about the time that it should some songs to the playlist. I was wondering if the fact that I use mysql could be the problem.


- RockDawg - 2011-07-12

Today I tried this addon on my Windows box and it didn't reboot the system, but it can't find a match for any artist I try. I've tried Diana Ross, Journey, AC/DC, Adele, Saliva. Any ideas?


- ErlendSB - 2011-07-15

I query the music database via the QueryMusicDatabase httpapi, so if this api can work with mysql, it should work. I guess the tables and views in the databases (sqlite and mysql) are the same?! I have not tried using mysql myself, so I can't tell for sure.
Other than that, make sure you have imported all the song to the library, as this addon does not work in files mode only.


- kiboy6 - 2011-07-15

ErlendSB Wrote:I haven't noticed this myself, but I suspect it can occur if the trackname or artist contains special characters. Do you have an example?

Sorry for taking so long to get back to you on this.

I think the issue may just be that there are many songs that surprisingly have no "people who listen to this also like" results on last.fm.

eg. Indestructible by Robyn

Is there anything clever you could do for songs like this? Perhaps just base it on the artist somehow, maybe by using results from another song of theirs that does have results.


One other small bug I think I've found in the script:

After the "no similar tracks were found" I believe the script becomes inactive until quit and restarted.

Thanks so much - I still use this on a a daily basis Smile


- RockDawg - 2011-07-15

ErlendSB Wrote:I query the music database via the QueryMusicDatabase httpapi, so if this api can work with mysql, it should work. I guess the tables and views in the databases (sqlite and mysql) are the same?! I have not tried using mysql myself, so I can't tell for sure.
Other than that, make sure you have imported all the song to the library, as this addon does not work in files mode only.

I was working from within the library. It looks like it may be related to the mysql. As a test, I disabled the mysql db, ansd scanned some folders into the nomal sqlite db and the script seemed to work fine.

What a bummer because I was so jazzed to find this addon as it's exactly what I'm wanting. But alas, no joy. Anyways, kudos and a great job on this addon. It seems like it would be really sweet.


- RockDawg - 2011-07-16

I did some more testing, and the script definitley doesn't work with mysql db. It never finds a match in the library. I guessing the the query syntax is different between sqlite and mysql? Anyway here is a snippet from my log:

Code:
20:56:19 T:5260 M:1476464640   DEBUG: HttpApi Start command: setresponseformat  paras: setresponseformat; openRecordSet;<recordset>;closeRecordSet;</recordset>;openRecord;<record>;closeRecord;</record>;openField;<field>;closeField;</field>
20:56:19 T:3132 M:1476464640  NOTICE: Count: 250
20:56:19 T:5260 M:1476464640   DEBUG: HttpApi Start command: QueryMusicDatabase  paras: QueryMusicDatabase; select strTitle, strArtist, strAlbum, strPath, strFileName, strThumb, iDuration from songview where strTitle LIKE '%%Bad Company%%' and strArtist LIKE '%%Bad Company%%' order by random() limit 1
20:56:19 T:5260 M:1476464640   ERROR: SQL: Undefined MySQL error: Code (1305)
                                            Query: select strTitle, strArtist, strAlbum, strPath, strFileName, strThumb, iDuration from songview where strTitle LIKE 'Bad Company' and strArtist LIKE 'Bad Company' order by random() limit 1
20:56:19 T:5260 M:1476440064   ERROR: CMusicDatabase::GetArbitraryQuery(select strTitle, strArtist, strAlbum, strPath, strFileName, strThumb, iDuration from songview where strTitle LIKE '%Bad Company%' and strArtist LIKE '%Bad Company%' order by random() limit 1) failed
20:56:19 T:5260 M:1476435968   DEBUG: HttpApi Start command: QueryMusicDatabase  paras: QueryMusicDatabase; select strTitle, strArtist, strAlbum, strPath, strFileName, strThumb, iDuration from songview where strTitle LIKE '%%Ramble On%%' and strArtist LIKE '%%Led Zeppelin%%' order by random() limit 1
20:56:19 T:5260 M:1476435968   ERROR: SQL: Undefined MySQL error: Code (1305)

The query is repeated in the log many times with different artists.


- ErlendSB - 2011-07-16

Thanks for the log.
I suspect the syntax for random is different. If you could try modifying line 100 in pm.py from: order by random() to order by rand()
If this works, I´ll make some sql detection code Smile
PM me if you want me to send you a modified version