1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00
Commit Graph

90 Commits

Author SHA1 Message Date
Johan Andersson
fa590117de fetcher: handle errors from parsing playlists 2016-10-16 19:35:38 +02:00
Johan Andersson
23814a9bf5 select_quality: fix crash while using range
fixes: #392
2016-05-14 11:17:34 +02:00
Johan Andersson
0fe57c52a2 select_quality: support for range to -q
this is similar to -Q  but instead its -q 2000,3000  . it will choose one in between
fixes: #372
2016-04-26 23:48:12 +02:00
Olof Johansson
5393dc1929 Fix various pylint warnings
None of these were any real problems, but easier to spot real issues if pylint
is a bit quieter. Apart from the pylint overrides being sprinkled over the code
base, this commit also fixes occurences of the following issues:

 - logging-not-lazy
 - logging-format-interpolation
 - unused-import
 - unused-variable
2016-04-03 19:06:45 +02:00
Olof Johansson
fa66beff9b select_quality: Simplify and add comments 2016-03-31 20:33:44 +02:00
Olof Johansson
f59207302d prio_streams: Rename to protocol_prio 2016-03-31 20:33:44 +02:00
Olof Johansson
84ca17a14c select_quality: Replace sys.exits with UIExceptions 2016-03-31 20:19:44 +02:00
Olof Johansson
dad2790d9e select_quality: Filter out unwanted protocols before bitrate
It was easily possible to end up in a state where the bitrate prioritization
wanted a bitrate only avaiable via protocols outside of our set of accepted
protocols, like trying to disable dash for svtplay. By doing the protocol
filtering first, we end up only considering "valid" bitrates.
2016-03-31 20:19:44 +02:00
Olof Johansson
9d2054b4bc select_quality: handle when no requested proto is available
Needs to widen the scope of the try: catch block in svtplay_dl/__init__.py
a little, since select_quality can now also fire away UIExceptions.
2016-03-31 20:19:44 +02:00
Olof Johansson
a6e05e4502 prio_streams: make protocol_prio param mandatory
Move the responsibility for extracting it to select_quality (prio_streams'
caller). This makes the prio_streams function simpler.

And at the same time, move the default protocol_prio list to global scope. This
can for instance be used for improved error reporting.
2016-03-31 20:19:44 +02:00
Olof Johansson
b6541100a3 select_quality: fix argument parsing
Instead of parsing the argument to --stream-prio as a comma separated listed, it
was accidentally handled as a space separated list.
2016-03-31 20:19:44 +02:00
Johan Andersson
e523141a04 support for dash streams 2016-03-26 21:38:31 +01:00
Johan Andersson
4c8cb7c5d2 which: detect if you have the app in your cwd 2016-03-22 23:31:07 +01:00
Johan Andersson
bb861a4062 utils: implement a function to find program in path 2016-03-22 22:28:07 +01:00
Johan Andersson
8da9cab05b filenamify: dont remove the char before and after - 2016-03-17 16:57:12 +01:00
Johan Andersson
05b245dfaa filenamify: replace .-. with only - 2016-03-16 22:51:19 +01:00
Olof Johansson
4740a42050 prio_streams: remove selected from parameters
Moving the responsibility for filtering out "unwanted" bitrates,
as opposed to just present a prioritized list, makes writing
unit tests easier.
2016-03-13 16:56:51 +01:00
Olof Johansson
fe23b971a5 prio_streams: remove options from parameters
Instead, pass the protocol prio list; this was the only reason
we used to pass options. Removing options makes it easier to
unit test.
2016-03-13 16:56:51 +01:00
Olof Johansson
af298e86d9 prio_streams: fix issues with prioritization
Previously, prio_streams didn't correctly account for the protocol,
and we ended up with HDS videos by default, instead of HLS as exected,
because HDS sorts before HLS alphabetically.

