Fix a handful of little bugs
Refactor of manual scrobbling missed an import KoReader book removed in sqlite fails import Looking up album by name and artists screws up on MBid unique
This commit is contained in:
@ -129,6 +129,8 @@ def build_scrobbles_from_pages(
|
||||
book_read_time_map = {}
|
||||
for page_row in rows:
|
||||
koreader_id = page_row[KoReaderPageStatColumn.ID_BOOK.value]
|
||||
if koreader_id not in book_id_map.keys():
|
||||
continue
|
||||
page_number = page_row[KoReaderPageStatColumn.PAGE.value]
|
||||
ts = page_row[KoReaderPageStatColumn.START_TIME.value]
|
||||
book_id = book_id_map[koreader_id][0]
|
||||
|
||||
@ -50,7 +50,9 @@ def get_or_create_album(
|
||||
)
|
||||
return
|
||||
|
||||
album = Album.objects.filter(artists__in=[artist], name=name).first()
|
||||
album = Album.objects.filter(
|
||||
musicbrainz_id=mbid, name=name, artists__in=[artist]
|
||||
).first()
|
||||
|
||||
if not album and name:
|
||||
mbid = mbid or album_dict["mb_id"]
|
||||
|
||||
@ -11,7 +11,7 @@ LONG_PLAY_MEDIA = {
|
||||
MANUAL_SCROBBLE_FNS = {
|
||||
"-v": "manual_scrobble_video_game",
|
||||
"-b": "manual_scrobble_book",
|
||||
"-s": "manual_scrobble_sport_event",
|
||||
"-s": "manual_scrobble_event",
|
||||
"-i": "manual_scrobble_video",
|
||||
}
|
||||
|
||||
|
||||
@ -48,6 +48,9 @@ from scrobbles.scrobblers import (
|
||||
jellyfin_scrobble_track,
|
||||
jellyfin_scrobble_video,
|
||||
manual_scrobble_book,
|
||||
manual_scrobble_event,
|
||||
manual_scrobble_video,
|
||||
manual_scrobble_video_game,
|
||||
mopidy_scrobble_podcast,
|
||||
mopidy_scrobble_track,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user