Prep for dev release
This commit is contained in:
parent
2782ee568d
commit
0b4216c0b0
6 changed files with 17 additions and 10 deletions
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
|
|
@ -19,7 +19,8 @@
|
|||
"cwd": "${workspaceFolder}/ui",
|
||||
"env": {
|
||||
"NUXT_PUBLIC_WSS": ":8081/",
|
||||
}
|
||||
},
|
||||
"console": "internalConsole"
|
||||
},
|
||||
{
|
||||
"name": "Python: main.py",
|
||||
|
|
@ -34,8 +35,8 @@
|
|||
"YTP_TEMP_PATH": "${workspaceFolder}/var/tmp",
|
||||
"YTP_URL_HOST": "http://localhost:8081",
|
||||
"YTP_LOG_LEVEL": "DEBUG",
|
||||
"YTP_DEBUG": "true",
|
||||
"YTP_YTDL_DEBUG": "true",
|
||||
"YTP_DEBUG": "false",
|
||||
"YTP_YTDL_DEBUG": "false",
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ class Download:
|
|||
if self.info.status == 'error' and 'error' in status:
|
||||
self.info.error = status.get('error')
|
||||
asyncio.create_task(
|
||||
self.emitter.error(dl=self.info, message=self.info.error),
|
||||
self.emitter.error(message=self.info.error, data=self.info),
|
||||
name=f"emitter-e-{self.id}")
|
||||
|
||||
if 'downloaded_bytes' in status:
|
||||
|
|
|
|||
|
|
@ -35,8 +35,11 @@ class Emitter:
|
|||
async def cleared(self, id: str, dl: dict = None, **kwargs):
|
||||
await self.emit('cleared', id, **kwargs)
|
||||
|
||||
async def error(self, dl: dict, message: str, **kwargs):
|
||||
await self.emit('error', (dl, message), **kwargs)
|
||||
async def error(self, message: str, data: dict = {}, **kwargs):
|
||||
msg = {'status': 'error', 'message': message, 'data': {}}
|
||||
if data:
|
||||
msg.update({'data': data})
|
||||
await self.emit('error', msg, **kwargs)
|
||||
|
||||
async def warning(self, message: str, **kwargs):
|
||||
await self.emit('error', message, **kwargs)
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from urllib.parse import quote
|
|||
from .Utils import calcDownloadPath
|
||||
from .ffprobe import FFProbe
|
||||
|
||||
|
||||
class M3u8:
|
||||
ok_vcodecs: tuple = ('h264', 'x264', 'avc',)
|
||||
ok_acodecs: tuple = ('aac', 'mp3',)
|
||||
ok_acodecs: tuple = ('aac', 'm4a', 'mp3',)
|
||||
|
||||
url: str = None
|
||||
duration: float = 6.000000
|
||||
|
|
|
|||
2
pyproject.toml
Normal file
2
pyproject.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[tool.autopep8]
|
||||
--max-line-length = 120
|
||||
|
|
@ -33,12 +33,12 @@ export const useSocketStore = defineStore('socket', () => {
|
|||
socket.value.on('added', stream => {
|
||||
const item = JSON.parse(stream);
|
||||
stateStore.add('queue', item._id, item);
|
||||
toast.success(`Item queued successfully: ${ag(stateStore.get('queue', item._id, {}), 'title')}`);
|
||||
toast.success(`Item queued: ${ag(stateStore.get('queue', item._id, {}), 'title')}`);
|
||||
});
|
||||
|
||||
socket.value.on('error', stream => {
|
||||
const [item, error] = JSON.parse(stream);
|
||||
toast.error(`${item?.id}: Error: ${error}`);
|
||||
const json = JSON.parse(stream);
|
||||
toast.error(`${json.data?.id ?? json?.status}: ${json?.message}`);
|
||||
});
|
||||
|
||||
socket.value.on('completed', stream => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue