Commit Graph

36 Commits

Author SHA1 Message Date
ritiek
4d18224bb7 Fix embedding of lyrics in mp3 2018-04-02 01:16:45 +05:30
Ritiek Malhotra
96ab547c5c Support FLAC output format (#259)
* Convert to .flac option

* Embed metadata to FLAC

* Update usage help

* Write tests
2018-04-02 00:47:31 +05:30
Ritiek Malhotra
3e6b2d7702 Increase coverage (#218)
* Monkeypatch fetch user and use pytest.tempdir

* Cover spotify_tools.grab_album()

* Cover avconv conversion

* Cover grab_single()

* Reduce code repetition

* Move grab_playlist() to spotify_tools.py

* Move Spotify specific functions to spotify_tools.py

* Refactoring

* Return track list from write_tracks()

* Fix tests

* Cover more cases in generate_youtube_url()

* Test for unavailable audio streams

* Test for filename without spaces

* handle.py 100% coverage

* Improve config tests

* Speed up tests

* Install avconv and libfdk-aac

* Some cleaning

* FFmpeg with libfdk-aac, libopus

* Some refactoring

* Convert tmpdir to string

* Cover YouTube title when downloading from list

* Explicitly cover some internals.py functions
2018-01-26 20:44:37 +05:30
Suhas Karanth
caba5a1c3b Fix already_tagged check for mp4 in metadata.py>compare (#219) 2018-01-24 21:03:00 +05:30
Ritiek Malhotra
fcfebc55e6 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
2018-01-19 13:58:27 +05:30
ritiek
da68ca3989 Fix conflicts 2018-01-12 17:09:13 +05:30
ritiek
8c76bd8ea3 Fix conflicts 2018-01-12 15:56:09 +05:30
ritiek
fce2a1abcd Fix tests and const.py to hold options 2018-01-11 21:50:40 +05:30
Ritiek Malhotra
58cfa121f3 Write lyrics to track metadata (#194)
* TODO: Don't throw traceback if no lyrics found

* Add more metadata fields

* Refactor debug logging

* Fix traceback when lyrics not found

* It already vomits metadata :3

* Bump lyricwikia >= 0.1.8
2018-01-11 02:13:23 +05:30
ritiek
a117064791 Refactor conversion and minor changes to metadata 2018-01-10 20:01:37 +05:30
ritiek
ea6d52999f Refactor metadata 2018-01-09 17:12:26 +05:30
Ritiek Malhotra
df513acc35 Add logging capability (#175)
* 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)
2017-12-15 19:57:57 +05:30
ritiek
618476eca7 Update ISRC metadata 2017-11-13 21:33:29 +05:30
ritiek
2f0018adce Fix ValueError if publisher not found 2017-10-20 14:27:37 +05:30
ritiek
9068f6008e Fix albumart exception in .M4A downloads 2017-09-27 10:26:03 +05:30
ritiek
f9e85d3796 albumart out of range exception 2017-09-27 10:22:25 +05:30
ritiek
6ac25bda0c Fix KeyError when ISRC info unavailable 2017-07-20 05:18:52 +05:30
Linus
cc7260dfa6 Add command line option for target folder (-f) 2017-07-11 18:16:41 +02:00
Ritiek Malhotra
5add1fd0f8 Drop python 2 compatibility (#107) 2017-07-11 20:32:26 +05:30
Ritiek Malhotra
b677a5454e Catch None TypeError when comparing metadata 2017-07-06 19:21:47 +05:30
Linus
0f384bb5ee Add docstrings; Remove verbose comments; Fix errors introduced with cleanup
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
2017-06-28 16:21:58 +02:00
Linus
587f907ed8 Apply most best practices of PEP 8
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 ;)
2017-06-28 16:21:58 +02:00
Ritiek
ccebb8a002 Remove unnecessary return 2017-06-25 11:35:23 +05:30
Ritiek
e18a74ccc3 Add metadata test 2017-06-25 02:34:55 +05:30
Ritiek
fb3c7e9ec3 Improve metadata fixing mechanism 2017-06-24 20:38:06 +05:30
Ritiek
23e44c1158 Skip if copyright info unavailable 2017-06-23 09:47:29 +05:30
Ritiek
acfb2f0173 Fix encoding problems hopefully 2017-06-21 14:13:32 +05:30
Ritiek
5aa8c66db3 Small encoding changes 2017-06-21 12:58:15 +05:30
Ritiek
086dc846bd Bug fix change tag to tags 2017-06-18 03:27:36 +05:30
Ritiek
80c167e702 Add lots of comments 2017-06-18 02:57:55 +05:30
Ritiek Malhotra
9236affd0e Embed only lead artist for compatibility purposes 2017-06-16 23:47:44 +05:30
Ritiek
e2af7bf1f3 Small fixes 2017-06-16 22:07:42 +05:30
Ritiek
c9e341e2ef Change back to functions for consistency 2017-06-16 21:12:03 +05:30
Ritiek
5fcdc3c227 Fix imports for python3 2017-06-16 18:04:08 +05:30
Ritiek
280ff41633 Make functions and class names a little verbose 2017-06-16 14:40:12 +05:30
Ritiek
e9c247ead9 Switch to class for embedding metadata 2017-06-16 14:35:14 +05:30