From f1ec6309ba48208a50e7b7039616428cb47dec52 Mon Sep 17 00:00:00 2001 From: geoffrey45 Date: Mon, 13 Jun 2022 09:17:00 +0300 Subject: [PATCH] fix current track in queue auto scroll position - add another inner container to limit the offset - auto scroll current track to container start - add todo file --- server/app/api/__init__.py | 2 +- server/app/lib/watchdoge.py | 4 ++ src/components/FolderView/FolderItem.vue | 2 +- src/components/FolderView/SongList.vue | 6 +-- src/components/RightSideBar/Queue.vue | 43 +++++++++++-------- src/components/RightSideBar/Search/Main.vue | 3 -- src/components/RightSideBar/Search/Tab.vue | 2 +- .../RightSideBar/Search/TracksGrid.vue | 2 +- src/components/modals/updatePlaylist.vue | 13 +++++- src/composables/perks.ts | 2 +- todo | 16 +++++++ 11 files changed, 65 insertions(+), 30 deletions(-) create mode 100644 todo diff --git a/server/app/api/__init__.py b/server/app/api/__init__.py index 18d93dc..b9b916d 100644 --- a/server/app/api/__init__.py +++ b/server/app/api/__init__.py @@ -34,7 +34,7 @@ def initialize() -> None: albumslib.create_everything() folderslib.run_scandir() playlistlib.create_all_playlists() - # functions.reindex_tracks() + functions.reindex_tracks() initialize() diff --git a/server/app/lib/watchdoge.py b/server/app/lib/watchdoge.py index 1118a45..d7496e2 100644 --- a/server/app/lib/watchdoge.py +++ b/server/app/lib/watchdoge.py @@ -148,3 +148,7 @@ class Handler(PatternMatchingEventHandler): watch = OnMyWatch() + +# TODO +# When removing a track, check if there are other tracks in the same album, +# if it was the last one, remove the album. \ No newline at end of file diff --git a/src/components/FolderView/FolderItem.vue b/src/components/FolderView/FolderItem.vue index c76aedb..8e4d144 100644 --- a/src/components/FolderView/FolderItem.vue +++ b/src/components/FolderView/FolderItem.vue @@ -13,7 +13,7 @@ - diff --git a/src/components/RightSideBar/Search/Tab.vue b/src/components/RightSideBar/Search/Tab.vue index a20172e..ac06763 100644 --- a/src/components/RightSideBar/Search/Tab.vue +++ b/src/components/RightSideBar/Search/Tab.vue @@ -1,5 +1,5 @@ diff --git a/src/components/RightSideBar/Search/TracksGrid.vue b/src/components/RightSideBar/Search/TracksGrid.vue index 5358ccc..696216d 100644 --- a/src/components/RightSideBar/Search/TracksGrid.vue +++ b/src/components/RightSideBar/Search/TracksGrid.vue @@ -26,7 +26,7 @@ const queue = useQStore(); const search = useSearchStore(); function loadMore() { - search.updateLoadCounter("tracks", 5); + search.updateLoadCounter("tracks", 5); search.loadTracks(search.loadCounter.tracks); } diff --git a/src/components/modals/updatePlaylist.vue b/src/components/modals/updatePlaylist.vue index d880506..6a5da4d 100644 --- a/src/components/modals/updatePlaylist.vue +++ b/src/components/modals/updatePlaylist.vue @@ -41,7 +41,7 @@ />
- +
@@ -98,8 +98,19 @@ function handleFile(file: File) { image = file; } +let clicked = false; + function update_playlist(e: Event) { e.preventDefault(); + + if (!clicked) { + clicked = true; + const elem = document.getElementById("updateplaylistsubmit") as HTMLFormElement + elem.value = "Updating" + } else { + return; + } + const form = e.target as HTMLFormElement; const formData = new FormData(form); diff --git a/src/composables/perks.ts b/src/composables/perks.ts index 6aa8fa7..79b9555 100644 --- a/src/composables/perks.ts +++ b/src/composables/perks.ts @@ -19,7 +19,7 @@ function focusElem(className: string, delay?: number) { if (dom) { dom.scrollIntoView({ behavior: "smooth", - block: "center", + block: "start", inline: "center", }); } diff --git a/todo b/todo new file mode 100644 index 0000000..f69cb3c --- /dev/null +++ b/todo @@ -0,0 +1,16 @@ +### Server + +- [ ] Debug the watchdog module. It has some weird behavior. +- [ ] Dynamically add files as they are being processed. Current behavior is: process all, then add them at once. This can cause impatience in case of lots of files. +- [ ] Add settings module +- [ ] In case of duplicates, select the higher bitrate track +- [ ] Add and deploy demo branch + +### Client +- [ ] Add processes tab to show running tasks, eg. when tagging files. I have no idea on how to go about it so far. Web sockets? +- [ ] Responsiveness, especially the track list. +- [ ] Make dummy buttons functional. +- [ ] Add settings page (or modal) +- [ ] Add keyboard shortcuts listing page (or modal) +- [ ] Add backspace shortcut to go back. +- [ ] Implement Esc key to cancel modals. \ No newline at end of file