Compare commits
3 commits
03458db829
...
c8e2f1fa1c
Author | SHA1 | Date | |
---|---|---|---|
c8e2f1fa1c | |||
97a37e3dbf | |||
2d0e424b5b |
3 changed files with 60 additions and 2 deletions
2
LICENSE
2
LICENSE
|
@ -187,7 +187,7 @@
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright 2024 Andrey DarkCat09
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
58
README.md
58
README.md
|
@ -5,3 +5,61 @@ converts to MP3, adds ID3 tags, searches for lyrics on Genius and writes to ID3.
|
||||||
|
|
||||||
Written in Python, because creating an interpreter process
|
Written in Python, because creating an interpreter process
|
||||||
on each yt-dlp invoke is unreasonable.
|
on each yt-dlp invoke is unreasonable.
|
||||||
|
|
||||||
|
# Example configs
|
||||||
|
|
||||||
|
`/home/mdlp/src` contains cloned git repo, `/home/mdlp/venv` is a python venv.
|
||||||
|
|
||||||
|
## nginx
|
||||||
|
```
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
|
server_name mdlp.domain.tld;
|
||||||
|
root /home/mdlp/src/frontend;
|
||||||
|
|
||||||
|
# https://ssl-config.mozilla.org/#server=nginx&version=1.26.0&config=modern&openssl=1.1.1k&guideline=5.7
|
||||||
|
#ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem
|
||||||
|
#ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem
|
||||||
|
#ssl_trusted_certificate /etc/letsencrypt/live/domain.tld/chain.pem
|
||||||
|
#...
|
||||||
|
|
||||||
|
location /ws {
|
||||||
|
proxy_pass http://127.0.0.1:4009;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## openrc
|
||||||
|
```
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
export HOST=127.0.0.1
|
||||||
|
export PORT=4009
|
||||||
|
export YT_PROXY="http://user:pass@host:port"
|
||||||
|
|
||||||
|
name=$RC_SVCNAME
|
||||||
|
command="/home/mdlp/venv/bin/python3"
|
||||||
|
command_args="/home/mdlp/src/backend/main.py"
|
||||||
|
command_user="mdlp"
|
||||||
|
directory="/home/mdlp"
|
||||||
|
|
||||||
|
error_log="/var/log/$RC_SVCNAME/error.log"
|
||||||
|
|
||||||
|
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
||||||
|
command_background="yes"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
||||||
|
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ addEventListener('DOMContentLoaded', () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const socket = new WebSocket('ws://127.0.0.1:4009')
|
const socket = new WebSocket('/ws')
|
||||||
|
|
||||||
const itemsDiv = document.getElementById('items-container')
|
const itemsDiv = document.getElementById('items-container')
|
||||||
let items = []
|
let items = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue