Jump to content


last.fm addon gone?

last.fm lastfm addon server update bug api

  • Please log in to reply
115 replies to this topic

#61 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 01 August 2016 - 01:19 AM

MrSmoke said he was going to take a look at it so we'll see what he comes up with. Maybe one of you guys can try nudging him with a PM.



#62 wayneward OFFLINE  

wayneward

    Advanced Member

  • Members
  • 50 posts
  • Local time: 05:39 PM

Posted 01 August 2016 - 06:51 AM

Ill try, i think he nearly had it sorted 

Ive given up hope now :( i love my emby just need to get it scrobbling again with music so i can use the music side instead on clementine ! :(



#63 wayneward OFFLINE  

wayneward

    Advanced Member

  • Members
  • 50 posts
  • Local time: 05:39 PM

Posted 16 August 2016 - 09:04 AM

still no news folks

does anybody know were we could get this sorted and all club in maybe

i dont mind paying say £5 any body else

we could find a coder on line maybe ?

 

any thoughts guys ?...



#64 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 16 August 2016 - 10:10 AM

Try sending MrSmoke a PM again.



#65 Symphony OFFLINE  

Symphony

    Newbie

  • Members
  • 6 posts
  • Local time: 03:39 AM

Posted 17 August 2016 - 03:10 AM

Hi All,

 

Been a long time lurker on these boards but came across this thread and thought I'd join up and offer to take a look at this plugin. 

You will have to forgive me as I had never even heard of Last.fm (let alone used it) before this thread but I'm willing to give it a go.

 

Sven was spot on in his post that the issue appears to be that the plugin is calling the 'Library.GetTracks' method, which no longer appears to exist on Last.fm API.

 

The only Library method that exists on the API now, it appears, is the 'Library.GetArtists' method, which returns the following:

"A paginated list of all the artists in a user's library, with play counts and tag counts"

 

Unfortunately track information isn't included in the results, so it would require another call to another method. Unfortunately there doesn't appear to be one. The only remotely close method I could see was:

 

'User.GetArtistTracks':

"Get a list of tracks by a given artist scrobbled by this user, including scrobble time. Can be limited to specific timeranges, defaults to all time."

 

As I've never used this site, or 'scrobbled', can anyone confirm if this sounds correct or are 'scrobbled' tracks different to those which would be contained in a user's library?



#66 wayneward OFFLINE  

wayneward

    Advanced Member

  • Members
  • 50 posts
  • Local time: 05:39 PM

Posted 17 August 2016 - 10:36 AM

well thank you i really hope you can sort it

we are ever so grateful!

now im not sure

 

all i know is that i play a song on the emby from the collection this then must look up the song on last fm to verify it

then that tells last fm i played that song by that artist at that time

so last fm keeps the stats it can recomend other artists that are similar or other users that have similair taste

im certain the emby plugin just tells last fm the track and artist and it also might have sent the like track feature

so if you clicked the love heart it would indicate on last fm if you really like it?! but im not sure that part is that important

just the track arist and time sent to it

 

does that help or not?

 

again thank you - come on guys help!! .. feedback on the question please !..

Wayne :)



#67 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 17 August 2016 - 12:07 PM

It sounds like maybe you're starting from the beginning? I think the existing plugin can be used as a starting point, so it's probably more on the last.fm side where we need to find out what the issues are.



#68 Symphony OFFLINE  

Symphony

    Newbie

  • Members
  • 6 posts
  • Local time: 03:39 AM

Posted 17 August 2016 - 04:10 PM

It sounds like maybe you're starting from the beginning? I think the existing plugin can be used as a starting point, so it's probably more on the last.fm side where we need to find out what the issues are.

 

Apologies, I was talking about the existing plugin. The issue appears to be that the plugin is calling web service endpoints that don't exist anymore and their doesn't appear to be any replacement for them on the Last.fm side.



#69 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 17 August 2016 - 04:13 PM

Which endpoints?



#70 Symphony OFFLINE  

Symphony

    Newbie

  • Members
  • 6 posts
  • Local time: 03:39 AM

Posted 17 August 2016 - 09:39 PM

Thanks for the reply Luke, I thought I would just run through what I've found so far and clarify a bit better :)
 
I spent an hour with the code this morning and it appears, from what I can tell, the plugin is broken down into, four pieces of functionality: 
 
1) Update now playing song on Last.Fm
 
Using the PlayBackProgress event, the plugin makes a call to the 'track.UpdateNowPlaying' endpoint on last.fm and displays songs you are currently listening to
 
2) Scrobble track
 
Using the PlaybackStop event, the plugin 'scrobbles' the track to last.fm, but ONLY on the songs completion (songs that do not complete playing are not scrobbled), using the 'track.Scrobble' endpoint
 
3) Update favourites/ratings
 
Using the UserDataSaved event, the plugin will update song ratings/favourites using the Last.fm 'track.Love' and 'track.UnLove' enpoints
 
4) Sync last.fm library to emby
 
A scheduled task that runs to sync play counts and favourites/loves to emby
 
 
After some testing I can confirm that I can successfully connect to a last.fm account with the plugin and it appears that features 1 and 2 above are working correctly, I could see now playing songs under 'Profile' in Last.fm and could see tracks in my 'Recent Tracks'.Unfortunately I haven't tested 3 yet, but I daresay it should be fine as well.
 