Fixes #349
2016-03-13 16:56:51 +01:00
Johan Andersson
f047331b8c pylint fixes 2016-02-29 23:19:01 +01:00
Johan Andersson
3f04ae2a56 swap place on py2 and py3 checks 2016-01-27 19:49:38 +01:00
Johan Andersson
f4b32cb1df Merge pull request #326 from olof/filenamify_improvements
filenamify: disallow shell metachars + improvements
2016-01-10 20:36:07 +01:00
Olof Johansson
7803472713 utils: specify utf-8 encoding in editor modelines 2016-01-10 15:03:45 +01:00
Olof Johansson
f4005505d9 filenamify: Simplify and add unittests 2016-01-10 15:03:45 +01:00
Olof Johansson
9689dc78b0 filenamify: Make title regexp stricter
The - character is a range operator when used in character classes
(e.g. [0-9]). In our case, we want it to match a literal - (which it
coindicentally does, since it's within the range [ -.]. But we don't
want it to match other characters within this range.
2016-01-10 14:33:22 +01:00
Johan Andersson
9dcf203923 option to select which type of streams you prefer
fixes #321
2016-01-03 16:15:27 +01:00
Johan Andersson
eb7bd48d5a utils.http: support for custom headers
fixes: #209
2015-12-26 13:38:36 +01:00
Johan Andersson
ff0ce41b72 utils: update the user-agent 2015-12-26 13:35:55 +01:00
Johan Andersson
ef74148003 Option to not verify ssl certificate 2015-12-26 12:14:14 +01:00
Olof Johansson
270a64c6af Fix docstring after the filenamify changes (f3aba4e59)
This caused the test suite to fail because of doctest.
2015-10-25 19:49:03 +01:00
Johan Andersson
c453f7c48b filenamify: remove “ and ‘
fix #289
2015-10-25 01:29:04 +02:00
Johan Andersson
43dd5f4b2d http.request: dont send headers twice 2015-10-24 21:18:23 +02:00
Johan Andersson
f3aba4e598 filenamify: replace with dot instead of dash 2015-10-19 10:37:15 +02:00
Johan Andersson
64b2ac0240 utils.request: send chrome user-agent instead of the default one 2015-10-04 14:33:08 +02:00
Johan Andersson
dc2cc0294c pip8. expected 2 lines found 1 2015-09-15 20:10:32 +02:00
Johan Andersson
29d00920ad utils: show an error message if requests is not found 2015-09-13 22:05:17 +02:00
Johan Andersson
80a55e2615 utils: unused import 2015-09-13 22:04:47 +02:00
Johan Andersson
1057f800b0 request: only show what request we are getting. 2015-09-07 20:13:36 +02:00
Johan Andersson
06472b5012 utils: remove unused imports 2015-08-31 20:35:23 +02:00
Johan Andersson
ea70ec30bf urllib: remove unused imports 2015-08-31 20:35:05 +02:00
Johan Andersson
331de0a70f replace self.http.get with our own function with debug info 2015-08-31 19:45:15 +02:00
Johan Andersson
a1e987348d download_thumbernail: use request instead 2015-08-30 12:04:49 +02:00
Johan Andersson
f416a17572 ensure_unicode: remove extra space 2015-08-30 00:08:24 +02:00
Johan Andersson
84ee181f5b adding request support.
still need some more work
2015-08-30 00:06:20 +02:00
Johan Andersson
679f40cf35 io: use StringIO instead of BytesIO 2015-04-28 22:58:02 +02:00
Anders Waldenborg
101354ed7e Add urljoin to svtplay_dl.utils.urllib 2015-03-07 10:42:48 +01:00
Johan Andersson
8f89b00c5e unused imports 2015-01-25 14:41:29 +01:00
Johan Andersson
6a374ffa06 Move hdcore check to utils/get_http_data 2015-01-18 18:01:41 +01:00
Johan Andersson
b09b4c17f5 main: --list-quality option 2015-01-05 22:40:40 +01:00
Johan Andersson
d152e02d06 filenamify: dont remove dot 2014-12-28 13:57:11 +01:00