Scrobbling to lastfm
bonelifer opened this issue · 3 comments
bonelifer commented
What is the current way suggested.
PromyLOPh commented
https://github.com/PromyLOPh/pianobar/blob/master/contrib/eventcmd-examples/scrobble.py does not work for you?
bonelifer commented
Ah, didn't check the contrib folder. I found this: https://gist.github.com/dlo/832632 which seems to be the same except they added Growl, which I used Chatai to change it to pushover and notify-send
I think it somehow possibly hit the api too much somehow, because of this error:
Welcome to pianobar (2020.11.28)! Press ? for a list of commands.
(i) Login... Ok.
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
(i) Get stations... Ok.
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
|> Station "The Beatles Radio" (819603184678337385)
(i) Receiving new playlist... Ok.
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
|> "You Decorated My Life" by "Kenny Rogers" on "Love Songs" <3
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
|> "Texas Bound and Flyin'" by "Jerry Reed" on "The Essential Jerry Reed" <3
Traceback (most recent call last):
File "/home/william/.config/pianobar/scrobble.py", line 118, in <module>
main()
File "/home/william/.config/pianobar/scrobble.py", line 91, in main
network = pylast.LastFMNetwork(api_key=API_KEY, api_secret=API_SECRET, username=USERNAME, password_hash=pylast.md5(PASSWORD))
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 670, in __init__
super().__init__(
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 216, in __init__
self.session_key = sk_gen.get_session_key(self.username, self.password_hash)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 1072, in get_session_key
doc = request.execute()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 947, in execute
response = self._download_response()
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 936, in _download_response
self._check_response_for_errors(response_text)
File "/home/william/.local/lib/python3.10/site-packages/pylast/__init__.py", line 965, in _check_response_for_errors
raise WSError(self.network, status, details)
pylast.WSError: Authentication Failed - You do not have permissions to access the service
PromyLOPh commented
Sorry, I cannot help you with third-party libraries.