mopidy / mopidy-scrobbler

Mopidy extension for scrobbling played tracks to Last.fm
https://mopidy.com/ext/scrobbler/
Apache License 2.0
66 stars 14 forks source link

Scrobbled tracks not saving #20

Closed Firestorrrm closed 8 years ago

Firestorrrm commented 8 years ago

Whenever a track is playing, it shows on Last.FM, but it doesn't save when it's done playing. Is there any way to fix this?

wgslr commented 8 years ago

I have the same issue.

moon-musick commented 8 years ago

It seems I encountered a similar problem - the track is displayed as 'now playing', but only the last track of a playlist is saved.

I use mopidy exclusively with mopidy-spotify.

Software versions (everything from APT repository):

trygveaa commented 8 years ago

It seems like this is caused by https://github.com/mopidy/mopidy/issues/1456.

We can probably keep this open until that is fixed, and we have confirmed that it fixes this.

0nse commented 8 years ago

@trygveaa is right. @moon-musick, as a temporary fix, you can disable the time_position check:

diff --git mopidy_scrobbler/frontend.py.old mopidy_scrobbler/frontend.py
index 6a34d9e..cd47e82 100644
--- mopidy_scrobbler/frontend.py.old
+++ mopidy_scrobbler/frontend.py
@@ -57,14 +57,9 @@ class ScrobblerFrontend(pykka.ThreadingActor, CoreListener):
         track = tl_track.track
         artists = ', '.join(sorted([a.name for a in track.artists]))
         duration = track.length and track.length // 1000 or 0
-        time_position = time_position // 1000
         if duration < 30:
             logger.debug('Track too short to scrobble. (30s)')
             return
-        if time_position < duration // 2 and time_position < 240:
-            logger.debug(
-                'Track not played long enough to scrobble. (50% or 240s)')
-            return
         if self.last_start_time is None:
             self.last_start_time = int(time.time()) - duration
         logger.debug('Scrobbling track: %s - %s', artists, track.name)
moon-musick commented 8 years ago

@0nse it works perfectly after I applied the fix, thank you!

ghost commented 8 years ago

that fix leads to fake scrobbles. the track gets scrobbled when you're trying to skip it.

jjok commented 8 years ago

@hubspek I think it's just meant as a workaround until the issue with Mopidy is fixed.

0nse commented 8 years ago

@hubspek it's not a fix but a temporary workaround. Look at the provided patch; it scrobbels everything disregarding of how long it has been played. If it were a fix, I would have issued a PR.

ghost commented 8 years ago

@jjok It's been called a fix by @0nse from the beginning and that's why I used the term. I know the difference.

And I stated a fact. That, whatever you call it, leads to FAKE scrobbles. That issue has been open for months now. You should keep focus on that rather than schooling ppl on insignificant details.

jjok commented 8 years ago

@hubspek I'm not sure what you mean. Your options are: