Git Product home page Git Product logo

rescrobbled's People

Contributors

c-lunn avatar dependabot[bot] avatar forage avatar futpib avatar inputusername avatar marius851000 avatar thelastzombie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rescrobbled's Issues

GNOME Music no longer detected

It looks like rescrobbled stopped working after GNOME Music changed changed the MPRIS identity from "GnomeMusic" to "org.gnome.Music". No tracks are being submitted any more.

"systemctl --user status rescrobbled.service" only gives me:

jan 22 16:10:23 Khazam-dum systemd[3842]: Started An MPRIS scrobbler.
jan 22 16:10:24 Khazam-dum rescrobbled[64205]: Authenticated with ListenBrainz successfully!
jan 22 16:10:24 Khazam-dum rescrobbled[64205]: Looking for an active MPRIS player...

If I change the white list to "vlc" and play a track it works as expected.

Using version 0.5.0 on Ubuntu 21.10.

I can't launch rescrobbled

I successly compiled it from this page. I'm using artix linux.
https://aur.archlinux.org/packages/rescrobbled-git
However, whenever I try to launch it, I get these error messages.
rescrobbled Authenticated with Last.fm successfully! thread 'main' panicked at 'invalid url or method: Error(InvalidBaseUrl)', /home/bud/.cargo/registry/src/github.com-1ecc6299db9ec823/attohttpc-0.17.0/src/request/builder.rs:52:41 stack backtrace: note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace

Authenticated with Last.fm successfully! thread 'main' panicked at 'invalid url or method: Error(InvalidBaseUrl)', /home/bud/.cargo/registry/src/github.com-1ecc6299db9ec823/attohttpc-0.17.0/src/request/builder.rs:52:41 stack backtrace: 0: 0x56057837e1a3 - <unknown> 1: 0x5605783a3eec - <unknown> 2: 0x5605783777d5 - <unknown> 3: 0x56057837fa01 - <unknown> 4: 0x56057837f6d3 - <unknown> 5: 0x5605783800a3 - <unknown> 6: 0x56057837ff97 - <unknown> 7: 0x56057837e654 - <unknown> 8: 0x56057837fcc2 - <unknown> 9: 0x5605780270b3 - <unknown> 10: 0x560578027203 - <unknown> 11: 0x5605780acdef - <unknown> 12: 0x5605780b927d - <unknown> 13: 0x5605780addbb - <unknown> 14: 0x56057803805d - <unknown> 15: 0x56057803b701 - <unknown> 16: 0x560578039aa3 - <unknown> 17: 0x56057804d779 - <unknown> 18: 0x560578372a02 - <unknown> 19: 0x56057803b898 - <unknown> 20: 0x7fcb0403c290 - <unknown> 21: 0x7fcb0403c34a - __libc_start_main 22: 0x560578027395 - <unknown> 23: 0x0 - <unknown>

Feature Request: Libre.fm support

This looks like a great project, and I would love to use it.
I use libre.fm however and it doesn't seem to be supported.

I'd be more than happy to try my hand at implementing it myself in a PR as well.
I'm just not sure how quickly I'll be able to get to it.
I'm pretty busy with IRL things as well as various projects.

As a side note: Once the feature gets implemented and I start using it
(I'll most likely end up using it daily), I will also be glad to create Gentoo ebuilds for this.

Edit: I'd also be happy to make an OpenRC service too.

Build error on at least the latest commit

I used the Arch Linux AUR package to build rescrobbled.

The process aborts with:

   Compiling listenbrainz v0.4.1
   Compiling rustfm-scrobble v1.1.0
   Compiling rescrobbled v0.5.0 (/home/patrik/.cache/yay/rescrobbled-git/src/rescrobbled)
error[E0658]: use of unstable library feature 'duration_zero'
   --> src/mainloop.rs:111:23
    |
111 |             if length.is_zero() {
    |                       ^^^^^^^
    |
    = note: see issue #73544 <https://github.com/rust-lang/rust/issues/73544> for more information

error: aborting due to previous error

Is this an error on my/Arch's side?

Process does nothing after idle time

rescrobbled is started by systemd and runs fine at first. But after a longer time without any active mpris player running it seems to silently die somehow.

The process itself is still running, but there is no more logging message.

strace shows this:

[pid 94080] nanosleep({tv_sec=1, tv_nsec=0}, 0x7ffe6d0cfc20) = 0
[pid 94080] sendmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\0\1\0\0\0\0^\354\0\0b\0\0\0\1\1o\0\1\0\0\0/\0\0\0\0\0\0\0"..., iov_len=120}, {iov_base="", iov_len=0}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 120
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 500) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 476) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 463) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 454) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 445) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 432) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 416) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 404) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 388) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 377) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 361) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 352) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 335) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 323) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 314) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 303) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 294) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 284) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 275) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 264) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 251) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 240) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 227) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 208) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 192) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 181) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 163) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 151) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 139) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 125) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 114) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 102) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 92) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 79) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 67) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 55) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 44) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 33) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 22) = 1 ([{fd=6, revents=POLLIN}])
[pid 94080] poll([{fd=6, events=POLLIN}], 1, 11) = 1 ([{fd=6, revents=POLLIN}])

