diff --git a/.github/contributing.md b/.github/contributing.md index 32ebd8ab..31be9f64 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -79,7 +79,9 @@ yarn dev You can see the client at http://localhost:5173. -> The client is hardcoded to hook into the server on port `1980` (to allow the another server instance to be running on the default port). You can follow the instructions above to set up the server in that port, or you can change the port in `swingmusic-client/config.ts`. Don't forget to change it back when in the PR. +> The client is hardcoded to hook into the server on port `1980` (to allow the another server instance to be running on the default port). +> +> You can follow the instructions above to set up the server in that port, or you can change the port in `swingmusic-client/config.ts`. Don't forget to change it back when in the PR. ## Where can I go for help? diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 932ecc2d..dabc0d07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,6 +183,6 @@ jobs: tags: ghcr.io/${{github.repository}}:${{format('v{0}', inputs.tag)}}, ${{env.LATEST_TAG}} labels: org.opencontainers.image.title=Docker build-args: | - client_tag=v${{inputs.tag}} + app_version=${{inputs.tag}} env: LATEST_TAG: ${{ inputs.is_latest == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }} diff --git a/README.md b/README.md index 57f7efc7..d9bf414e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,15 @@ Swing Music is a beautiful, self-hosted music player for your local audio files. Swing Music is available as pre-compiled binaries for Windows and Linux. Just download the latest release from the [downloads page](https://swingmusic.vercel.app/downloads) and launch it. -For Linux, you need to make the file executable first. +[FFmpeg](https://ffmpeg.org/) is needed for the audio silence skip feature, so you need to install it first. On windows, you can follows [this tutorial](https://phoenixnap.com/kb/ffmpeg-windows) to install FFmpeg. + +On Linux, you can install FFmpeg using: + +```sh +sudo apt-get install ffmpeg libavcodec-extra -y +``` + +Then make the file executable first. ```bash chmod a+x ./swingmusic @@ -35,10 +43,10 @@ swingmusic --port 1980 ### Options -Options are flags that can be passed when starting the app in the terminal to tweak runtime settings or perform tasks. You can use the `-h` flag to see all supported options. +Options are flags that can be passed when starting the app in the terminal to tweak runtime settings or perform tasks. You can use the `-h` flag to see all supported options. > [!TIP] -> You can read more about options in [the docs](https://swingmusic.vercel.app/guide/getting-started.html#options). +> You can read more about options in [the docs](https://swingmusic.vercel.app/guide/getting-started.html#options). ### Docker @@ -80,10 +88,9 @@ services: ### Contributing -Swing Music is looking for contributors. If you're interested, please join us at the [Swing Music Community](https://t.me/+9n61PFcgKhozZDE0) group on Telegram. For more information, take a look at https://github.com/swing-opensource/swingmusic/issues/186. - -[Contributing Guidelines](.github/contributing.md). +Swing Music is looking for contributors. If you're interested, please join us at the [Swing Music Community](https://t.me/+9n61PFcgKhozZDE0) group on Telegram. For more information, take a look at https://github.com/swing-opensource/swingmusic/issues/186. +[**CONTRIBUTING GUIDELINES**](.github/contributing.md). ### License diff --git a/app/api/folder.py b/app/api/folder.py index 29aed260..7b2b5843 100644 --- a/app/api/folder.py +++ b/app/api/folder.py @@ -47,12 +47,15 @@ def get_folder_tree(body: FolderTree): pass if req_dir == "$home": - folders = get_folders(root_dirs) + if len(root_dirs) == 1: + req_dir = root_dirs[0] + else: + folders = get_folders(root_dirs) - return { - "folders": folders, - "tracks": [], - } + return { + "folders": folders, + "tracks": [], + } if is_windows(): # Trailing slash needed when drive letters are passed, @@ -102,7 +105,7 @@ class DirBrowserBody(BaseModel): ) -@api.post("/folder/dir-browser") +@api.post("/dir-browser") def list_folders(body: DirBrowserBody): """ List folders @@ -145,7 +148,7 @@ class FolderOpenInFileManagerQuery(BaseModel): ) -@api.get("/folder/show-in-files") +@api.get("/show-in-files") def open_in_file_manager(query: FolderOpenInFileManagerQuery): """ Open in file manager @@ -163,7 +166,7 @@ class GetTracksInPathQuery(BaseModel): ) -@api.get("/folder/tracks/all") +@api.get("/tracks/all") def get_tracks_in_path(query: GetTracksInPathQuery): """ Get tracks in path