mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
* Applied a check on null result in case of no youtube search * Allow fetch metadata from spotify upon searching spotify-url and no-metadata * updated changes.md * Updated CHANGES.md as per suggestion * removed unnecessary bool hit Co-Authored-By: Amit-L <amit.lawanghare@gmail.com> * removed unnecessary bool hit, anti PEP 8 Co-Authored-By: Amit-L <amit.lawanghare@gmail.com> * resolved conflicts * Error shown no videos found * Dont to show any manual option for no result
This commit is contained in:
committed by
Ritiek Malhotra
parent
51b01fc448
commit
1cf421960c
@@ -50,8 +50,10 @@ def match_video_and_metadata(track, force_pafy=True):
|
||||
if not const.args.no_metadata:
|
||||
meta_tags = spotify_tools.generate_metadata(track)
|
||||
else:
|
||||
if not const.args.no_metadata:
|
||||
# Let it generate metadata, youtube doesn't know spotify slang
|
||||
if not const.args.no_metadata or internals.is_spotify(track):
|
||||
meta_tags = spotify_tools.generate_metadata(track)
|
||||
|
||||
if force_pafy:
|
||||
content = go_pafy(track, meta_tags)
|
||||
else:
|
||||
@@ -172,6 +174,10 @@ class GenerateYouTubeURL:
|
||||
)
|
||||
|
||||
def _best_match(self, videos):
|
||||
if not videos:
|
||||
log.error("No videos found on YouTube for a given search")
|
||||
return None
|
||||
|
||||
""" Select the best matching video from a list of videos. """
|
||||
if const.args.manual:
|
||||
log.info(self.raw_song)
|
||||
|
||||
Reference in New Issue
Block a user