Bumping version
This commit is contained in:
1 parent
299dc3b1b0
commit
b08d411b21
5 files changed
+45
-40
No files matched your search
+29
-30
@@ -134,8 +134,8 @@ export default function Home() {
|
||||
<List
|
||||
grid={{
|
||||
gutter: 12,
|
||||
xs: 20,
|
||||
sm: 18,
|
||||
xs: 24,
|
||||
sm: 24,
|
||||
md: 12,
|
||||
lg: 8,
|
||||
xl: 6,
|
||||
@@ -147,37 +147,36 @@ export default function Home() {
|
||||
<Card
|
||||
shadows='hover'
|
||||
style={{
|
||||
maxWidth: 360,
|
||||
margin: '8px 2px',
|
||||
flexGrow: 1,
|
||||
// maxWidth: 360,
|
||||
margin: '9px 0px',
|
||||
width: '100%'
|
||||
// flexGrow: 1,
|
||||
}}
|
||||
bodyStyle={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between'
|
||||
// display: 'flex',
|
||||
// alignItems: 'center',
|
||||
// justifyContent: 'space-between'
|
||||
}}>
|
||||
<div style={{ position: 'absolute', right: "10%", top: 9}}>{item.status}</div>
|
||||
<div style={{ flexGrow: 1}}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<h3 style={{ color: 'var(--semi-color-text-0)', fontWeight: 500, maxWidth: '60%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item.remark}</h3>
|
||||
</div>
|
||||
<Text ellipsis={{ showTooltip: { opts: { style: { wordBreak: 'break-all' } } } }} type="tertiary">{item.url}</Text>
|
||||
<div style={{ margin: '0', display: 'flex', padding: "0 0 32px 0px", justifyContent: 'flex-end' }}>
|
||||
<ButtonGroup theme='borderless' style={{ position: 'absolute', right: "10%", bottom: "15%"}}>
|
||||
<TemplateModal onOk={handleUpdate} entity={item}>
|
||||
<Button theme='borderless' icon={<IconEdit2Stroked />}></Button>
|
||||
</TemplateModal>
|
||||
<span className="semi-button-group-line semi-button-group-line-borderless semi-button-group-line-primary"></span>
|
||||
<Popconfirm
|
||||
title="确定是否要删除?"
|
||||
content="此操作将不可逆"
|
||||
onConfirm={async () => await onConfirm(item.id)}
|
||||
// onCancel={onCancel}
|
||||
>
|
||||
<Button theme='borderless' icon={<IconDeleteStroked />}></Button>
|
||||
</Popconfirm>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', right: 20, top: 9}}>{item.status}</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<h3 style={{ color: 'var(--semi-color-text-0)', fontWeight: 500, maxWidth: '60%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{item.remark}</h3>
|
||||
</div>
|
||||
<Text style={{width: '101%'}} ellipsis={{ showTooltip: true }} type="tertiary">{item.url}</Text>
|
||||
<div style={{ margin: '0', display: 'flex', padding: "0 0 32px 0px", justifyContent: 'flex-end' }}>
|
||||
<ButtonGroup theme='borderless' style={{ position: 'absolute', right: 20, bottom: 15}}>
|
||||
<TemplateModal onOk={handleUpdate} entity={item}>
|
||||
<Button theme='borderless' icon={<IconEdit2Stroked />}></Button>
|
||||
</TemplateModal>
|
||||
<span className="semi-button-group-line semi-button-group-line-borderless semi-button-group-line-primary"></span>
|
||||
<Popconfirm
|
||||
title="确定是否要删除?"
|
||||
content="此操作将不可逆"
|
||||
onConfirm={async () => await onConfirm(item.id)}
|
||||
// onCancel={onCancel}
|
||||
>
|
||||
<Button theme='borderless' icon={<IconDeleteStroked />}></Button>
|
||||
</Popconfirm>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import logging
|
||||
import platform
|
||||
import sys
|
||||
|
||||
__version__ = "0.4.60"
|
||||
__version__ = "0.4.61"
|
||||
|
||||
LOG_CONF = {
|
||||
'version': 1,
|
||||
|
||||
@@ -17,3 +17,11 @@ def download(fname, url, **kwargs):
|
||||
pg.__dict__[k] = kwargs.get(k)
|
||||
break
|
||||
return pg.start()
|
||||
|
||||
|
||||
def biliup_download(name, url, kwargs: dict):
|
||||
kwargs.pop('url')
|
||||
suffix = kwargs.get('format')
|
||||
if suffix:
|
||||
kwargs['suffix'] = suffix
|
||||
return download(name, url, **kwargs)
|
||||
+2
-7
@@ -12,7 +12,7 @@ from biliup.config import config
|
||||
from .app import event_manager, context
|
||||
from .common.tools import NamedLock, processor
|
||||
from .database.db import get_stream_info_by_filename, SessionLocal
|
||||
from .downloader import download
|
||||
from .downloader import biliup_download
|
||||
from .engine.event import Event
|
||||
from .engine.upload import UploadBase
|
||||
from .uploader import upload, fmt_title_and_desc
|
||||
@@ -50,13 +50,8 @@ def process(name, url):
|
||||
url_status = context['PluginInfo'].url_status
|
||||
# 下载开始
|
||||
try:
|
||||
kwargs: dict = config['streamers'][name].copy()
|
||||
kwargs.pop('url')
|
||||
suffix = kwargs.get('format')
|
||||
if suffix:
|
||||
kwargs['suffix'] = suffix
|
||||
url_status[url] = 1
|
||||
stream_info = download(name, url, **kwargs)
|
||||
stream_info = biliup_download(name, url, config['streamers'][name].copy())
|
||||
# 永远不可能有两个同url的下载线程
|
||||
# 可能对同一个url同时发送两次上传事件
|
||||
with NamedLock(f"upload_count_{url}"):
|
||||
|
||||
@@ -54,8 +54,11 @@ class Douyin(DownloadBase):
|
||||
self.fake_headers['Cookie'] = f'ttwid={DouyinUtils.get_ttwid()};{self.fake_headers["cookie"]}'
|
||||
page = (await biliup.common.util.client.get(
|
||||
DouyinUtils.build_request_url(f"https://live.douyin.com/webcast/room/web/enter/?web_rid={room_id}"),
|
||||
headers=self.fake_headers, timeout=5)).text
|
||||
room_info = json.loads(page)['data']['data']
|
||||
headers=self.fake_headers, timeout=5)).json()
|
||||
room_info = page.get('data').get('data')
|
||||
if room_info is None:
|
||||
logger.warning(f"{Douyin.__name__}: {self.url}: {page}")
|
||||
return False
|
||||
if len(room_info) > 0:
|
||||
room_info = room_info[0]
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user