Update all the places we need base_run_time_seconds now

This commit is contained in:
2025-11-02 21:18:28 -05:00
parent a474b5df48
commit a8747dfe77
17 changed files with 28 additions and 28 deletions

View File

@ -677,7 +677,7 @@ class Track(ScrobblableMixin):
lookup_keys = {"title": title, "artist": artist}
if run_time_seconds:
lookup_keys["run_time_seconds"] = run_time_seconds
lookup_keys["base_run_time_seconds"] = run_time_seconds
logger.info(f"Looking up track using: {lookup_keys}")
track = cls.objects.filter(**lookup_keys).first()
if track:
@ -699,7 +699,7 @@ class Track(ScrobblableMixin):
if album:
track.albums.add(album)
if enrich or not track.run_time_seconds:
if enrich or not track.base_run_time_seconds:
logger.info(
f"Enriching track {track}",
extra={
@ -715,7 +715,7 @@ class Track(ScrobblableMixin):
except Exception:
print("No musicbrainz result found, cannot enrich")
return track
track.run_time_seconds = run_time_seconds or int(length / 1000)
track.base_run_time_seconds = run_time_seconds or int(length / 1000)
track.musicbrainz_id = mbid
if commit:
track.save()