[scrobblers] Fix manual vidoe lookup and simplify Sports
This commit is contained in:
@ -131,7 +131,7 @@ def jellyfin_scrobble_media(
|
||||
|
||||
|
||||
def manual_scrobble_video(imdb_id: str, user_id: int):
|
||||
video = Video.find_or_create({"imdb_id": imdb_id})
|
||||
video = Video.find_or_create({JELLYFIN_POST_KEYS.get("IMDB_ID"): imdb_id})
|
||||
|
||||
# When manually scrobbling, try finding a source from the series
|
||||
source = "Vrobbler"
|
||||
@ -161,7 +161,12 @@ def manual_scrobble_event(thesportsdb_id: str, user_id: int):
|
||||
data_dict = lookup_event_from_thesportsdb(thesportsdb_id)
|
||||
|
||||
event = SportEvent.find_or_create(data_dict)
|
||||
scrobble_dict = build_scrobble_dict(data_dict, user_id)
|
||||
scrobble_dict = {
|
||||
"user_id": user_id,
|
||||
"timestamp": timezone.now(),
|
||||
"playback_position_seconds": 0,
|
||||
"source": "TheSportsDB",
|
||||
}
|
||||
return Scrobble.create_or_update(event, user_id, scrobble_dict)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user