This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Back-sync from last.fm to Amarok

Tags: None
(comma "," separated)
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS

Back-sync from last.fm to Amarok

Wed Oct 09, 2013 11:49 pm
Hi,

I've been trying to work out a way to keep my playcounts and last-played date synchronised on Amarok when I play a song on my Android phone. I thought that using last.fm would be an easy way that doesn't require manual connection of my device to the computer.

However, it seems that the back-sync only triggers if the last.fm playcount is higher than the Amarok playcount. This is not always true. Hence, if Amarok's playcount is 10, and last.fm's playcount is 1, I will play a song on my phone, and the last.fm playcount will increase to 2. It seems that Amarok won't care about this, until I've played it past the playcount of Amarok.

I guess this is technically true synchronisation (from Amarok's perspective), but is there a way for Amarok to see the difference in plays from the last last.fm "sync" and increase the playcount accordingly? Otherwise, I'm happy to increase the playcount in last.fm for this example track to 10 manually, via a batch scrobble, but I'm not sure if this is possible.

I can also imagine this would be a problem if one had been using Amarok for a while, and then created a new last.fm account. Almost no synchronisation would occur then!

==EDIT==
Also, it seems like last-played date doesn't update in Amarok.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Which exact Amarok version is this about?


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
Mamarok wrote:Which exact Amarok version is this about?


2.8.0
User avatar
strohel
KDE Developer
Posts
54
Karma
0
OS
sparhawk wrote:it seems that the back-sync only triggers if the last.fm playcount is higher than the Amarok playcount. This is not always true. Hence, if Amarok's playcount is 10, and last.fm's playcount is 1, I will play a song on my phone, and the last.fm playcount will increase to 2. It seems that Amarok won't care about this, until I've played it past the playcount of Amarok.

I guess this is technically true synchronisation (from Amarok's perspective), but is there a way for Amarok to see the difference in plays from the last last.fm "sync" and increase the playcount accordingly? Otherwise, I'm happy to increase the playcount in last.fm for this example track to 10 manually, via a batch scrobble, but I'm not sure if this is possible.
Yes, this is the case. I didn't want to implement "late scrobbling" in mainstream Amarok because there is a potential of accident double-scrobbles, Last.fm only allows to scrobble within 2 weeks in the past (interferes with last played time) etc. So yes, the current work-around is to batch-scrobble the tracks yourself.

I could imagine an Amarok script that would "late scrobble" the plays of tracks that have greater play count in Amarok than on Last.fm - however it seems that we don't have the needed scripting API interfaces even with this year's GSoC project to do it completely using Amarok methods.

sparhawk wrote:I can also imagine this would be a problem if one had been using Amarok for a while, and then created a new last.fm account. Almost no synchronisation would occur then!
Yes, unfortunately. Please do beg them!

sparhawk wrote:Also, it seems like last-played date doesn't update in Amarok.
This is because the lack of this information in Last.fm API. Specifically, their http://www.last.fm/api/show/library.getTracks method would need to be enhanced to include last played (and ideally also first played) time.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
strohel wrote:So yes, the current work-around is to batch-scrobble the tracks yourself.

Okay, this might be a possibility, but possibly not preferred (see below).


strohel wrote:
sparhawk wrote:I can also imagine this would be a problem if one had been using Amarok for a while, and then created a new last.fm account. Almost no synchronisation would occur then!
Yes, unfortunately. Please do beg them!

Sorry, I don't understand. Beg whom?


strohel wrote:
sparhawk wrote:Also, it seems like last-played date doesn't update in Amarok.
This is because the lack of this information in Last.fm API.

Ah, that's very unfortunate. Half of the purpose of synchronisation between Android player and computer/Amarok is so I can start albums "on the road" and finish them off via Amarok by looking for half-listened albums based on last-played date. Another reason is so I can organise my collection by last-played date and find things I haven't listened to for a while. Since it seems that last.fm cannot do this, could you recommend another option for fuller synchronisation?

I'm really trying to get back the behaviour of my old Mac and iPod from ten years ago. When I used to synchronise my iPod collection, iTunes would keep everything synchronised, including last-played, playcount, etc. Obviously I don't expect the same level of integration from Android and Amarok, but it'd be nice to have some kind of solution.
User avatar
strohel
KDE Developer
Posts
54
Karma
0
OS

Re: Back-sync from last.fm to Amarok

Fri Oct 11, 2013 12:39 pm
sparhawk wrote:
strohel wrote:
sparhawk wrote:I can also imagine this would be a problem if one had been using Amarok for a while, and then created a new last.fm account. Almost no synchronisation would occur then!
Yes, unfortunately. Please do beg them!
Sorry, I don't understand. Beg whom?
I'm sorry, this sentence should have been one paragraph lower, under Last.fm API omission.

sparhawk wrote:
strohel wrote:
sparhawk wrote:Also, it seems like last-played date doesn't update in Amarok.
This is because the lack of this information in Last.fm API.
Ah, that's very unfortunate. Half of the purpose of synchronisation between Android player and computer/Amarok is so I can start albums "on the road" and finish them off via Amarok by looking for half-listened albums based on last-played date. Another reason is so I can organise my collection by last-played date and find things I haven't listened to for a while. Since it seems that last.fm cannot do this, could you recommend another option for fuller synchronisation?
I decided to act, please help me convince Last.fm developers to add needed functionality: http://strohel.blogspot.com/2013/10/wan ... -lets.html - please vote & tell your friends.

sparhawk wrote:I'm really trying to get back the behaviour of my old Mac and iPod from ten years ago. When I used to synchronise my iPod collection, iTunes would keep everything synchronised, including last-played, playcount, etc. Obviously I don't expect the same level of integration from Android and Amarok, but it'd be nice to have some kind of solution.
In fact, iPods (those that are supported by libgpod: http://gtkpod.org/wiki/Home ) are best synchronization targets for Amarok - syncing play count, rating, last played time works great, it can even properly sync play count if you play the same song on both Amarok & iPod and it also scrobbles your iPod plays to Last.fm.

On the Android side: I've recently rewritten the collection, there is support for play count & last played time in the protocol, but it seems that few devices actually update the fields whey you play the tracks on the device. :-(
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS

Re: Back-sync from last.fm to Amarok

Fri Oct 11, 2013 10:43 pm
strohel wrote:I decided to act, please help me convince Last.fm developers to add needed functionality: http://strohel.blogspot.com/2013/10/wan ... -lets.html - please vote & tell your friends.

Thanks for that! I've voted! (Unfortunately I have about two friends that use Linux, and only one uses KDE.)

strohel wrote:In fact, iPods (those that are supported by libgpod: http://gtkpod.org/wiki/Home ) are best synchronization targets for Amarok

I'm not sure if this was a FYI, but I actually never use my iPod any more, since I have more than adequate storage on my Android phone.

strohel wrote:On the Android side: I've recently rewritten the collection, there is support for play count & last played time in the protocol, but it seems that few devices actually update the fields whey you play the tracks on the device. :-(

Bummer. I use "MortPlayer Music", which I'm pretty sure doesn't do any statistics at all, even internally. I like this app, because it's folder-based; most music apps are Artist-based, whereas my library is sorted by Album Artist instead. Anyway, there are certainly other alternatives, but would you know of any Android players that would work well with Amarok?
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS

Re: Back-sync from last.fm to Amarok

Sat Oct 19, 2013 12:36 am
sparhawk wrote:would you know of any Android players that would work well with Amarok?


Bump. I was wondering if you had any recommendations?
User avatar
strohel
KDE Developer
Posts
54
Karma
0
OS
sparhawk wrote:
sparhawk wrote:would you know of any Android players that would work well with Amarok?
Bump. I was wondering if you had any recommendations?
I don't know. I think it is more a question of the MTP stack on the Adroid device rather than the player you use (assuming it uses the generic API to tell what tracks it plays, which can be verified for example from the Last.fm app). There is a generic Google MTP stack, Samsung MTP stack and perhaps more.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]