Compare commits
5 commits
288d21e489
...
e2330a15c4
Author | SHA1 | Date | |
---|---|---|---|
e2330a15c4 | |||
9b5b09011e | |||
1e1fe6dd16 | |||
21dbc8659d | |||
3e955b2d8f |
6 changed files with 21 additions and 17 deletions
6
Caddyfile
Normal file
6
Caddyfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
http://localhost:4010 {
|
||||||
|
file_server {
|
||||||
|
root ./frontend
|
||||||
|
}
|
||||||
|
reverse_proxy /ws 127.0.0.1:4009
|
||||||
|
}
|
20
Makefile
20
Makefile
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: run test build frontend backend
|
.PHONY: run run-backend run-frontend test
|
||||||
|
|
||||||
run:
|
run:
|
||||||
# See backend/config.py for more fields
|
# See backend/config.py for more fields
|
||||||
|
@ -6,15 +6,11 @@ run:
|
||||||
COOKIES_DIR=cookies \
|
COOKIES_DIR=cookies \
|
||||||
python3 ./backend/main.py
|
python3 ./backend/main.py
|
||||||
|
|
||||||
|
run-backend: run
|
||||||
|
|
||||||
|
run-frontend:
|
||||||
|
@echo 'Only for development environment!'
|
||||||
|
caddy run
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@python3 -m unittest discover -vcs ./backend
|
python3 -m unittest discover -vcs ./backend
|
||||||
|
|
||||||
build:
|
|
||||||
make frontend
|
|
||||||
make backend
|
|
||||||
|
|
||||||
frontend:
|
|
||||||
@cd frontend && echo 'Not implemented'
|
|
||||||
|
|
||||||
backend:
|
|
||||||
@cd backend && echo 'Not implemented'
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Config:
|
||||||
)
|
)
|
||||||
|
|
||||||
# Proxy URL for yt_proxied downloader (can be used for geo-restricted content)
|
# Proxy URL for yt_proxied downloader (can be used for geo-restricted content)
|
||||||
self.yt_proxy = os.getenv('YT_PROXY') or 'http://127.0.0.1:1080'
|
self.yt_proxy = os.getenv('YT_PROXY') or None
|
||||||
|
|
||||||
self.save_lyrics = _parse_bool(os.getenv('SAVE_LYRICS'), True)
|
self.save_lyrics = _parse_bool(os.getenv('SAVE_LYRICS'), True)
|
||||||
self.save_cover = _parse_bool(os.getenv('SAVE_COVER'), True)
|
self.save_cover = _parse_bool(os.getenv('SAVE_COVER'), True)
|
||||||
|
|
|
@ -69,7 +69,7 @@ class TestPostProcessorsOnFakeData(TestCase):
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
raise RuntimeError(f'FFmpeg returned {ret} exit code')
|
raise RuntimeError(f'FFmpeg returned {ret} exit code')
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
self.skipTest(f'Error while writing empty MP3: {err:r}')
|
self.skipTest(f'Error while writing empty MP3: {err!r}')
|
||||||
|
|
||||||
id3pp.ID3TagsPP().run(INFO_AFTER)
|
id3pp.ID3TagsPP().run(INFO_AFTER)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ class _CreateYDL:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def yt_proxied() -> YoutubeDL:
|
def yt_proxied() -> YoutubeDL:
|
||||||
ydl = _CreateYDL.youtube()
|
ydl = _CreateYDL.youtube()
|
||||||
ydl.params['proxy'] = config.get().yt_proxy
|
proxy = config.get().yt_proxy
|
||||||
|
if proxy is not None:
|
||||||
|
ydl.params['proxy'] = proxy
|
||||||
return ydl
|
return ydl
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
websockets==12.0
|
websockets==12.0
|
||||||
yt-dlp==2024.4.9
|
yt-dlp==2024.5.27
|
||||||
mutagen==1.47.0
|
mutagen==1.47.0
|
||||||
urllib3==2.2.1
|
urllib3==2.2.1
|
||||||
lxml==5.2.1
|
lxml==5.2.2
|
||||||
|
|
Loading…
Add table
Reference in a new issue