add audio-only download (closes #20)

This commit is contained in:
Alex Shnitman 2021-03-04 11:10:39 +02:00
parent 70b08c6448
commit 52d8d64cb5
4 changed files with 479 additions and 407 deletions

18
Pipfile.lock generated
View File

@ -209,21 +209,21 @@
}, },
"youtube-dl": { "youtube-dl": {
"hashes": [ "hashes": [
"sha256:adcdec2b72ab7b68cd50a4d1e6581173353bcd6f0be175824a4b72ae890d9ae7", "sha256:02432aa2dd0e859e64d74fca2ad624abf3bead3dba811d594100e1cb7897dce7",
"sha256:e8f3074267547bb11b84a6239937bc8c0a6d19419b852eff4e405d62a4f4bf94" "sha256:28663ce51bb35d0a0fa764aed3492b38c570da0a5a62fef3c28f4431522a6d4a"
], ],
"index": "pypi", "index": "pypi",
"version": "==2021.2.22" "version": "==2021.3.3"
} }
}, },
"develop": { "develop": {
"astroid": { "astroid": {
"hashes": [ "hashes": [
"sha256:87ae7f2398b8a0ae5638ddecf9987f081b756e0e9fc071aeebdca525671fc4dc", "sha256:21d735aab248253531bb0f1e1e6d068f0ee23533e18ae8a6171ff892b98297cf",
"sha256:b31c92f545517dcc452f284bc9c044050862fbe6d93d2b3de4a215a6b384bf0d" "sha256:cfc35498ee64017be059ceffab0a25bedf7548ab76f2bea691c5565896e7128d"
], ],
"markers": "python_version >= '3.6'", "markers": "python_version >= '3.6'",
"version": "==2.5.0" "version": "==2.5.1"
}, },
"isort": { "isort": {
"hashes": [ "hashes": [
@ -272,11 +272,11 @@
}, },
"pylint": { "pylint": {
"hashes": [ "hashes": [
"sha256:81ce108f6342421169ea039ff1f528208c99d2e5a9c4ca95cfc5291be6dfd982", "sha256:0e21d3b80b96740909d77206d741aa3ce0b06b41be375d92e1f3244a274c1f8a",
"sha256:a251b238db462b71d25948f940568bb5b3ae0e37dbaa05e10523f54f83e6cc7e" "sha256:d09b0b07ba06bcdff463958f53f23df25e740ecd81895f7d2699ec04bbd8dc3b"
], ],
"index": "pypi", "index": "pypi",
"version": "==2.7.1" "version": "==2.7.2"
}, },
"toml": { "toml": {
"hashes": [ "hashes": [

View File

@ -38,7 +38,9 @@ class Download:
self.format = None self.format = None
elif quality in ('1440p', '1080p', '720p', '480p'): elif quality in ('1440p', '1080p', '720p', '480p'):
res = quality[:-1] res = quality[:-1]
self.format = f'bestvideo[height<={res}]+bestaudio/best[height<={res}]' self.format = f'bestvideo[height<={res}]+bestaudio'
elif quality == 'audio':
self.format = 'bestaudio'
elif quality.startswith('custom:'): elif quality.startswith('custom:'):
self.format = quality[7:] self.format = quality[7:]
else: else:

861
ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,8 @@ export class AppComponent implements AfterViewInit {
{id: "1440p", text: "1440p"}, {id: "1440p", text: "1440p"},
{id: "1080p", text: "1080p"}, {id: "1080p", text: "1080p"},
{id: "720p", text: "720p"}, {id: "720p", text: "720p"},
{id: "480p", text: "480p"} {id: "480p", text: "480p"},
{id: "audio", text: "Audio only"}
]; ];
quality: string = "best"; quality: string = "best";
addInProgress = false; addInProgress = false;