Dependency on notify-rust 4.5.6... are previous versions compatible

I'm looking at packaging rescrobbled for fedora and ran into an issue with notify-rust. Apparently there are some packages in Fedora that aren't compatible with 4.5.6 due to the changes to zbus/zvariant so that is holding up the ability to upgrade to 4.5.6 or greater.

My question is will 4.5.3 for example work fine? Thanks!

Empty artist from Telegram on any track

Both qdbus and playerctl show xesam:artist just fine.
Same rescrobbled works fine with Firefox on my system.

// rescrobbled --version

rescrobbled v0.6.1
// journalctl --user -fu rescrobbled

Nov 03 18:29:06 futpib-laptop rescrobbled[779855]: ----
Nov 03 18:29:06 futpib-laptop rescrobbled[779855]: Now playing:  - Plein Soleil ()
Nov 03 18:29:06 futpib-laptop rescrobbled[779855]: Failed to update status on Last.fm
Nov 03 18:29:06 futpib-laptop rescrobbled[779855]: Caused by:
Nov 03 18:29:06 futpib-laptop rescrobbled[779855]:     Now playing request failed: Status code 400 Bad Request indicates failure
// qdbus org.mpris.MediaPlayer2.tdesktop /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata

mpris:artUrl: 
mpris:length: 398000000
mpris:trackid: 
xesam:artist: World's End Girlfriend
xesam:title: Plein Soleil
// playerctl -p tdesktop metadata

tdesktop mpris:artUrl              
tdesktop mpris:length              398000000
tdesktop mpris:trackid             '/org/desktop_app/track/0'
tdesktop xesam:artist              World's End Girlfriend
tdesktop xesam:title               Plein Soleil

Replace listenbrainz-rust library with listenbrainz

listenbrainz-rust depends on reqwest and therefore pulls in a bunch of crates from the async/tokio ecosystem for no reason. I've written listenbrainz, which uses ureq, bringing in significantly fewer dependencies.

I have already attempted to port rescrobbled over to listenbrainz, but it seems to randomly error sometimes when submitting songs or authenticating. Need to investigate.

listenbrainz authentication failure

Hi, thanks for your project !

I was impatient to get support for custom listenbrainz servers since I'm a maloja user, unfortunately I couldn't manage to authenticate

Rescrobbled version is latest, built locally from source

Config (cleaned) looks like that :

[[listenbrainz]]
url = "https://my_maloja_host/apis/listenbrainz"
token = "my_token"

Url and token work in other apps.

Error is :

Authenticated with Last.fm successfully!
Failed to authenticate with ListenBrainz (https://my_maloja_host/apis/listenbrainz)
Looking for an active MPRIS player...

I can provide url and token in private if you want.

No scrobbling services defined

Hi! I added my API key and shared secret to ~/.config/rescrobbled/config.toml, but the terminal shows the message "Warning: no scrobbling services defined".

I tried creating a new API, but the same issue. Should I add an URL to the API request from last.fm before making it?

Request: Player whitelist or blacklist

I don't want to scrobble from every player that sends mpris signals, so it would be helpful to read from the config file either a player whitelist or blacklist. In a little applet I use for displaying the currently played track, I use the following:

PLAYER_BLACKLIST_REGEXP = r'Gwenview|plasma-browser-integration|mpv|chromium\.instance'

This is then checked against the beginning of the player's broadcasted name (as returned by playerctl) so that my applet can ignore anything from those players.

I think for rescrobbled, a whitelist probably makes more sense and would be simpler to implement (no real need for regex matching, just literal full matches).

Player whitelist: identifying options

Since we have a lot of Electron/Chromium based media players in the Linux world, it's hard to whitelist these, as their Identity property always(?) has the value of "Chromium". So basically if I have three of this kind of players, I can't whitelist just one of them, as the Identity is the same:

/// Determine if a player's MPRIS identity or the unique part
/// of its D-Bus bus name are whitelisted.
fn is_whitelisted(config: &Config, player: &Player) -> bool {
if let Some(ref whitelist) = config.player_whitelist {
if !whitelist.is_empty() {
return whitelist.contains(player.identity())
|| is_bus_name_whitelisted(player, whitelist);
}
}
true
}

Using the unique D-Bus name works, but the unique part automatically changes every time the player is restarted, so it's not a long term solution.

Would it be feasible to take the whitelisting a little further to provide more control to the user?

Add option for apps that don't send track length

I am using tidal-hifi as a Chromium/Electron app on Ubuntu 20.04 and only get the title/artist via MPRIS - nothing more, nothing less. To solve this, I currently only deleted the corresponding lines out of the source code and set the length to a constant of 30 seconds - which works in my case but I don't really like the solution.

I documented my changes here: Mastermindzh/tidal-hifi#11 (comment)
There should be an option to ignore the missing track length.

Submit listen without release_name(album)

I get the following error for most of the songs I downloaded locally from youtube:

Failed to update status on ListenBrainz

Caused by:
    API error (400): field track_metadata.release_name is empty.
Failed to submit track to ListenBrainz

Caused by:
    API error (400): field track_metadata.release_name is empty.

The listenbrains documentation lists:
image

Which means the release_name field should be optional.

I assume the issue is that release_name gets submitted with an empty value while it should probably be omitted entirely instead.

Thanks for the awesome project and any kind of support!

Scrobbling happens way too early (Amberol)

With unspecified min-play-time scrobbling happens after just a few seconds after a track starts playing. Tho if I specify min-play-time, specified time works fine. There's some info:

Distro: Arch
Rescrobbled v0.6.2, installed with AUR
Player: Amberol (Flatpak)

config.toml:

lastfm-key = "<key>"
lastfm-secret = "<secret>"
player-whitelist = [ "io.bassi.Amberol" ]

$ systemctl status rescrobbled --user:

ноя 25 16:35:14 lazurit-81vw systemd[1097]: Started An MPRIS scrobbler.
ноя 25 16:35:14 lazurit-81vw rescrobbled[58317]: Authenticated with Last.fm successfully!
ноя 25 16:35:14 lazurit-81vw rescrobbled[58317]: Looking for an active MPRIS player...
ноя 25 16:35:14 lazurit-81vw rescrobbled[58317]: Found active player Amberol
ноя 25 16:35:14 lazurit-81vw rescrobbled[58317]: ----
ноя 25 16:35:14 lazurit-81vw rescrobbled[58317]: Now playing: Dion Timmer - Midnight Zone (Enter Achroma)
ноя 25 16:35:15 lazurit-81vw rescrobbled[58317]: Status updated on Last.fm successfully
ноя 25 16:35:30 lazurit-81vw rescrobbled[58317]: Track submitted to Last.fm successfully
ноя 25 16:37:36 lazurit-81vw rescrobbled[58317]: ----
ноя 25 16:37:36 lazurit-81vw rescrobbled[58317]: Now playing: Dion Timmer - Sandman Sleeps (Enter Achroma)
ноя 25 16:37:37 lazurit-81vw rescrobbled[58317]: Status updated on Last.fm successfully
ноя 25 16:37:53 lazurit-81vw rescrobbled[58317]: Track submitted to Last.fm successfully

$ playerctl status -l:

io.bassi.Amberol

$ playerctl metadata:

io    mpris:artUrl              file:///home/lazurit/.var/app/io.bassi.Amberol/cache/amberol/covers/744e9e31dac6774a7ddaa358a0451e69897a2413d9a42763a48ec2e355b65b67.png
io    xesam:artist              Dion Timmer
io    xesam:title               Sandman Sleeps
io    mpris:length              230000000
io    xesam:album               Enter Achroma

Won't scrobble ncspot if spotifyd is running

Hi!

I'm running into the issue that seems to have been discussed before.
#10

I am running spotifyd as a systemd user service. If I start up ncspot and start playing music, rescrobbled will state Looking for an active MPRIS player.... If I stop the spotifyd service, then rescrobbled will start scrobbling, Found active player ncspot.

I have player-whitelist = ["ncspot"] in my config.toml. I tried commenting that out, but it made no difference.

I'm using arch linux and the AUR package of rescrobbled.
https://aur.archlinux.org/packages/rescrobbled-git/

Submit after percent played

It would be nice to have an option like min-play-percent that would be used something like
min-play-percent-in-seconds = ( min-play-percent / 100 ) * ( mpris:length / 1000000 )
Then have the submission time used be min-play-percent-in-seconds or min-play-time, whichever is set and has the highest value.

This would let a user retain an absolute minimum while adding a relative minimum, giving better control over only scrobbling what you're actually listening to.
I have 10 minute+ tracks that I'll decide I don't want to listen to 30 seconds in, as well as tracks that are 30 seconds. Setting an absolute minimum of 30 seconds would make the scrobbler blind to my shorter tracks and risk scrobbling longer tracks I'm not really listening to.

Enhance documentation API key documentation

Hi,

so I installed rescrobbled and set the Last.fm API key and secret in the config.toml file.
Upon running systemctl --user start rescrobbled.service I would get authentication failed.

So after reading the rest of the README.md it would require me to start the application in the terminal so I can enter my Last.fm credentials.

Now my question is: Do I still need the API key/secret of Last.fm since a token is obtained? See: "A long-lasting session token is then obtained, which will be used on subsequent runs instead of your username/password."

Anyways, thanks for creating this project. It helps with scrobbling in combination with ncspot!

Blacklisted Artists

Can you help me to create a script to blacklist some artists? I don't know but maybe this one can be a nice built-in feature.

Duplicate scrobbles being submitted

Thanks for this - it's a lifesaver. However, I'm encountering a strange and intermittent issue: occasionally, rescrobbled will scrobble the same song multiple times. An example from the logs:

Jul 22 09:30:37 rescrobbled[871790]: Now playing: Ty Segall - Hello, Hi ("Hello, Hi")
Jul 22 09:30:37 rescrobbled[871790]: Status updated on Last.fm successfully
Jul 22 09:30:38 rescrobbled[871790]: Track submitted to Last.fm successfully
Jul 22 09:32:34 rescrobbled[871790]: Track submitted to Last.fm successfully
Jul 22 09:34:30 rescrobbled[871790]: Track submitted to Last.fm successfully
Jul 22 09:36:27 rescrobbled[871790]: Track submitted to Last.fm successfully

Any advice on how to best troubleshoot or debug this?

Extract artist's name from xesam:title

I'm using MPV to stream radio from internet, and somehow the metadata from MPV shows only xesam:title with the artist's name in it.
Example:

> playerctl metadata
mpv   xesam:url                 http://hits.j1fm.tokyo/
mpv   mpris:trackid             '/0'
mpv   xesam:title               Yuuki Aoi - Cupid Revue
mpv   mpris:length              520019591

Is it possible to extract artist's name from xesam:title? Because somehow last.fm doesn't recognize the track because the artist name in it.

Authentication failed on last.fm

Hi, getting an "authentication failed" error:

Failed to authenticate with Last.fm

Caused by:
    Authentication failed: Non Success status (403)

My config is simply:

lastfm-key = "bc7...b42"
lastfm-secret = "02b...591"
player-whitelist = ["mpd"]

The user and pass is correct and working, tested both on the website and other applications.

Doesn't appear to work on proxy (Fedora 36)

Hi, I'm trying to scrobble from behind a proxy, and have obtained a key and shared secret from last.fm.
On starting the application, I am prompted for a username and password. Entering these, sometimes the application hangs, sometimes I get the following message:

Failed to authenticate with Last.fm

Caused by:
    Authentication failed: Connection Failed: Network is unreachable (os error 101)
Warning: no scrobbling services defined
Looking for an active MPRIS player...

Strace output, if it helps:

....
socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("130.211.19.189")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(41452), sin_addr=inet_addr("172.xxx")}, [28 => 16]) = 0
close(3)                                = 0
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(0), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2600:1901:0:2fd6::", &sin6_addr), sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
close(3)                                = 0
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("130.211.19.189")}, 16) = -1 EHOSTUNREACH (No route to host)
close(3)                                = 0
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(443), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "2600:1901:0:2fd6::", &sin6_addr), sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
close(3)                                = 0
write(2, "Failed to authenticate with Last"..., 35Failed to authenticate with Last.fm) = 35
write(2, "\n\nCaused by:", 12
....

Unfortunately I can't test off-proxy due to my network setup.

Any help would be appreciated. Thank you.

Error while loading shared libraries: libssl.so.1.1

Hi,

rescrobbled unfortunately stopped working because Ubuntu moved from libssl1 to libssl3.
I'm now getting the following error:

./rescrobbled: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Should rescrobbled not switch as well?

Version: 0.6.1
OS: Ubuntu 22.10

One issue about When Scrobbles are Submitted

Hey, honestly this is a life saver and I really just have one genuine issue with the scrobbler and it is the fact that I can't make it submit the scrobbles at the end of the songs. If anything that's the only thing, right now when it scrobbles midway the times are way off from when I started playing a song that lasts 4 minute started playing 6 minutes ago once submitted which is impossible. (Songs only been playing for 2 minutes!)

Honestly is there any way to just make the min-play-time the end of the current songs length for each song? It is genuinely the only thing that makes this annoying to use outside of that it is pretty much perfect.

Obviously this is the best solution for me so even if the times are incorrect, it's still useful and I will keep using it regardless. But, it would be nice if there was a way to just have the scrobbles submitted at the end of the playtime instead.

Do you know...

Do you know of a script that allows you to feed in ARTIST and SongInfo and have it love that track on lastfm? Everyone I've tried either didn't compile, needed libraries no longer work, or the closest I got was a perl script but it uses the old auth format that lastfm doesn't support anymore. I just need something I can run via keyboard shortcuts.

Whitelist Case-sensitivity and Spotifyd

0.1.0.r12.5bd7919

I'm not sure what the correct fix for this is (might be a spotifyd or playerctl problem, really), but here's what I can see happening, using spotifyd 0.2.24 and playerctl 2.1.1:

$ playerctl --list-all
spotifyd

With the following rescrobbled whitelist, spotifyd is not detected:

player-whitelist = ["spotify", "ncspot", "mopidy", "spotifyd"]

So I removed the whitelist and the rescrobbled log offered:

2020-04-05 13:15:22.923451435  Found active player Spotifyd

So I've made the whitelist:

player-whitelist = ["spotify", "ncspot", "mopidy", "Spotifyd"]

Which works fine. But I'd like whatever playerctl --list-all reports to work as a whitelist entry. I don't know if that means using case-insensitive matching here, or if the case is inappropriately handled by either playerctl or spotifyd. If I specify Spotifyd as the player to playerctl, it does not find it.

Thanks again for this great tool!

Autogenerated config should have tighter permissions

Thanks for the project, just started using it and it's working great so far!

I noticed that when the configuration file is autogenerated it has default (in my case 644) permissions, which are readable by everyone. Since this file will likely contain authentication secrets, it would be great if it were created with 600 permissions so it's only readable by the user that runs rescrobbled.

Failed to update status on Last.fm

Hi, I'm having trouble scrobbling.

I logged in with username and password as well as put my key and secret into the config file.
Anything obvious I'm doing wrong? Seems like I'm connecting to last.fm fine but just can't scrobble.

Application output:

Authenticated with Last.fm successfully!
Looking for an active MPRIS player...
Found active player Spot
----
Now playing: Porter Robinson - Divinity (Worlds)
Failed to update status on Last.fm

Any help would be greatly appreciated :)

