Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Songs played on repeat only scrobbles once #13

Open
igrhs opened this issue Aug 19, 2019 · 10 comments
Open

Songs played on repeat only scrobbles once #13

igrhs opened this issue Aug 19, 2019 · 10 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@igrhs
Copy link

igrhs commented Aug 19, 2019

if I play a songs more than once, only the original play will be scrobbled. Is it possible to correct?

@yungtry
Copy link
Owner

yungtry commented Aug 20, 2019

I've actually tried to fix it but I do not think there is a way to differentiate user skipping a song and song actually playing on loop. I will try to think about a possible solution to that.

@yungtry yungtry added enhancement New feature or request help wanted Extra attention is needed labels Aug 20, 2019
@igrhs
Copy link
Author

igrhs commented Aug 20, 2019

Neptunes also has the same problem, I believe only the official last.fm application for Mac can count all repeat scrobbles, but it is outdated and flawed. Anyway thanks and congratulations for the work.

@yungtry
Copy link
Owner

yungtry commented Aug 20, 2019

Actually, there is a way to fix it, which I will implement soon.

yungtry added a commit that referenced this issue Aug 21, 2019
Made it so the app scrobbles songs with the timer's number are higher than the song's duration aka temporary solution for listening to songs on loop. #13

I've also added some .gitigonre entries to make editing in vim easier.
@yungtry
Copy link
Owner

yungtry commented Aug 21, 2019

@igrhs I've just published a pre-release version. I would love to hear your feedback.
https://github.com/yungtry/CatalinaScrobbler/releases/tag/1.1.1
It is not perfect tho. You have to listen to the whole duration of a song in order to make it scrobble but that's what I was able to do for now.

@igrhs
Copy link
Author

igrhs commented Aug 21, 2019

Thanks for the update.

I listened two songs on repeat 4 times, one present on an album, other just a single. It took some time for the scrobbles to be sent (approximately):
1x 0:50 seconds
2x 1:30
3x 2:10
4x scrobble not sent (during fourth play, I deselected repeat function)

Maybe you developed it to happen that way.

It's important to say that I'm using iTunes on macOS Mojave 10.14.6, maybe it works better in Catalina's Music app. If you think better, I can download the Catalina's beta and try on Music too.

@yungtry
Copy link
Owner

yungtry commented Aug 21, 2019

As for the system, it shouldn't matter as I myself use Mojave too.

As for the looping, it's way more complicated:
Let me explain how it works. So to begin with the whole app works by running apple script commands every 5 seconds which gather some pieces of information from iTunes such as artist, track name, album name, etc. When the user has listened for more than 45% of a song it marks it as "scrobblable". And then when it catches that song has changed it scrobbles the previous one.

When you're listening to the song on the loop it doesn't see that. The app thinks you're listening to one long song. In the latest release, I've changed that so now when it sees that if more than 100% of the song's duration has been exceeded, it scrobbles it. And here's the problem. For example: Let's say that the song's duration is 1 minute. If you start listening to the song on repeat from 30th second it will scrobble it around 30th second on the second playthrough of the song. It's really hard to explain and it's messy as hell.

tldr: My point is that if there was a way to get information about how many times a song has been played in iTunes/Apple Music it would make it hella easier, but I couldn't find it anywhere.

@igrhs
Copy link
Author

igrhs commented Aug 24, 2019

Thanks for the explanation, I think I could understand, Apple and its limitations ... Even so with this "delay", is already great counting the repeat.

A while ago the Apple Music API was released, there is one that provides information on the latest playbacks of users. Do you think it is possible to develop a scrobbler similar to what last.fm does with Spotify Scrobbling (using the Spotify API)? I believe it would be much more effective if possible.

@yungtry
Copy link
Owner

yungtry commented Aug 24, 2019

That's definitely something to consider the next time I'll rewrite the app since now it's not worth it, I think. Implementing Apple Music API would force me to dramatically change the code, which at the moment would be a waste of time because I must rewrite the whole app to Swift in the future anyway. Node.js and Electron are just so bad in the long run. Like my app takes around 150MB of disk space right now, it should be 20MB max.

Also, I found out there's something called MusicKit JS but it's client-side only https://developer.apple.com/documentation/musickitjs.

Honestly, it's really a shame Apple Music does not support Last.fm natively as other major streaming services such as Spotify and TIDAL do so.

@yungtry
Copy link
Owner

yungtry commented Aug 24, 2019

Actually, that's a very good idea as API's description says

Use this service to retrieve information about albums, songs, artists, playlists, music videos, Apple Music stations, ratings, charts, recommendations, and the user's most recently played content.

@igrhs
Copy link
Author

igrhs commented Aug 26, 2019

Maybe it's something that can be used.

I even suggested it in the last.fm support forum a while ago, but with no prediction or certainty that they will try to implement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants