More accurate search results

This commit is contained in:
zotify 2023-05-29 23:58:06 +12:00
parent 2908dadc5b
commit 30721125ef
11 changed files with 269 additions and 226 deletions

View file

@ -10,7 +10,8 @@ Formerly ZSpotify.
Available on [zotify.xyz](https://zotify.xyz/zotify/zotify) and [GitHub](https://github.com/zotify-dev/zotify).
## Features
- Save tracks at up to 320kbps*
- Save tracks at up to 320kbps\*
- Save to most popular audio formats
- Built in search
- Bulk downloads
@ -18,9 +19,10 @@ Available on [zotify.xyz](https://zotify.xyz/zotify/zotify) and [GitHub](https:/
- Embedded metadata
- Downloads all audio, metadata and lyrics directly, no substituting from other services.
*Non-premium accounts are limited to 160kbps
\*Non-premium accounts are limited to 160kbps
## Installation
Requires Python 3.10 or greater. \
Optionally requires FFmpeg to save tracks as anything other than Ogg Vorbis.
@ -30,10 +32,12 @@ Enter the following command in terminal to install Zotify. \
## General Usage
### Simplest usage
Downloads specified items. Accepts any combination of track, album, playlist, episode or artists, URLs or URIs. \
`zotify <items to download>`
### Basic options
```
-p, --playlist Download selection of user's saved playlists
-lt, --liked-tracks Download user's liked tracks
@ -45,7 +49,7 @@ Downloads specified items. Accepts any combination of track, album, playlist, ep
<details><summary>All configuration options</summary>
| Config key | Command line argument | Description |
|-------------------------|---------------------------|-----------------------------------------------------|
| ----------------------- | ------------------------- | --------------------------------------------------- |
| path_credentials | --path-credentials | Path to credentials file |
| path_archive | --path-archive | Path to track archive file |
| music_library | --music-library | Path to root of music library |
@ -61,27 +65,31 @@ Downloads specified items. Accepts any combination of track, album, playlist, ep
| ffmpeg_path | --ffmpeg-path | Path to ffmpeg binary |
| ffmpeg_args | --ffmpeg-args | Additional ffmpeg arguments when transcoding |
| save_credentials | --save-credentials | Save login credentials to a file |
| save_subtitles | --save-subtitles |
| save_artist_genres | --save-arist-genres |
| save_subtitles | --save-subtitles |
| save_artist_genres | --save-arist-genres |
</details>
### More about search
- `-c` or `--category` can be used to limit search results to certain categories.
- Available categories are "album", "artist", "playlist", "track", "show" and "episode".
- You can search in multiple categories at once
- Available categories are "album", "artist", "playlist", "track", "show" and "episode".
- You can search in multiple categories at once
- You can also narrow down results by using field filters in search queries
- Currently available filters are album, artist, track, year, upc, tag:hipster, tag:new, isrc, and genre.
- Available filters are album, artist, track, year, upc, tag:hipster, tag:new, isrc, and genre.
- The artist and year filters can be used while searching albums, artists and tracks. You can filter on a single year or a range (e.g. 1970-1982).
- The album filter can be used while searching albums and tracks.
- The genre filter can be used while searching artists and tracks.
- The isrc and track filters can be used while searching tracks.
- The upc, tag:new and tag:hipster filters can only be used while searching albums. The tag:new filter will return albums released in the past two weeks and tag:hipster can be used to show only albums in the lowest 10% of popularity.
- Currently available filters are album, artist, track, year, upc, tag:hipster, tag:new, isrc, and genre.
- Available filters are album, artist, track, year, upc, tag:hipster, tag:new, isrc, and genre.
- The artist and year filters can be used while searching albums, artists and tracks. You can filter on a single year or a range (e.g. 1970-1982).
- The album filter can be used while searching albums and tracks.
- The genre filter can be used while searching artists and tracks.
- The isrc and track filters can be used while searching tracks.
- The upc, tag:new and tag:hipster filters can only be used while searching albums. The tag:new filter will return albums released in the past two weeks and tag:hipster can be used to show only albums in the lowest 10% of popularity.
## Usage as a library
Zotify can be used as a user-friendly library for saving music, podcasts, lyrics and metadata.
Here's a very simple example of downloading a track and its metadata:
```python
import zotify
@ -96,10 +104,11 @@ file.write_cover_art(track.get_cover_art())
```
## Contributing
Pull requests are always welcome, but if adding an entirely new feature we encourage you to create an issue proposing the feature first so we can ensure it's something that fits sthe scope of the project.
Zotify aims to be a comprehensive and user-friendly tool for downloading music and podcasts.
It is designed to be simple by default but offer a high level of configuration for users that want it.
Zotify aims to be a comprehensive and user-friendly tool for downloading music and podcasts.
It is designed to be simple by default but offer a high level of configuration for users that want it.
All new contributions should follow this principle to keep the program consistent.
## Will my account get banned if I use this tool?
@ -110,12 +119,14 @@ However, it is still a possiblity and it is recommended you use Zotify with a bu
Consider using [Exportify](https://github.com/watsonbox/exportify) to keep backups of your playlists.
## Disclaimer
Using Zotify violates Spotify user guidelines and may get your account suspended.
Zotify is intended to be used in compliance with DMCA, Section 1201, for educational, private and fair use, or any simlar laws in other regions. \
Zotify contributors cannot be held liable for damages caused by the use of this tool. See the [LICENSE](./LICENCE) file for more details.
## Acknowledgements
- [Librespot-Python](https://github.com/kokarare1212/librespot-python) does most of the heavy lifting, it's used for authentication, fetching track data, and audio streaming.
- [music-tag](https://github.com/KristoforMaynard/music-tag) is used for writing metadata into the downloaded files.
- [FFmpeg](https://ffmpeg.org/) is used for transcoding audio.