Edit (Adding OS Details):
Fedora 35 x86_64
Installed via crates.io

Allow ListenBrainz only

Based on the documentation, and me waiting for the next release for the white-list feature before using rescrobbled, it appears it's mandatory to use Last.fm, even though people might only be interested in ListenBrainz submissions.

Would it be possible to remove this requirement and allow for only a ListenBrainz account?

Cleaner metadata (e.g. remove "Remastered" suffixes)

EDIT: I wrote a very customizable python scrobbler, scrobblez:
https://github.com/YodaEmbedding/scrobblez


Services such as Spotify and Tidal include irrelevant suffixes within their metadata. For example:

Hallowed Be Thy Name - 2015 Remaster
Hallowed Be Thy Name (2015 Remaster)

It makes sense to remove the trailing suffixes since:

  1. It improves the user experience of last.fm features, including comparing libraries and track counts with other users. If there are multiple names for a particular track, this becomes much more difficult or impossible!
  2. Your own past history might contain un-remastered scrobbles. But now they contain both. Making it harder to analyze album/track listening statistics.
  3. It cleans away fairly useless information the metadata.
  4. The format is specific to the streaming platform (e.g. Spotify, Tidal).

A similar issue was resolved by web-scrobbler: web-scrobbler/web-scrobbler#880. They use the metadata-filter library, available on npm, which provides some useful regexes. See here:

