Commit Graph

85 Commits

Author SHA1 Message Date
Ritiek Malhotra
9afd14282a Very brittle command-line frontend 2020-04-11 22:03:47 +05:30
Ritiek Malhotra
14104e6870 Tests for util.py 2020-04-09 14:02:44 +05:30
Ritiek Malhotra
51da0b7a29 Basic downloading 2020-04-08 08:00:43 +05:30
py-coder
0202c65110 Added leading zeros in track_number.Fixed issue #592 2019-08-01 10:17:24 +05:45
Fereidoon Mehri
597828866b Added --no-remove-original-file. Fixed bug with ffmpeg accessing stdin.
Fixed tests
2019-07-23 14:43:02 +04:30
Ritiek Malhotra
69522331df Fix tests 2019-07-20 21:49:25 +05:30
Ritiek Malhotra
b6c5c88550 Fix tests for now and rephrase comments for clarity 2019-06-03 14:15:35 +05:30
Ritiek Malhotra
bb385a3bfd Skip avconv tests as it is no longer provided in later distros 2019-04-28 15:31:43 +05:30
Ritiek Malhotra
a9477c7873 Fix tests 2019-04-28 15:26:18 +05:30
Ritiek Malhotra
ac7d42535f Replace class SpotifyAuthorize with @must_be_authorized (#506)
* @must_be_authorized decorator for functions in spotify_tools.py

* We don't need this

* Add tests

* Update CHANGELOG.md
2019-02-27 09:48:18 -08:00
Ritiek Malhotra
e9f046bea1 Rebase fixes 2019-02-26 23:41:37 +05:30
Ritiek Malhotra
441c75ec64 Load defaults in test_spotify_tools.py 2019-02-26 10:33:05 +05:30
Ritiek Malhotra
548a87e945 Re-add test for m3u files (removed accidently in #448) 2019-02-26 09:50:59 +05:30
Ritiek Malhotra
ed1c068c36 Add tests 2019-02-26 09:50:59 +05:30
Ritiek Malhotra
ec19491f4f Fix tests and monkeypatch Pafy.download method for version on GitHub 2019-02-26 09:50:59 +05:30
Ritiek Malhotra
925521aa3b Fix tests for now 2019-02-04 20:18:01 +05:30
Ritiek Malhotra
b58c4775f2 Run black formatter on the whole codebase (#460) 2019-01-02 19:22:50 +00:00
Ritiek Malhotra
c6bc994658 Fix conflicts caused by merge of #459 2019-01-03 00:43:37 +05:30
Ritiek Malhotra
53dd292b55 Fix conversion conflicts when both input and output filenames are same (#459)
* Workaround conversion conflicts by appending '.temp' to input filename

* Fix tests

* Add a test and some minor changes

* Update CHANGES.md
2019-01-02 18:54:27 +00:00
Ritiek Malhotra
0d0a85b761 Some updates for using spotdl as library 2018-12-29 14:56:00 +05:30
Ritiek Malhotra
fbc04671d8 Use Black to format code 2018-12-29 14:09:34 +05:30
Ritiek Malhotra
51b01fc448 [WIP] Monkeypatch tests (#448)
* Parameterize test_internals.py

* Create test_spotify_tools.py

* Monkeypatch pafy.download

* Monkeypatch YouTube search page

* Replace globals with fixtures

* Add missing urllib import, re-ordering and rename test_with_metadata.py

* Avoid creating temp directory in current working directory during test

* Update CHANGES.md
2018-12-26 17:15:56 +05:30
Ritiek Malhotra
eae9316cee [WIP] Refactor spotdl.py; introduced classes (#410)
* Refactor spotdl.py; introduced classes

* introduce CheckExists class

* Move these classes to download.py

* Fix refresh_token

* Add a changelog entry
2018-11-25 17:07:56 +05:30
Ritiek Malhotra
c685fa2bfd Rere-fix tests 2018-11-13 21:27:21 +05:30
Manveer Basra
20b5e44ed4 --list flag accepts only text files using mimetypes (#414)
* --list flag accepts only text files using mimetypes

* Refactored for consistency

* Workaround to make tests pass
2018-10-29 23:00:35 -07:00
Ritiek Malhotra
be4bb25c96 Filter unwanted text from Spotify URLs when extracting information (#394)
* Split unwanted URL part

* Convert get_splits() -> extract_spotify_id()

* Add tests for extract_spotify_id()

* Extract Spotify artist ID when fetching artist albums
2018-10-26 18:29:29 +05:30
Ritiek Malhotra
f65034f17e Create a custom user for tests (#405) 2018-10-22 23:03:06 +05:30
Ritiek Malhotra
b12ca8c785 Add support for .m3u playlists (#401)
* Add support for .m3u playlists

* Run black code formatter on changes

* Stay consistent with Spotify test track
2018-10-20 16:19:14 +05:30
Manveer Basra
7d321d9616 Changed test track to one whose lyrics are found (#400)
* Changed test track to one whose lyrics are found

* Fixed incorrect values

* Update playlists test to reflect change in playlist
2018-10-19 20:25:50 +05:30
AlfredoSequeida
2b42f0b3a1 added the ability to get all artist's songs as suggested by #366 (#389)
* added the ability to get all artist's songs as suggested by #366

* added log to featch_all_albums_from_artist function and removed the use of a uri

* updated the functionality to get all albums with the ability to get singles

* updated main function with new write_all_albums_from_artist function to get all albums from an artist

* fixed typos

* updated test case for getting all albums from artist

* fixed typos
2018-10-10 23:53:10 -07:00
Linus Groh
13c83bd225 Introduce usage of black (code formatter) (#393) 2018-10-09 00:57:11 -07:00
Linus Groh
2725402ab3 Update tests (#384)
* Update tests

* Move comment regarding changing YT URLs to the appropriate assert
2018-10-02 15:43:21 +05:30
Ritiek Malhotra
e076d11a19 Overwrite track file with unique tracks 2018-10-02 12:36:55 +05:30
Ritiek Malhotra
e0c8960906 Changes for v1.0.0 release (#345)
* Move spotdl.py inside spotdl directory

* Fix Dockerfile

* Re-upload FFmpeg binary

* Small fixes ;)
2018-09-09 08:00:01 -07:00
Ritiek Malhotra
eb96aa8c13 Handle '.' as a time value separator (#301) 2018-07-04 18:27:14 +05:30
Ritiek Malhotra
dfcb07ed45 Change default music folder (#225)
* Get default music folder via xdg-user-dirs

* Add a test
2018-04-22 21:14:47 +05:30
Ritiek Malhotra
745066a646 Update search query! 2018-04-18 23:13:42 +05:30
Ritiek Malhotra
b6dbc5c00a Show complete list of tracks if metadata not found in manual mode (#266)
* Show complete list of tracks if metadata not found in manual mode

* Add regression test
2018-04-18 19:31:29 +05:30
Ritiek Malhotra
fc226442fe Custom YouTube search string (#261)
* Custom YouTube search string

* Fix sorting issues on < Python 3.6
2018-04-08 15:56:44 +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
c5846d615e Update test for new API key 2018-03-09 20:57:19 +05:30
Ritiek Malhotra
b968b5d206 Scrape YouTube by default and optionally use YouTube API to perform searches (#250)
* YouTube scraping

* Cleanup GenerateYouTubeURL class

* Some minor improvements

* Add test to fetch title with and without api key
2018-03-09 20:40:15 +05:30
Ritiek Malhotra
46f313777b Update music only URL 2018-03-09 16:10:59 +05:30
Ritiek Malhotra
c4bb047187 Test URL is now None 2018-02-24 15:03:42 +05:30
ritiek
54a9f33ba4 Add test for embedding metadata into .webm 2018-01-27 11:20:19 +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
ed235610ad Move common code to loader.py 2018-01-15 14:20:12 +05:30
ritiek
f9d9c7d5fa Refactor tests 2018-01-12 21:56:58 +05:30
ritiek
621e1eb21e Some cleanup 2018-01-12 21:52:43 +05:30