mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
This commit is contained in:
committed by
Ritiek Malhotra
parent
9fe216135b
commit
8dae25fb42
@@ -1,10 +1,17 @@
|
|||||||
from slugify import SLUG_OK, slugify
|
import sys
|
||||||
from core import const
|
from core import const
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
log = const.log
|
log = const.log
|
||||||
|
|
||||||
|
try:
|
||||||
|
from slugify import SLUG_OK, slugify
|
||||||
|
except ImportError:
|
||||||
|
log.error('Oops! `unicode-slugify` was not found.')
|
||||||
|
log.info('Please remove any other slugify library and install `unicode-slugify`')
|
||||||
|
sys.exit(5)
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
formats = { 0 : 'track_name',
|
formats = { 0 : 'track_name',
|
||||||
1 : 'artist',
|
1 : 'artist',
|
||||||
2 : 'album',
|
2 : 'album',
|
||||||
@@ -100,6 +107,7 @@ def filter_path(path):
|
|||||||
os.remove(os.path.join(path, temp))
|
os.remove(os.path.join(path, temp))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def videotime_from_seconds(time):
|
def videotime_from_seconds(time):
|
||||||
if time < 60:
|
if time < 60:
|
||||||
return str(time)
|
return str(time)
|
||||||
|
|||||||
Reference in New Issue
Block a user