Skip to content

Commit

Permalink
Prepare release 0.8.1
Browse files Browse the repository at this point in the history
- Update mpv to 0.39.0
  -> mpv-dev-x86_64-20241027-git-fbf8695
- Update python-mpv to 1.0.7
  -> e1ae4f7da6d1858ab5af7d003c24fd6ca1f8fed5
- Update Justfile
- Remove obsolete credits
  • Loading branch information
trin94 committed Oct 31, 2024
1 parent 2db19ab commit da33dc2
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 49 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute sudo apt update -y
execute sudo apt upgrade -y
execute sudo apt install -y libmpv1 qttools5-dev-tools
- name: 'Setup Virtual Environment'
run: |
Expand Down Expand Up @@ -120,8 +118,8 @@ jobs:
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
ARTIFACT="mpv-dev-x86_64-20240421-git-b364e4a.7z"
SHA1="1bd96112aecc4b17ad003c9d3fd3909d362d4ac3"
ARTIFACT="mpv-dev-x86_64-20241027-git-fbf8695.7z"
SHA1="62d5facf23864c1b938bd3a3e55be5d1fa3ff56f"
URL="https://sourceforge.net/projects/mpv-player-windows/files/libmpv/$ARTIFACT"
execute curl -L -O "$URL"
Expand Down
40 changes: 25 additions & 15 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
PYTHON_DIR := invocation_directory() + '/' + if os_family() == 'windows' { 'venv/Scripts' } else { 'venv/bin' }
PYTHON := PYTHON_DIR + if os_family() == 'windows' { '/python.exe' } else { '/python3' }

# https://github.com/linuxdeepin/deepin-system-monitor/issues/22

TOOL_CLI_LUPDATE := PYTHON_DIR + '/pyside6-lupdate'
TOOL_CLI_LRELEASE := 'lrelease'
TOOL_CLI_LRELEASE := PYTHON_DIR + '/pyside6-lrelease'
TOOL_CLI_RCC := PYTHON_DIR + '/pyrcc5'


Expand Down Expand Up @@ -74,7 +72,11 @@ FILE_BUILD_RESOURCES := DIRECTORY_BUILD_RESOURCES + '/' + NAME_FILE_GENERATED_RE

FILE_PY_SOURCES_RESOURCES := DIRECTORY_PY_SOURCES + '/' + NAME_FILE_GENERATED_RESOURCES

_default:
@just --list

# Build full project into build/release
[group('build')]
build: _clean-build _clean-develop _compile-resources
@rm -rf \
{{DIRECTORY_BUILD_PY}}
Expand All @@ -92,25 +94,21 @@ build: _clean-build _clean-develop _compile-resources
@echo ''; \
echo 'Please find the finished project in {{DIRECTORY_BUILD_RELEASE}}'

# Build and compile resources into source directory
[group('build')]
build-develop: _clean-develop _compile-resources
@# Generates resources and copies them into the source directory
@# This allows to develop/debug the project normally

@cp \
{{FILE_BUILD_RESOURCES}} {{DIRECTORY_PY_SOURCES}}