/**
 * Filter rules to remove "Remastered..."-like strings from a text.
 */
export const REMASTERED_FILTER_RULES: FilterRule[] = [
	// Here Comes The Sun - Remastered
	{ source: /-\sRemastered$/, target: '' },
	// Hey Jude - Remastered 2015
	{ source: /-\sRemastered\s\d+$/, target: '' },
	// Let It Be (Remastered 2009)
	// Red Rain (Remaster 2012)
	{ source: /\(Remaster(ed)?\s\d+\)$/, target: '' },
	// Pigs On The Wing (Part One) [2011 - Remaster]
	{ source: /\[\d+\s-\sRemaster\]$/, target: '' },
	// Comfortably Numb (2011 - Remaster)
	// Dancing Days (2012 Remaster)
	{ source: /\(\d+(\s-)?\sRemaster\)$/, target: '' },
	// Outside The Wall - 2011 - Remaster
	// China Grove - 2006 Remaster
	{ source: /-\s\d+(\s-)?\sRemaster$/, target: '' },
	// Learning To Fly - 2001 Digital Remaster
	{ source: /-\s\d+\s.+?\sRemaster$/, target: '' },
	// Your Possible Pasts - 2011 Remastered Version
	{ source: /-\s\d+\sRemastered Version$/, target: '' },
	// Roll Over Beethoven (Live / Remastered)
	{ source: /\(Live\s\/\sRemastered\)$/i, target: '' },
	// Ticket To Ride - Live / Remastered
	{ source: /-\sLive\s\/\sRemastered$/, target: '' },
	// Mothership (Remastered)
	// How The West Was Won [Remastered]
	{ source: /[([]Remastered[)\]]$/, target: '' },
	// A Well Respected Man (2014 Remastered Version)
	// A Well Respected Man [2014 Remastered Version]
	{ source: /[([]\d{4} Re[Mm]astered Version[)\]]$/, target: '' },
	// She Was Hot (2009 Re-Mastered Digital Version)
	// She Was Hot (2009 Remastered Digital Version)
	{ source: /[([]\d{4} Re-?[Mm]astered Digital Version[)\]]$/, target: '' },
];

