Minor tweaks (#154)

* Minor tweaks

Use at your own risk. Just thought I’d contribute at least a little bit

* Exit code 0

Exit code 0 is standard for notifying the system of a regular, non-error exit.

* No longer need unnecessary flag

* Fix `already_tagged` not defined

* <3 Zen of Python

* Silly me
This commit is contained in:
Aareon Sullivan
2017-12-08 01:47:36 -08:00
committed by Ritiek Malhotra
parent 84b6ec601b
commit 77baa71d24
2 changed files with 3 additions and 5 deletions

View File

@@ -127,7 +127,7 @@ def filter_path(path):
def grace_quit():
print('\n\nExiting.')
sys.exit()
sys.exit(0)
def get_sec(time_str):
v = time_str.split(':', 3)

View File

@@ -236,10 +236,8 @@ def write_album(album):
def download_song(file_name, content):
"""Download the audio file from YouTube."""
if args.input_ext == '.webm':
link = content.getbestaudio(preftype='webm')
elif args.input_ext == '.m4a':
link = content.getbestaudio(preftype='m4a')
if args.input_ext in (".webm", ".m4a"):
link = content.getbestaudio(preftype=args.input_ext[1:])
else:
return False