rurza / NepTunes-Issues

This repository is only for issue tracking.
5 stars 0 forks source link

Not all tracks being scrobbled #49

Open splorp opened 6 years ago

splorp commented 6 years ago

I’m currently running the latest version of NepTunes (1.65) and iTunes 12.7. One track that I played on my Mac a couple of days ago scrobbled correctly, then I scrobbled several tracks via my iPhone. Today, three Pet Shop Boys tracks did not scrobble. See the attached screenshots to view the discrepancies. Note the difference between NepTunes’ recently played menu and the track listing on Last.fm.

Is there any way to enable logging on NepTunes to see what is actually happening when processing tracks?

ef57fd934a15223dcfec3c4542b0322a _screenshot 2018-03-04 14 37 02 f8f3d24cc595a883e8228aa18ee470de _screenshot 2018-03-04 14 25 15

rurza commented 6 years ago

Hey again :) First question: Are you sure, that tracks were played for at least 50% of their length? This menu is updating when track has changed :) So it doesn't mean that each track on the list was scrobbled :) Second question: NepTunes has special debug mode, which you can turn on and check what's happening. It's up to you :)

Debug mode: in Terminal.app (you can copy-paste code below) defaults write pl.micropixels.NepTunes debugMode YES

screen shot 2016-03-14 at 14 03 19

NepTunes will print everything it does in Console.app (both Terminal and Console are built-in applications) like on screenshot :

screen shot 2016-03-14 at 14 23 05

To turn off debug mode paste code below to the Terminal: defaults write pl.micropixels.NepTunes debugMode NO

splorp commented 6 years ago

First question: Are you sure, that tracks were played for at least 50% of their length?

Yes, all of those tracks were played through completed.

I currently have the scrobble track length percentage set to 90%.

NepTunes has special debug mode, which you can turn on and check what's happening.

I’ve turned on debug mode and have been monitoring what’s happening. This morning, NepTunes did not scrobble the first track I played (Bulletproof! (Original Boilerhouse Mix)), but the second, third, and fourth tracks were scrobbled correctly. (See attached log file.)

One thing I noticed in the log is that the “Timers invalidated” message appears each time I bump the track rating using my defined keyboard shortcut. You can see the multiple “Notification sent from Music Player” and “Timers invalidated” messages in a row. Could this have anything to do with it?

NepTunes_log_20180305.txt

rurza commented 5 years ago

Hey! Sorry for very, very late response :) So: There are two problems:

Unfortunately, when NepTunes is changing the rating, iTunes sends notifications that track changed. So my naive implementation thinks that you changed the track and invalidates timers. There are three solutions: 1) You can change the percentage back to 50% – this way each fully listened track will be scrobbled if you change the rating in the first or the second half of the track length. 2) I can make another naive implementation – I'll check for currently listening track and if they're the same – I won't invalidate the timers. This implementation has a one serious problem: if you pause the track, it will be scrobbled anyway unless you change the track to next one. I can check if the player is playing :) (Current version of iTunes doesn't send notification when the user pressed "previous" button and the track is playing from the beginning so nothing is scrobbled in this case - and I'm sure that it worked before) 3) I'll make the new version of the app from scratch with every "hack" or byway to make it right. But honestly, there's no chance I'll do it, at least while NepTunes works good enough. And given Apple approach to iTunes it can be futile.

So I can leave as it is or use solution numer 2 :)