They also provide regex filters for other unnecessary text such as Live, Explicit, feat., and Album|Stereo|Mono|Deluxe|.... Personally, Remastered is the most critical, though.

Authentication failure

● rescrobbled.service - An MPRIS scrobbler
Loaded: loaded (/usr/lib/systemd/user/rescrobbled.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-11-24 17:05:11 CST; 1min 5s ago
Docs: https://github.com/InputUsername/rescrobbled
Process: 1467 ExecStart=/home/tev/.cargo/bin/rescrobbled (code=exited, status=1/FAILURE)
Main PID: 1467 (code=exited, status=1/FAILURE)

Nov 24 17:05:11 tev-GL62-6QF systemd[3087]: Started An MPRIS scrobbler.
Nov 24 17:05:11 tev-GL62-6QF rescrobbled[1467]: Username: Password: Failed to authenticate with Last.fm: Invalid authentication credential
Nov 24 17:05:11 tev-GL62-6QF systemd[3087]: rescrobbled.service: Main process exited, code=exited, status=1/FAILURE
Nov 24 17:05:11 tev-GL62-6QF systemd[3087]: rescrobbled.service: Failed with result 'exit-code'.
...skipping...

For some reason the notification for entering my Last.fm credentials never pops up when running the program in terminal. I'm on elementary 5.1 Hera

Make API endpoints configurable

For now this project won't play well with custom scrobble servers, such as Maloja, that support ListenBrainz API.

Unfortunately, listenbrainz_rust got the API URI hardcoded.

Add mechanism for launching rescrobbled in the background on startup

It's a bit of a pain to manually run the executable each time I want my music to scrobble from cmus. Is there a way to launch rescrobbled in the background as soon my computer boots, so that everything I listened to gets scrobbled by default?

I tried creating and using the systemd unit file but it didn't seem to have any effect (i.e. my tracks were't scrobbling when I checked my last.fm page). They did start scrobbling as soon as I manually launched rescrobbled from cli though, even though I had already done systemctl --user start rescrobbled.service.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.