From cb42b4a87833d64b004042327d62ffefe7554fce Mon Sep 17 00:00:00 2001 From: logykk Date: Wed, 24 Nov 2021 21:22:54 +1300 Subject: [PATCH] removed pydub dependency --- requirements.txt | 1 - zspotify/app.py | 4 +--- zspotify/playlist.py | 4 +--- zspotify/track.py | 3 +-- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index b1877ec..8707268 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,5 @@ git+https://github.com/kokarare1212/librespot-python music_tag Pillow protobuf -pydub tabulate tqdm \ No newline at end of file diff --git a/zspotify/app.py b/zspotify/app.py index 75be315..3bf32fa 100644 --- a/zspotify/app.py +++ b/zspotify/app.py @@ -255,9 +255,7 @@ def search(search_term): selection = '' print('\n> SELECT A DOWNLOAD OPTION BY ID') print('> SELECT A RANGE BY ADDING A DASH BETWEEN BOTH ID\'s') - print('> OR PARTICULAR OPTIONS BY ADDING A COMMA BETWEEN ID\'s') - print('> For example, typing 5 to get option 5 or 10-20 to get\nevery option from 10-20 (inclusive)\n') - print('> Or type 10,12,15,18 to get those options in particular') + print('> OR PARTICULAR OPTIONS BY ADDING A COMMA BETWEEN ID\'s\n') while len(selection) == 0: selection = str(input('ID(s): ')) inputs = split_input(selection) diff --git a/zspotify/playlist.py b/zspotify/playlist.py index 67ddb33..36cac39 100644 --- a/zspotify/playlist.py +++ b/zspotify/playlist.py @@ -70,9 +70,7 @@ def download_from_user_playlist(): selection = '' print('\n> SELECT A PLAYLIST BY ID') print('> SELECT A RANGE BY ADDING A DASH BETWEEN BOTH ID\'s') - print('> OR PARTICULAR OPTIONS BY ADDING A COMMA BETWEEN ID\'s') - print('> For example, typing 10 to get one playlist or 10-20 to get\nevery playlist from 10-20 (inclusive)\n') - print('> Or type 10,12,15,18 to get those playlists in particular') + print('> OR PARTICULAR OPTIONS BY ADDING A COMMA BETWEEN ID\'s\n') while len(selection) == 0: selection = str(input('ID(s): ')) playlist_choices = map(int, split_input(selection)) diff --git a/zspotify/track.py b/zspotify/track.py index d7dde3d..fb91b10 100644 --- a/zspotify/track.py +++ b/zspotify/track.py @@ -7,7 +7,6 @@ from typing import Any, Tuple, List from librespot.audio.decoders import AudioQuality from librespot.metadata import TrackId from ffmpy import FFmpeg -from pydub import AudioSegment from const import TRACKS, ALBUM, NAME, ITEMS, DISC_NUMBER, TRACK_NUMBER, IS_PLAYABLE, ARTISTS, IMAGES, URL, \ RELEASE_DATE, ID, TRACKS_URL, SAVED_TRACKS_URL, TRACK_STATS_URL, CODEC_MAP, EXT_MAP, DURATION_MS @@ -132,7 +131,7 @@ def download_track(mode: str, track_id: str, extra_keys={}, disable_progressbar= stream = ZSpotify.get_content_stream( track_id, ZSpotify.DOWNLOAD_QUALITY) create_download_directory(filedir) - total_size = stream.input_stream.size / "" + total_size = stream.input_stream.size time_start = time.time() downloaded = 0