diff --git a/.github/workflows/pyinstaller-publish.yml b/.github/workflows/pyinstaller-publish.yml new file mode 100644 index 0000000..2ac6bec --- /dev/null +++ b/.github/workflows/pyinstaller-publish.yml @@ -0,0 +1,32 @@ +name: Upload Windows Python Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: 'windows-latest' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine build pyinstaller + npm install + pip install . + - name: Build + run: | + npm run build + pyinstaller biliup.spec + # Optionally verify that it works (provided that it does not need user interaction) + #- run: ./dist/your-code/your-code + - uses: actions/upload-artifact@v4 + with: + path: dist/* \ No newline at end of file diff --git a/biliup/__init__.py b/biliup/__init__.py index 0d30db8..daef286 100644 --- a/biliup/__init__.py +++ b/biliup/__init__.py @@ -2,7 +2,7 @@ import logging import platform import sys -__version__ = "0.4.64" +__version__ = "0.4.65" LOG_CONF = { 'version': 1, diff --git a/biliup/downloader.py b/biliup/downloader.py index 781e139..837c1f3 100644 --- a/biliup/downloader.py +++ b/biliup/downloader.py @@ -8,7 +8,7 @@ logger = logging.getLogger('biliup') def download(fname, url, **kwargs): - pg = general.__plugin__(fname, url) + pg = None for plugin in Plugin.download_plugins: if re.match(plugin.VALID_URL_BASE, url): pg = plugin(fname, url) @@ -16,6 +16,9 @@ def download(fname, url, **kwargs): if kwargs.get(k): pg.__dict__[k] = kwargs.get(k) break + if not pg: + pg = general.__plugin__(fname, url) + logger.warning(f'Not found plugin for {fname} -> {url} This may cause problems') return pg.start()