Commit Graph

25 Commits

Author SHA1 Message Date
Mello-Yello
b0a945e2d2 Add the --trim-silence parameter 2018-07-28 11:01:49 +02:00
Mello-Yello
7674db7f71 Trim silence at the beginning of a song 2018-07-27 16:05:44 +02:00
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
c8db9ed5da Improve conversion 2018-02-13 18:03:50 +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
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
fce2a1abcd Fix tests and const.py to hold options 2018-01-11 21:50:40 +05:30
ritiek
a117064791 Refactor conversion and minor changes to metadata 2018-01-10 20:01:37 +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 Malhotra
4a2bbb2535 Expect Python to be already in PATH (#114)
* Expect python to already be in PATH

* Expect python to be in PATH

* Fix special handlling of conversion on windows

* Some cleaning

* Update docs
2017-07-17 20:25:11 +05:30
Linus
75be7285c0 Add description of the new -f option in README.md; Fix minor issues 2017-07-11 18:48:02 +02:00
Ritiek Malhotra
e1ef35b6b9 Fix avconv conversion for -f option 2017-07-11 22:02:13 +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
°Kelvin R
a1544bc1c8 Repo in one folder, typos + additions, better layout (#105)
* fix #100

* typos and additions

* better layout for playlists

* typo typo and some changes

* was in the wrong line

* also changed path to avconv.exe
2017-07-09 18:01:46 +05:30
Ritiek Malhotra
edbec52629 Fix windows specific encoding errors 2017-06-29 13:02:42 +05:30
Ritiek
3009fb8583 Fix encoding errors 2017-06-29 12:34:27 +05:30
Linus
e20be5d97e Fix errors introduced with previous code cleanup 2017-06-28 16:21:58 +02:00
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 Malhotra
93469bbfd9 Fix TypeError in python3 on conversion 2017-06-25 20:59:56 +05:30
Ritiek
e18a74ccc3 Add metadata test 2017-06-25 02:34:55 +05:30
Ritiek
e0fb227ea5 Add conversion test 2017-06-25 01:41:57 +05:30
Ritiek
93244e46ec Fix download test 2017-06-25 01:16:04 +05:30
Ritiek
ae29ff8f87 Split conversion code 2017-06-24 21:49:19 +05:30