update readme

This commit is contained in:
cwilvx
2025-03-16 00:00:35 +03:00
parent 08fc79150c
commit 7bf7c34539
4 changed files with 50 additions and 13 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 280 KiB

+25 -5
View File
@@ -3,7 +3,7 @@
</div> </div>
<div align="center" style="font-size: 2rem"><b>Swing Music</b></div> <div align="center" style="font-size: 2rem"><b>Swing Music</b></div>
<div align="center"><b><sub><code>v1.4.8</code></sub></b></div> <div align="center"><b><sub><code>v2.0.2</code></sub></b></div>
**<div align="center" style="padding-top: 1.25rem">[Download](https://swingmusic.vercel.app/downloads) • <a href="https://swingmusic.vercel.app/support-us.html" target="_blank">Support Development</a> • [Docs](https://swingmusic.vercel.app/guide/introduction.html) • [Screenshots](https://swingmusic.vercel.app) • [r/SwingMusicApp](https://www.reddit.com/r/SwingMusicApp)</div>** **<div align="center" style="padding-top: 1.25rem">[Download](https://swingmusic.vercel.app/downloads) • <a href="https://swingmusic.vercel.app/support-us.html" target="_blank">Support Development</a> • [Docs](https://swingmusic.vercel.app/guide/introduction.html) • [Screenshots](https://swingmusic.vercel.app) • [r/SwingMusicApp](https://www.reddit.com/r/SwingMusicApp)</div>**
@@ -13,7 +13,27 @@
## ##
Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music. Just run the app and enjoy your music library in a web browser. Swing Music is a fast and beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music. Just run the app and enjoy your music library in a web browser.
## Features
- **Daily Mixes** - generated daily based on your listening activity
- **Metadata normalization** - a clean and consistent library
- **Album versioning** - normalized albums and association with version labels (eg. Deluxe, Remaster, etc)
- **Related artist and albums**
- **Folder view** - Browse your music library by folders
- **Playlist management**
- **Beautiful browser based UI**
- **Silence detection** - Combine cross-fade with silence detection to create a seamless listening experience
- **Collections** - Group albums and artists based on your preferences
- **Statistics** - Get insights into your listening activity
- **Lyrics view**
- **Android client**
- **Last.fm scrobbling**
- **Multi-user support**
- **Cross-platform** - Windows, Linux, MacOS (coming soon), arm64, x86
- **Blazingly fast**
- **Pure awesomeness**
### Installation ### Installation
@@ -35,15 +55,15 @@ chmod a+x ./swingmusic
./swingmusic ./swingmusic
``` ```
The app should start at <http://localhost:1970> by default. Open it in your browser to use Swing Music. You can change the default port by using the `--port` flags. The app should start at <http://localhost:1970> by default. Open it in your browser to configure and use Swing Music. You can change the default port by using the `--port` flag.
```sh ```sh
swingmusic --port 1980 ./swingmusic --port 1980
``` ```
### Options ### 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 flags 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] > [!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).
+22 -8
View File
@@ -14,7 +14,9 @@ class AlbumHashSchema(BaseModel):
albumhash: str = Field( albumhash: str = Field(
description="The album hash", description="The album hash",
example=Defaults.API_ALBUMHASH, json_schema_extra={
"example": Defaults.API_ALBUMHASH,
},
min_length=Defaults.HASH_LENGTH, min_length=Defaults.HASH_LENGTH,
max_length=Defaults.HASH_LENGTH, max_length=Defaults.HASH_LENGTH,
) )
@@ -26,7 +28,9 @@ class ArtistHashSchema(BaseModel):
""" """
artisthash: str = Field( artisthash: str = Field(
description="The artist hash", description="The artist hash",
example=Defaults.API_ARTISTHASH, json_schema_extra={
"example": Defaults.API_ARTISTHASH,
},
min_length=Defaults.HASH_LENGTH, min_length=Defaults.HASH_LENGTH,
max_length=Defaults.HASH_LENGTH, max_length=Defaults.HASH_LENGTH,
) )
@@ -39,7 +43,9 @@ class TrackHashSchema(BaseModel):
trackhash: str = Field( trackhash: str = Field(
description="The track hash", description="The track hash",
example=Defaults.API_TRACKHASH, json_schema_extra={
"example": Defaults.API_TRACKHASH,
},
min_length=Defaults.HASH_LENGTH, min_length=Defaults.HASH_LENGTH,
max_length=Defaults.HASH_LENGTH, max_length=Defaults.HASH_LENGTH,
) )
@@ -52,7 +58,9 @@ class GenericLimitSchema(BaseModel):
limit: int = Field( limit: int = Field(
description="The number of items to return", description="The number of items to return",
example=Defaults.API_CARD_LIMIT, json_schema_extra={
"example": Defaults.API_CARD_LIMIT,
},
default=Defaults.API_CARD_LIMIT, default=Defaults.API_CARD_LIMIT,
) )
@@ -65,8 +73,10 @@ class TrackLimitSchema(BaseModel):
limit: int = Field( limit: int = Field(
description="The number of tracks to return", description="The number of tracks to return",
example=Defaults.API_CARD_LIMIT, json_schema_extra={
default=Defaults.API_CARD_LIMIT, "example": Defaults.API_CARD_LIMIT,
},
default=5,
alias="tracklimit", alias="tracklimit",
) )
@@ -78,7 +88,9 @@ class AlbumLimitSchema(BaseModel):
limit: int = Field( limit: int = Field(
description="The number of albums to return", description="The number of albums to return",
example=Defaults.API_CARD_LIMIT, json_schema_extra={
"example": Defaults.API_CARD_LIMIT,
},
default=Defaults.API_CARD_LIMIT, default=Defaults.API_CARD_LIMIT,
alias="albumlimit", alias="albumlimit",
) )
@@ -91,7 +103,9 @@ class ArtistLimitSchema(BaseModel):
limit: int = Field( limit: int = Field(
description="The number of artists to return", description="The number of artists to return",
example=Defaults.API_CARD_LIMIT, json_schema_extra={
"example": Defaults.API_CARD_LIMIT,
},
default=Defaults.API_CARD_LIMIT, default=Defaults.API_CARD_LIMIT,
alias="artistlimit", alias="artistlimit",
) )
+3
View File
@@ -52,6 +52,7 @@ def get_artist(path: ArtistHashSchema, query: GetArtistQuery):
Returns artist data, tracks and genres for the given artisthash. Returns artist data, tracks and genres for the given artisthash.
""" """
print(query)
artisthash = path.artisthash artisthash = path.artisthash
limit = query.limit limit = query.limit
@@ -68,6 +69,8 @@ def get_artist(path: ArtistHashSchema, query: GetArtistQuery):
if artist.albumcount == 0 and tcount < 10: if artist.albumcount == 0 and tcount < 10:
limit = tcount limit = tcount
print(limit)
try: try:
year = datetime.fromtimestamp(artist.date).year year = datetime.fromtimestamp(artist.date).year
except ValueError: except ValueError: