From aa714b802255667b655f00b6e6dd5d9bcf5c065d Mon Sep 17 00:00:00 2001 From: Leonard Sheng Sheng Lee Date: Mon, 25 Oct 2021 14:10:58 +0200 Subject: [PATCH 1/5] fix: pylint --- .github/workflows/pylint.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 73ea43ae..0b88fe7a 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,23 +1,23 @@ name: Pylint -on: [push] +# yamllint disable-line rule:truthy +on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - pip install -r requirements.txt - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Setup Pylint + run: | + python -m pip install --upgrade pip + pip install pylint + pip install -r requirements.txt + - name: Run Pylint + run: | + pylint $(git ls-files '*.py') From 67c325473f2f662d8a4abaebe29e0ff2cdde953b Mon Sep 17 00:00:00 2001 From: Jayden Date: Mon, 25 Oct 2021 14:14:05 -0400 Subject: [PATCH 2/5] docs(readme): add common errors markdown file --- COMMON_ERRORS.md | 11 +++++++++++ README.md | 14 +++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 COMMON_ERRORS.md diff --git a/COMMON_ERRORS.md b/COMMON_ERRORS.md new file mode 100644 index 00000000..f7e93a2a --- /dev/null +++ b/COMMON_ERRORS.md @@ -0,0 +1,11 @@ +# Introduction + +Below will contain sets of errors that you might get running zspotify. Below will also contain possible fixes to these errors. It is advisable that you read this before posting your error in any support channel. + +## AttributeError: module 'google.protobuf.descriptor' has no attribute '\_internal_create_key + +_Answer:_ + +`pip install --upgrade protobuf` + +This error happens due to a potentially outdated version of protobuf, to fix it upgrade protobuf by using pip. diff --git a/README.md b/README.md index 634a450a..18478a06 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ ![Stars](https://img.shields.io/github/stars/Footsiefat/zspotify.svg) ![Forks](https://img.shields.io/github/forks/Footsiefat/zspotify.svg) ![Size](https://img.shields.io/github/repo-size/Footsiefat/zspotify) + # ZSpotify ### A Spotify downloader needing only a python interpreter and ffmpeg. +

[Discord Server](https://discord.gg/skVNQKtyFq) - [Matrix Server](https://matrix.to/#/#zspotify:matrix.org) - [Gitea Mirror](https://git.robinsmediateam.dev/Footsiefat/zspotify) - [Main Site](https://footsiefat.github.io/) + ``` Requirements: @@ -29,6 +32,7 @@ Python packages: \*\*Git can be installed via apt for Debian-based distros or by downloading the binaries from [git-scm.com](https://git-scm.com/download/win) for Windows. ### Command line usage: + ``` Basic usage: python zspotify Loads search prompt to find then download a specific track, album or playlist @@ -55,7 +59,7 @@ Options that can be configured in zs_config.json: ### Docker Usage -``` +``` Build the docker image from the Dockerfile: docker build -t zspotify . Create and run a container from the image: @@ -63,15 +67,23 @@ Create and run a container from the image: ``` ### Will my account get banned if I use this tool? + Currently no user has reported their account getting banned after using ZSpotify. This isn't to say _you_ won't get banned as it is technically against Spotify's TOS. **Use ZSpotify at your own risk**, the developers of ZSpotify are not responsible if your account gets banned. ### What do I do if I see "Your session has been terminated"? + If you see this, don't worry! Just try logging back in. If you see the incorrect username or password error, reset your password and you should be able to log back in and continue using Spotify. ### Contributing + Please refer to [CONTRIBUTING](CONTRIBUTING.md) ### Changelog + Please refer to [CHANGELOG](CHANGELOG.md) + +### Common Errors + +Please refer to [COMMON_ERRORS](COMMON_ERRORS.md) From 6da4eea12a8d6f1d1026dcdae7ebd16de18f7632 Mon Sep 17 00:00:00 2001 From: Jayden Date: Mon, 25 Oct 2021 14:15:49 -0400 Subject: [PATCH 3/5] docs(common_errors): remove explanation --- COMMON_ERRORS.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/COMMON_ERRORS.md b/COMMON_ERRORS.md index f7e93a2a..a57341c7 100644 --- a/COMMON_ERRORS.md +++ b/COMMON_ERRORS.md @@ -4,8 +4,6 @@ Below will contain sets of errors that you might get running zspotify. Below wil ## AttributeError: module 'google.protobuf.descriptor' has no attribute '\_internal_create_key -_Answer:_ +_Answer(s):_ `pip install --upgrade protobuf` - -This error happens due to a potentially outdated version of protobuf, to fix it upgrade protobuf by using pip. From b62f6bea7fcbb8fc77cc5c5eb1ad6c58021d1694 Mon Sep 17 00:00:00 2001 From: Logykk <35679186+logykk@users.noreply.github.com> Date: Tue, 26 Oct 2021 09:24:07 +1300 Subject: [PATCH 4/5] Added docker hub image to Readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 18478a06..060509c2 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,9 @@ Options that can be configured in zs_config.json: ### Docker Usage ``` -Build the docker image from the Dockerfile: +Pull the official docker image (automatically updates): + docker pull cooper7692/zspotify-docker +Or build the docker image yourself from the Dockerfile: docker build -t zspotify . Create and run a container from the image: docker run --rm -v "$PWD/ZSpotify Music:/ZSpotify Music" -v "$PWD/ZSpotify Podcasts:/ZSpotify Podcasts" -it zspotify From 8a450fd1eec8465c5a8cf90e7df1909ec7a45330 Mon Sep 17 00:00:00 2001 From: jonathan2384 <93066841+jonathan2384@users.noreply.github.com> Date: Tue, 26 Oct 2021 12:58:11 +0900 Subject: [PATCH 5/5] Fix for #127 Simple change to include ?include_groups=album%2Csingle in the api request when function get_artist_albums is used. Sorry if there is something wrong with this, I have not used Python before. It seems to work as expected in my testing. --- zspotify/album.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zspotify/album.py b/zspotify/album.py index 19004d11..2070da24 100644 --- a/zspotify/album.py +++ b/zspotify/album.py @@ -33,7 +33,7 @@ def get_album_name(album_id): def get_artist_albums(artist_id): """ Returns artist's albums """ - resp = ZSpotify.invoke_url(f'{ARTIST_URL}/{artist_id}/albums') + resp = ZSpotify.invoke_url(f'{ARTIST_URL}/{artist_id}/albums?include_groups=album%2Csingle') # Return a list each album's id album_ids = [resp[ITEMS][i][ID] for i in range(len(resp[ITEMS]))] # Recursive requests to get all albums including singles an EPs