[boardgames] Fix bgg_id not being save
This commit is contained in:
@ -92,7 +92,7 @@ fetching and simple saving.
|
|||||||
:LOGBOOK:
|
:LOGBOOK:
|
||||||
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
CLOCK: [2025-07-09 Wed 09:55]--[2025-07-09 Wed 10:15] => 0:20
|
||||||
:END:
|
:END:
|
||||||
* Backlog [2/24]
|
* Backlog [3/27]
|
||||||
** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :vrobbler:personal:bug:music:scrobbles:
|
** TODO [#C] Create small utility to clean up tracks scrobbled with wonky playback times :vrobbler:personal:bug:music:scrobbles:
|
||||||
** TODO [#C] Move to using more robust mopidy-webhooks pacakge form pypi :utility:improvement:
|
** TODO [#C] Move to using more robust mopidy-webhooks pacakge form pypi :utility:improvement:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@ -459,6 +459,11 @@ Turns out we're not looking up music tracks properly, again.
|
|||||||
:ID: e16228b2-b062-bd00-32e6-b2353e6406e9
|
:ID: e16228b2-b062-bd00-32e6-b2353e6406e9
|
||||||
:END:
|
:END:
|
||||||
** TODO [#A] Videos are scrobbling duplicates again :vrobbler:bug:videos:scrobbles:
|
** TODO [#A] Videos are scrobbling duplicates again :vrobbler:bug:videos:scrobbles:
|
||||||
|
** DONE Fix board games not saving BGG id on lookup :vrobbler:bug:boardgames:
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 506c2965-51d6-6cb9-fc4f-4f0468d2d62f
|
||||||
|
:END:
|
||||||
|
** TODO Fix board game lookup with name like Unmatched Game System :vrobbler:bug:boardgames:
|
||||||
** DONE [#A] Fix raw text webpage title not truncating to 254 chars :vrobbler:personal:bug:webpages:
|
** DONE [#A] Fix raw text webpage title not truncating to 254 chars :vrobbler:personal:bug:webpages:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 13fa0efd-2c3f-dd07-deb2-62882096feff
|
:ID: 13fa0efd-2c3f-dd07-deb2-62882096feff
|
||||||
|
|||||||
@ -3,6 +3,7 @@ from boardgamegeek import BGGClient
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
def lookup_boardgame_from_bgg(title: str) -> dict[str, Any]:
|
def lookup_boardgame_from_bgg(title: str) -> dict[str, Any]:
|
||||||
game_dict = {"title": title}
|
game_dict = {"title": title}
|
||||||
|
|
||||||
@ -18,9 +19,11 @@ def lookup_boardgame_from_bgg(title: str) -> dict[str, Any]:
|
|||||||
game_dict["max_players"] = game.maxplayers
|
game_dict["max_players"] = game.maxplayers
|
||||||
game_dict["recommended_age"] = game.minage
|
game_dict["recommended_age"] = game.minage
|
||||||
game_dict["rating"] = game.rating_average
|
game_dict["rating"] = game.rating_average
|
||||||
|
game_dict["bgg_id"] = game.id
|
||||||
game_dict["bgg_rank"] = game.bgg_rank
|
game_dict["bgg_rank"] = game.bgg_rank
|
||||||
game_dict["base_run_time_seconds"] = int(game.playingtime) * 60 if game.playingtime else None
|
game_dict["base_run_time_seconds"] = (
|
||||||
|
int(game.playingtime) * 60 if game.playingtime else None
|
||||||
|
)
|
||||||
game_dict["mechanics"] = game.mechanics
|
game_dict["mechanics"] = game.mechanics
|
||||||
game_dict["categories"] = game.categories
|
game_dict["categories"] = game.categories
|
||||||
game_dict["designers"] = game.designers
|
game_dict["designers"] = game.designers
|
||||||
|
|||||||
Reference in New Issue
Block a user