Skip to content

Commit

Permalink
add spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ForgQi committed May 25, 2024
1 parent 6907c68 commit 917f7cc
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
38 changes: 38 additions & 0 deletions biliup.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['biliup\\__main__.py'],
pathex=[],
binaries=[],
datas=[('biliup/database/migration/', 'biliup/database/migration/'), ('biliup/web/public/', 'biliup/web/public/')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='biliup',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
10 changes: 5 additions & 5 deletions biliup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import biliup.common.reload
from biliup.config import config
from biliup.database.db import SessionLocal, init
from . import __version__, LOG_CONF
from .common.Daemon import Daemon
from .common.reload import AutoReload
from .common.log import DebugLevelFilter
from biliup import __version__, LOG_CONF
from biliup.common.Daemon import Daemon
from biliup.common.reload import AutoReload
from biliup.common.log import DebugLevelFilter


def arg_parser():
Expand Down Expand Up @@ -61,7 +61,7 @@ def arg_parser():


async def main(args):
from .app import event_manager
from biliup.app import event_manager

event_manager.start()

Expand Down
2 changes: 1 addition & 1 deletion biliup/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def process_revision_directives(context, revision, directives):
script_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "migration")
versions_scripts_path = os.path.join(script_path, 'versions')
if not os.path.exists(versions_scripts_path):
os.mkdir(versions_scripts_path, 0o700)
os.makedirs(versions_scripts_path, 0o700)
alembic_cfg.set_main_option('script_location', script_path)
command.stamp(alembic_cfg, 'head', purge=True) # 将当前标记为最新版
scripts = command.revision( # 自动生成迁移脚本
Expand Down
2 changes: 1 addition & 1 deletion biliup/plugins/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def acheck_stream(self, is_check=False):
except:
handlers = [YDownload(self.fname, self.url, 'mp4'), SDownload(self.fname, self.url, 'flv')]
for handler in handlers:
if handler.check_stream():
if await handler.acheck_stream():
self.handler = handler
self.suffix = handler.suffix
return True
Expand Down

0 comments on commit 917f7cc

Please sign in to comment.