The issue in the plugin seems to be with the scheduled task as it is using a Last.FM web service endpoint that does not exist any more: 'Library.GetTracks'. The only way I can see to return tracks is to get a list of the artists in the library using 'Library.GetArtists' and then make a call for each artist to the 'User.GetTracks', but unfortunately the response doesn't seem to contain any of the required information to update emby (i.e. Playcounts, Favourite etc)
 
I've only spent a brief bit of a time on this but the quickest solution appears to be to remove the sync functionality from the plugin and continue to use the plugin purely to send 'Now Playing' and scrobbled tracks to Last.FM and not retrieve any playcounts / favourite information back to emby.
 
Again, as I don't use last.fm so I'm not sure if the plugin is even worth it without the ability to sync back to emby but I'd be happy to go ahead with it if anyone would still find it of use.

  • Xzener, FinnWest and kcprophecy like this

#71 kcprophecy OFFLINE  

kcprophecy

    Member

  • Members
  • 17 posts

Posted 17 August 2016 - 09:47 PM

Symphony awesome job, been keeping an eye on this one and glad to see you're looking at it and appear to have restored the primary function of it, scrobbling. I'd be pretty happy without #4.



#72 Symphony OFFLINE  

Symphony

    Newbie

  • Members
  • 6 posts
  • Local time: 03:39 AM

Posted 18 August 2016 - 03:00 AM

Okay, so I've pulled out the scheduled task class and done some more testing and everything seems to be working:

 

57b55b0b74951_Capture.jpg

Would someone else be willing to test and confirm it's working for them as well? Not sure if it's allowed but I have attached the dll (happy to remove if it's against the rules).

 

Just to clarify, without the scheduled task the scrobbling/syncing will be one way only, from Emby to Last.fm. The scheduled task was iterating through the last.fm library and updating the emby library with the play counts etc, this will no longer work.

 

In the end all I have done is pull out the scheduled task class with the failing web service call, the Scrobbling, Now Playing and Favouriting/Loved is 'as is' and seems to be working fine, so I'm keen to have a second person confirm.

Attached Files


Edited by Symphony, 18 August 2016 - 03:01 AM.

  • ebr, FinnWest and kcprophecy like this

#73 wayneward OFFLINE  

wayneward

    Advanced Member

  • Members
  • 50 posts
  • Local time: 05:39 PM

Posted 18 August 2016 - 03:45 AM

yes i just tested it scrobbles again!!

thank you so much :)

if you make a dontaion page ill fire a donation for your time 

i guess a few other people on here might as well!!!!!! :)



#74 wayneward OFFLINE  

wayneward

    Advanced Member

  • Members
  • 50 posts
  • Local time: 05:39 PM

Posted 18 August 2016 - 05:23 AM

http://wayneward.co....last-fm-plugin/


  • FinnWest likes this

#75 kcprophecy OFFLINE  

kcprophecy

    Member

  • Members
  • 17 posts

Posted 18 August 2016 - 09:46 AM

Sweet working good, thanks a lot!



#76 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 18 August 2016 - 10:22 AM

Well done!

#77 haudankaivajasi OFFLINE  

haudankaivajasi

    Newbie

  • Members
  • 6 posts
  • Local time: 07:39 PM

Posted 21 August 2016 - 10:58 AM

Great job! 

 

Somehow this is not working with my set up :o

I unzipped the contents (the .dll-file) to my QNAP location "/share/CACHEDEV1_DATA/.qpkg/Emby/Emby/ProgramData-Server/plugins" , or atleast I think this is the right location. I restarted the emby server and now this plugin is visible in the plugins-tab and I am able to set my last.fm login details, but for some reason it won't scrobble :o

 

Any ideas for this problem?

 

Edit: The connection seems to be working because when I click the favorite button on Emby, it updates instantly to my last.fm page :o no scrobbling though


Edited by haudankaivajasi, 21 August 2016 - 12:01 PM.


#78 Deliah Blue OFFLINE  

Deliah Blue

    Newbie

  • Members
  • 3 posts
  • Local time: 03:39 AM

Posted 22 August 2016 - 04:47 PM

Edit: The connection seems to be working because when I click the favorite button on Emby, it updates instantly to my last.fm page :o no scrobbling though

are you letting the songs complete in Emby before checking last.fm?

Edited by Deliah Blue, 22 August 2016 - 04:51 PM.


#79 haudankaivajasi OFFLINE  

haudankaivajasi

    Newbie

  • Members
  • 6 posts
  • Local time: 07:39 PM

Posted 22 August 2016 - 07:03 PM

Yeah, played some albums from start to finish but still nothing. Refreshed the last.fm page after the whole album.


Edited by haudankaivajasi, 22 August 2016 - 07:04 PM.


#80 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 94779 posts
  • Local time: 01:39 PM

Posted 22 August 2016 - 07:39 PM

Yeah, played some albums from start to finish but still nothing. Refreshed the last.fm page after the whole album.

 

Please make sure to provide the information requested in how to report a problem. That should help him see what's going on. Thanks!







Also tagged with one or more of these keywords: last.fm, lastfm, addon, server, update, bug, api

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users