|
|
@@ -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()
|