* Refactoring and addition of logzero (#172)
* Refactored convert.py and added logging.
* Added logging and refactored.
* Added logzero to requirements.txt
* Added logging to metadata.py
* Created a log in misc.py. Updated slugify import.
* Some general improvement
* Improve message layout
* Improve test mechanism
* Implement debug level logging
* Fix some minor mistakes
* Make pytest happy
* Remove unimplemented --verbose option
* Update ISSUE_TEMPLATE.md
* Rename LICENSE
* Remove obvious from log.debug()
* Show track URL when writing to file (debug)
* 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
Finds a balance between viewcount (Youtube's relevancy) and proper song
duration based on Spotify duration. Thus, a Youtube video that is 30
seconds longer than the Spotify track will not be considered
Takes the first result from Youtube (using Youtube's original ordering
based on relevance) that has a similar duration to the Spotify song
Fixes a bug where if there were no suitable videos for a song, the
program would infinitely loop. The program will now retry to find a song
up to 5 times before moving on (this is necessary because occasionally the
song isn't properly fetched or parsed from Youtube)
Fixes bug where songs that are retried were appended to the playlist
file without being separated by a newline
* Changes in .gitignore file:
- added .python-version
This file is used in pyenv to select good python version.
Changes in core/misc.py:
- added function get_sec to convert HH:mm:ss to seconds
Changes in spotdl.py:
- in function generate_songname
change function to receive generate_metadata, this is optymalization, becouse in oldest version metadata from spotify api is downlaoded 2 times
- in function generate_youtube_url
song variable use changed function generate_songname
function now looking for songs in while, and save data to dict. Dictionary is used in manual and auto mode. In dictionary keep is youtube link, title, videotime (in format HH:mm:ss) and videotime converted to seconds.
For now in automatic downloading is selected video with least difference betwen youtube video time and time from spotify. This is important, becouse in youtube a lot of movies has scenes before/after without musics.
* Fix parameter in generate_songname() and dual calls
* Fix tests
* Skip tests that depend on the location (for the moment)
* Remove unnecessary code
* Rough implementation of playlist link
* Clean code
* Add information about playlist URL
* Update README.md
* Fix bug where script selects wrong playlist
* Minor improvements
* Minor improvements
* Use a Spotify song's title instead of a YouTube video's title
* Added fallback to YouTube title if song's metadata cannot be fetched from Spotify
* Removed duplicate generation of metadata
* Fix test cases that use download_song(..) and generate_filename(..)
* Fix conflicting function
* Fix conflict in check_exists()
* Fix filenames for non spotify songs
* Fix some bugs
* Some documentation changes
* Remove unnecessary determine_filename()
This comment will:
- Transform docstrings above functions into docstrings
- Remove some way too verbose comments
- Apply some more recommendations from PEP8 forgotten last time
- Fix some errors introduced with the first code cleanup
Work left to do:
- Add params to docstrings
- Rename file variables
This refactoring includes:
- Two empty lines before each global function
- Using '{0} {1}'.format(str1, str2) instead of str1 + ' ' + str2
Sometimes this will make lines longer, sometimes shorter.
- Starting all comments with # + space + comment
- Make lines not longer than 80 characters in most cases
- Renaming some variables to make more sense
- Add some missing code like returns and Exceptions
Not included, but follows:
- Make some comments docstrings
- Rename all 'file' variables, only for Python 2
- Remove some way too verbose comments ;)