mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Fix check_exists() from giving prompts on non-existent files
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import argparse
|
||||
import sys
|
||||
import os
|
||||
from slugify import slugify
|
||||
import spotipy.oauth2 as oauth2
|
||||
|
||||
def input_link(links):
|
||||
@@ -56,6 +57,11 @@ def is_spotify(raw_song):
|
||||
else:
|
||||
return False
|
||||
|
||||
def generate_filename(title):
|
||||
raw_title = title.replace(' ', '_')
|
||||
filename = slugify(raw_title, ok='-_()[]{}', lower=False)
|
||||
return fix_encoding(filename)
|
||||
|
||||
def generate_token():
|
||||
# Please respect this user token :)
|
||||
creds = oauth2.SpotifyClientCredentials(
|
||||
|
||||
Reference in New Issue
Block a user