mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-04 23:53:59 +00:00
addrelease.py: Use approximated "~length" for Recordings.
Recordings don't support sub-second time precision, so the track.metadata.length used for the two Add...AsRelease classes will cause an error on /recording/create's "length" field. track.metadata["~length"] contains the time converted to mm:ss format and will not cause the error on /recording/create, so this commit changes AddFileAsRecording to use that.
This commit is contained in:
@@ -152,7 +152,7 @@ class AddFileAsRecording(AddObjectAsEntity):
|
||||
nv = self.add_form_value
|
||||
nv("edit-recording.name", track.metadata["title"])
|
||||
nv("edit-recording.artist_credit.names.0.artist.name", track.metadata["artist"])
|
||||
nv("edit-recording.length", str(track.metadata.length))
|
||||
nv("edit-recording.length", track.metadata["~length"])
|
||||
|
||||
|
||||
class AddFileAsRelease(AddObjectAsEntity):
|
||||
|
||||
Reference in New Issue
Block a user