update-translations: _prepare-translation-extractions
@# Traverses *.qml and *.py files to update translation files
@# Requires translations in .py: QCoreApplication.translate("context", "string")
@# Requires translations in .qml: qsTranslate("context", "string")
@cd {{DIRECTORY_BUILD_TRANSLATIONS}}; \
{{TOOL_CLI_LUPDATE}} \
-locations none \
-project {{FILE_BUILD_TRANSLATIONS_JSON}}
@cp -r \
{{DIRECTORY_BUILD_TRANSLATIONS}}/{{NAME_DIRECTORY_I18N}}/*.ts \
{{DIRECTORY_I18N}}
# Remove ALL generated files
[group('build')]
clean: _clean-build _clean-develop

# Add new language
[group('i18n')]
add-translation locale: _prepare-translation-extractions
@cd {{DIRECTORY_BUILD_TRANSLATIONS}}; \
{{TOOL_CLI_LUPDATE}} \
Expand All @@ -121,7 +119,19 @@ add-translation locale: _prepare-translation-extractions
@echo ''
@just update-translations

clean: _clean-build _clean-develop
# Add new language
[group('i18n')]
update-translations: _prepare-translation-extractions
@# Traverses *.qml and *.py files to update translation files
@# Requires translations in .py: QCoreApplication.translate("context", "string")
@# Requires translations in .qml: qsTranslate("context", "string")
@cd {{DIRECTORY_BUILD_TRANSLATIONS}}; \
{{TOOL_CLI_LUPDATE}} \
-locations none \
-project {{FILE_BUILD_TRANSLATIONS_JSON}}
@cp -r \
{{DIRECTORY_BUILD_TRANSLATIONS}}/{{NAME_DIRECTORY_I18N}}/*.ts \
{{DIRECTORY_I18N}}

_clean-build:
@rm -rf \
Expand Down
2 changes: 1 addition & 1 deletion data/html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>{version} - {platform}</h1>
<p>
<h3>Links</h3>
<br>
<a href='https://mpvqc.github.io/'>https://mpvqc.github.io/</a>
<a href='https://mpvqc.github.io'>https://mpvqc.github.io</a>
<br>
<a href='https://github.com/mpvqc/mpvQC'>Github</a>
</p>
Expand Down
3 changes: 0 additions & 3 deletions data/html/credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
<p>
Qt5<br>LGPLv3 &lt;The Qt Company Ltd and other contributors&gt;
</p>
<p>
distutils_ui<br>MIT &lt;frispete&gt;
</p>
54 changes: 30 additions & 24 deletions mpvqc/player/_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
#
# You can find copies of the GPLv2 and LGPLv2.1 licenses in the project repository's LICENSE.GPL and LICENSE.LGPL files.

__version__ = '1.0.6'
__version__ = '1.0.7'

from ctypes import *
import collections
import ctypes.util
import threading
import queue
import os
import sys
from warnings import warn
from functools import partial, wraps
from contextlib import contextmanager
from concurrent.futures import Future, InvalidStateError
import collections
import queue
import re
import sys
import threading
import traceback
from concurrent.futures import Future, InvalidStateError
from contextlib import contextmanager
from ctypes import *
from functools import partial, wraps
from warnings import warn

if os.name == 'nt':
# Note: mpv-2.dll with API version 2 corresponds to mpv v0.35.0. Most things should work with the fallback, too.
Expand Down Expand Up @@ -1011,7 +1011,7 @@ def _loop(self):
with self._enqueue_exceptions():
cb(EventOverflowError(
'libmpv event queue has flown over because events have not been processed fast enough'),
None)
None)

if eid == MpvEventID.SHUTDOWN:
_mpv_destroy(self._event_handle)
Expand Down Expand Up @@ -1097,31 +1097,38 @@ def observer(name, val):
rv = cond(val)
if rv:
result.set_result(rv)

except InvalidStateError:
pass

except Exception as e:
try:
result.set_exception(e)
except InvalidStateError:
except:
pass
except InvalidStateError:
pass

self.observe_property(name, observer)
err_unregister = self._set_error_handler(result)

try:
result.set_running_or_notify_cancel()

self.observe_property(name, observer)
err_unregister = self._set_error_handler(result)
if catch_errors:
self._exception_futures.add(result)

yield result

rv = cond(getattr(self, name.replace('-', '_')))
if level_sensitive and rv:
result.set_result(rv)
if level_sensitive:
rv = cond(getattr(self, name.replace('-', '_')))
if rv:
result.set_result(rv)
return

self.check_core_alive()
result.result(timeout)

except InvalidStateError:
pass

else:
self.check_core_alive()
result.result(timeout)
finally:
err_unregister()
self.unobserve_property(name, observer)
Expand Down Expand Up @@ -1902,7 +1909,6 @@ def open_backend(_userdata, uri, cb_info):
else:
warnings.warn(
f'Unhandled exception {e} inside stream open callback for URI {uri}\n{traceback.format_exc()}')

return ErrorCode.LOADING_FAILED

cb_info.contents.cookie = None
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PyQt5>=5.15.1
PySide6>=6.6.1
PyQt5>=5.15.11
PySide6>=6.8.0.2

0 comments on commit da33dc2

Please sign in to comment.