diff --git a/server/app/api.py b/server/app/api.py index a2d441a..1906b98 100644 --- a/server/app/api.py +++ b/server/app/api.py @@ -286,13 +286,13 @@ def get_album_bio(title, artist): return {"bio": bio}, 200 -@bp.route("/file/") -def send_track_file(track_id): +@bp.route("/file/") +def send_track_file(trackid): """ Returns an audio file that matches the passed id to the client. """ try: - filepath = instances.songs_instance.get_song_by_id(track_id)['filepath'] + filepath = instances.songs_instance.get_song_by_id(trackid)['filepath'] return send_file(filepath, mimetype="audio/mp3") except FileNotFoundError: return "File not found", 404 diff --git a/server/app/models.py b/server/app/models.py index ba713e3..047c1ac 100644 --- a/server/app/models.py +++ b/server/app/models.py @@ -207,7 +207,7 @@ class Track: Track class """ - track_id: str + trackid: str title: str artists: str albumartist: str diff --git a/server/app/watchdoge.py b/server/app/watchdoge.py index 3f01f94..b4cdbbe 100644 --- a/server/app/watchdoge.py +++ b/server/app/watchdoge.py @@ -49,11 +49,11 @@ def remove_track(filepath: str) -> None: """ Removes a track from the music dict. """ - track_id = instances.songs_instance.get_song_by_path(filepath)["_id"]["$oid"] - instances.songs_instance.remove_song_by_id(track_id) + trackid = instances.songs_instance.get_song_by_path(filepath)["_id"]["$oid"] + instances.songs_instance.remove_song_by_id(trackid) for track in api.all_the_f_music: - if track.track_id == track_id: + if track.trackid == trackid: api.all_the_f_music.remove(track) diff --git a/src/components/RightSideBar/Queue.vue b/src/components/RightSideBar/Queue.vue index ee06984..f13b042 100644 --- a/src/components/RightSideBar/Queue.vue +++ b/src/components/RightSideBar/Queue.vue @@ -22,7 +22,7 @@
- +
diff --git a/src/components/Search/TracksGrid.vue b/src/components/Search/TracksGrid.vue index 4c92c21..4eedf73 100644 --- a/src/components/Search/TracksGrid.vue +++ b/src/components/Search/TracksGrid.vue @@ -6,7 +6,7 @@ diff --git a/src/components/shared/SongItem.vue b/src/components/shared/SongItem.vue index 2859746..abb1cc9 100644 --- a/src/components/shared/SongItem.vue +++ b/src/components/shared/SongItem.vue @@ -1,5 +1,5 @@