resolved merge conflicts

This commit is contained in:
Raju komati 2021-10-24 18:54:56 +05:30
commit 441da8eef0
No known key found for this signature in database
GPG Key ID: D0390D7534A9E462
3 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ Requirements:
Binaries
- Python 3.8 or greater
- Python 3.9 or greater
- ffmpeg*
- Git**

View File

@ -28,7 +28,7 @@ def get_album_tracks(album_id):
def get_album_name(album_id):
""" Returns album name """
resp = ZSpotify.invoke_url(f'{ALBUM_URL}/{album_id}')
return sanitize_data(resp[ARTISTS][0][NAME]), sanitize_data(resp[NAME])
return resp[ARTISTS][0][NAME], sanitize_data(resp[NAME])
def get_artist_albums(artist_id):

View File

@ -1,3 +1,4 @@
import os
from typing import Optional
from librespot.metadata import EpisodeId
@ -47,10 +48,11 @@ def download_episode(episode_id) -> None:
episode_id = EpisodeId.from_base62(episode_id)
stream = ZSpotify.get_content_stream(episode_id, ZSpotify.DOWNLOAD_QUALITY)
create_download_directory(ZSpotify.get_config(ROOT_PODCAST_PATH) + extra_paths)
download_directory = os.path.dirname(__file__) + ZSpotify.get_config(ROOT_PODCAST_PATH) + extra_paths
create_download_directory(download_directory)
total_size = stream.input_stream.size
with open(ZSpotify.get_config(ROOT_PODCAST_PATH) + extra_paths + filename + MusicFormat.OGG.value,
with open(download_directory + filename + MusicFormat.OGG.value,
'wb') as file, tqdm(
desc=filename,
total=total_size,
@ -63,6 +65,4 @@ def download_episode(episode_id) -> None:
stream.input_stream.stream().read(ZSpotify.get_config(CHUNK_SIZE))))
# convert_audio_format(ROOT_PODCAST_PATH +
# extra_paths + filename + '.ogg')
# related functions that do stuff with the spotify API
# extra_paths + filename + '.ogg')