mirror of
				https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
				synced 2025-11-03 21:10:34 +00:00 
			
		
		
		
	resolved merge conflicts
This commit is contained in:
		
						commit
						441da8eef0
					
				@ -14,7 +14,7 @@ Requirements:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Binaries
 | 
					Binaries
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Python 3.8 or greater
 | 
					- Python 3.9 or greater
 | 
				
			||||||
- ffmpeg*
 | 
					- ffmpeg*
 | 
				
			||||||
- Git**
 | 
					- Git**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@ def get_album_tracks(album_id):
 | 
				
			|||||||
def get_album_name(album_id):
 | 
					def get_album_name(album_id):
 | 
				
			||||||
    """ Returns album name """
 | 
					    """ Returns album name """
 | 
				
			||||||
    resp = ZSpotify.invoke_url(f'{ALBUM_URL}/{album_id}')
 | 
					    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):
 | 
					def get_artist_albums(artist_id):
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					import os
 | 
				
			||||||
from typing import Optional
 | 
					from typing import Optional
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from librespot.metadata import EpisodeId
 | 
					from librespot.metadata import EpisodeId
 | 
				
			||||||
@ -47,10 +48,11 @@ def download_episode(episode_id) -> None:
 | 
				
			|||||||
        episode_id = EpisodeId.from_base62(episode_id)
 | 
					        episode_id = EpisodeId.from_base62(episode_id)
 | 
				
			||||||
        stream = ZSpotify.get_content_stream(episode_id, ZSpotify.DOWNLOAD_QUALITY)
 | 
					        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
 | 
					        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(
 | 
					                  'wb') as file, tqdm(
 | 
				
			||||||
            desc=filename,
 | 
					            desc=filename,
 | 
				
			||||||
            total=total_size,
 | 
					            total=total_size,
 | 
				
			||||||
@ -64,5 +66,3 @@ def download_episode(episode_id) -> None:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # convert_audio_format(ROOT_PODCAST_PATH +
 | 
					        # convert_audio_format(ROOT_PODCAST_PATH +
 | 
				
			||||||
        #                     extra_paths + filename + '.ogg')
 | 
					        #                     extra_paths + filename + '.ogg')
 | 
				
			||||||
 | 
					 | 
				
			||||||
        # related functions that do stuff with the spotify API
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user