Save file names using a custom format specifiers (#205)

* Use custom formats to generate file name

* Do not mess up search term

* Fix tests

* Fix conflicting names

* Fix subprocess call on file paths with spaces

* Create directories and keep spaces as defaults

* Fix config merge

* Remove underscores from default file format

* Remove debug info

* Show possible formats in usage help
This commit is contained in:
Ritiek Malhotra
2018-01-19 13:58:27 +05:30
committed by GitHub
parent ed235610ad
commit fcfebc55e6
11 changed files with 145 additions and 95 deletions

View File

@@ -66,7 +66,10 @@ def generate_metadata(raw_song):
except lyricwikia.LyricsNotFound:
meta_tags['lyrics'] = None
# remove unused clutter when debug meta_tags
# fix clutter
meta_tags['year'], *_ = meta_tags['release_date'].split('-')
meta_tags['duration'] = meta_tags['duration_ms'] / 1000.0
del meta_tags['duration_ms']
del meta_tags['available_markets']
del meta_tags['album']['available_markets']