mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
modularize src
+ merge main.py and manage.py + move start logic to swingmusic/__main__.py + add a run.py on the project root
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""
|
||||
Contains methods relating to albums.
|
||||
"""
|
||||
|
||||
|
||||
from swingmusic.models.track import Track
|
||||
|
||||
|
||||
def remove_duplicate_on_merge_versions(tracks: list[Track]):
|
||||
"""
|
||||
Removes duplicate tracks when merging versions of the same album.
|
||||
"""
|
||||
# TODO!
|
||||
pass
|
||||
|
||||
|
||||
def sort_by_track_no(tracks: list[Track]):
|
||||
for t in tracks:
|
||||
track = str(t.track).zfill(3)
|
||||
t._pos = int(f"{t.disc}{track}")
|
||||
|
||||
tracks = sorted(tracks, key=lambda t: t._pos)
|
||||
|
||||
return tracks
|
||||
Reference in New Issue
Block a user