Commit Graph

908 Commits

Author SHA1 Message Date
Ritiek Malhotra
dc6019a1a5 Reduce Travis CI build time by more than 90% (#115)
Travis CI now downloads a pre-compiled FFmpeg binary instead of building one on every run. Test duration dropped from 10 mins to about 50 secs.
2017-07-18 14:43:33 +05:30
Ritiek Malhotra
0607003cfa Revert 2017-07-18 13:42:56 +05:30
Ritiek Malhotra
1b56888cb0 Use pre-compiled ffmpeg binary 2017-07-18 13:40:18 +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
WMP
4cf8a210bf Change for automatical download video with this same duration as spotify song (#111)
* 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
2017-07-17 20:20:29 +05:30
Ritiek Malhotra
9564a71035 Add -p option to directly download playlists with URL (#110)
* 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
2017-07-12 13:37:15 +05:30
ritiek
ce3a6c3d5a Replace '/' with '_' instead of deleting it 2017-07-12 00:03:38 +05:30
Rutger Rauws
d28ff08a69 Use a Spotify song's title instead of a YouTube video's title (#99)
* 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()
2017-07-11 23:14:56 +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
Linus Groh
b73d0b1049 Fix rendering issue in README.md 2017-07-11 16:14:17 +02:00
Linus Groh
c80f2996fb Add and fix some information in README.md 2017-07-11 15:36:15 +02:00
°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
b0c3627f51 Fixes #104 2017-07-09 11:27:52 +05:30
Ritiek Malhotra
06ca861efb Fix some misleading information 2017-07-07 23:12:56 +05:30
WMP
90553875a6 Show youtube link in manual mode (#102) (Fixes #101)
My changes for #101 issue
2017-07-07 23:09:04 +05:30
Ritiek Malhotra
0a5ac043f3 Fix test_check_exists2() 2017-07-06 22:44:09 +05:30
Ritiek Malhotra
b677a5454e Catch None TypeError when comparing metadata 2017-07-06 19:21:47 +05:30
Ritiek Malhotra
484d81ef2e Fix failing of consecutive tests 2017-07-06 19:05:05 +05:30
Ritiek Malhotra
87217adef1 Merge pull request #95 from linusg/master
Clean up code to match PEP8
2017-07-06 17:20:18 +05:30
Ritiek Malhotra
0f0b4bc086 Fix UnicodeDecodeError when retreiving some titles 2017-07-06 17:06:58 +05:30
Linus
0bc484e032 Resolve merge conflict due to refactoring 2017-07-05 21:32:51 +02:00
Linus
920c065fd8 Fix last errors of PEP8 refactoring 2017-07-05 21:28:27 +02:00
Ritiek Malhotra
d03da58fed Fix windows specific encoding errors 2017-06-29 13:04:19 +05:30
Ritiek Malhotra
2270fb89a3 Fix windows specific encoding errors 2017-06-29 13:03:30 +05:30
Ritiek Malhotra
edbec52629 Fix windows specific encoding errors 2017-06-29 13:02:42 +05:30
Ritiek Malhotra
6307d1e775 Fix windows specific encoding errors 2017-06-29 13:02:03 +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
Linus Groh
4132e414c4 Add check for nonexistent playlists showing up for some reason (#92) 2017-06-27 14:01:49 +05:30
Ritiek Malhotra
2868c6f29f Merge pull request #90 from ritiek/develop
Fetch all user playlists (not just limit to 50 max)
2017-06-26 19:58:30 +05:30
Ritiek
8af2479389 Update mechanism for fetching playlist tracks 2017-06-26 19:44:02 +05:30
Ritiek Malhotra
e90b5a4b4e Fetches all user playlists now (was limited to 50) 2017-06-26 19:18:22 +05:30
Ritiek Malhotra
6860151d78 Handle playlists with more than 50 tracks 2017-06-26 14:43:38 +05:30
Ritiek Malhotra
2aa788432a Merge pull request #87 from ritiek/develop
Add tests and some other minor improvements
2017-06-26 10:57:55 +05:30
Ritiek Malhotra
1e3631401a Merge branch 'master' into develop 2017-06-26 02:24:29 +05:30
Ritiek Malhotra
2e09d65c3e Add ISSUE_TEMPLATE.md 2017-06-26 01:30:54 +05:30
Ritiek Malhotra
8ef4e95a7c Command to run tests 2017-06-25 23:41:32 +05:30
Ritiek Malhotra
93469bbfd9 Fix TypeError in python3 on conversion 2017-06-25 20:59:56 +05:30
Ritiek
a31426886b Fix error on conversion in python3 2017-06-25 20:55:07 +05:30
Ritiek
9e2a5751d3 Fix error on conversion in python3 2017-06-25 20:51:59 +05:30
Ritiek Malhotra
1be2e3822b Update make command 2017-06-25 19:51:53 +05:30
Ritiek Malhotra
cbbc9e60a5 Update .travis.yml 2017-06-25 19:40:42 +05:30
Ritiek Malhotra
eca932fd9d Update README.md 2017-06-25 19:36:07 +05:30
Ritiek Malhotra
494eaf3f0b Update .travis.yml 2017-06-25 19:24:59 +05:30
Ritiek Malhotra
bd28f868b3 Update .travis.yml 2017-06-25 19:20:27 +05:30