mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Compare commits
No commits in common. "ca30309450012a86938efde802f9c59f5fe3a4d7" and "f3a04c79b1c37597cdf3cafcd95e3c923cd6a53f" have entirely different histories.
ca30309450
...
f3a04c79b1
|
@ -73,8 +73,6 @@ class AudioscrobblerLegacy(APIHandler):
|
||||||
client = self.mobile_sessions.get(key)
|
client = self.mobile_sessions.get(key)
|
||||||
for count in range(50):
|
for count in range(50):
|
||||||
artist_key = f"a[{count}]"
|
artist_key = f"a[{count}]"
|
||||||
album_key = f"b[{count}]"
|
|
||||||
length_key = f"l[{count}]"
|
|
||||||
track_key = f"t[{count}]"
|
track_key = f"t[{count}]"
|
||||||
time_key = f"i[{count}]"
|
time_key = f"i[{count}]"
|
||||||
if artist_key not in keys or track_key not in keys:
|
if artist_key not in keys or track_key not in keys:
|
||||||
|
@ -84,19 +82,12 @@ class AudioscrobblerLegacy(APIHandler):
|
||||||
timestamp = int(keys[time_key])
|
timestamp = int(keys[time_key])
|
||||||
except Exception:
|
except Exception:
|
||||||
timestamp = None
|
timestamp = None
|
||||||
|
#database.createScrobble(artists,title,timestamp)
|
||||||
scrobble = {
|
self.scrobble({
|
||||||
'track_artists':[artiststr],
|
'track_artists':[artiststr],
|
||||||
'track_title':titlestr,
|
'track_title':titlestr,
|
||||||
'scrobble_time':timestamp,
|
'scrobble_time':timestamp
|
||||||
}
|
},client=client)
|
||||||
if album_key in keys:
|
|
||||||
scrobble['album_name'] = keys[album_key]
|
|
||||||
if length_key in keys:
|
|
||||||
scrobble['track_length'] = keys[length_key]
|
|
||||||
|
|
||||||
#database.createScrobble(artists,title,timestamp)
|
|
||||||
self.scrobble(scrobble, client=client)
|
|
||||||
return 200,"OK\n"
|
return 200,"OK\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user