Skip to content

Commit

Permalink
V3.3 (#102)
Browse files Browse the repository at this point in the history
* update: version number

* fix: prevent audio from multiple instances

* update: dependencies

* update: appdata

* fix: incorrect sound fading behavior

* update: appdata
  • Loading branch information
jeffshee authored Apr 1, 2023
1 parent 3219dea commit ab623af
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 1,018 deletions.
10 changes: 9 additions & 1 deletion data/io.github.jeffshee.Hidamari.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@
</screenshot>
</screenshots>
<releases>
<release version="3.2" date="2022-11-13" type="stable">
<release version="3.3" date="2023-04-01" type="stable">
<description>
<ul>
<li>Fix crash in streaming mode</li>
<li>Fix incorrect sound fading behavior</li>
<li>Update dependecies</li>
</ul>
</description>
</release>
<release version="3.2" date="2022-11-13" type="stable"><description>
<ul>
<li>Fixed for local video files which containing quotes in filename</li>
<li>Avoid shell injection vulnerability</li>
Expand Down
4 changes: 2 additions & 2 deletions io.github.jeffshee.Hidamari.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id": "io.github.jeffshee.Hidamari",
"runtime": "org.gnome.Platform",
"runtime-version": "42",
"runtime-version": "44",
"sdk": "org.gnome.Sdk",
"command": "hidamari",
"finish-args": [
Expand Down Expand Up @@ -32,7 +32,7 @@
"*.a"
],
"modules": [
"vlc.json",
"vlc-slim.json",
"shared-modules/libappindicator/libappindicator-gtk3-introspection-12.10.json",
"python3-requirements.json",
{
Expand Down
174 changes: 0 additions & 174 deletions io.github.jeffshee.Hidamari.slim.json

This file was deleted.

2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('hidamari',
version: '3.2',
version: '3.3',
license: ['GPL-3.0'],
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
Expand Down
44 changes: 22 additions & 22 deletions python3-requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"name": "python3-Pillow",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"Pillow==9.2.0\" --no-build-isolation"
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"Pillow>=9.4.0\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/8c/92/2975b464d9926dc667020ed1abfa6276e68c3571dcb77e43347e15ee9eed/Pillow-9.2.0.tar.gz",
"sha256": "75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04"
"url": "https://files.pythonhosted.org/packages/bc/07/830784e061fb94d67649f3e438ff63cfb902dec6d48ac75aeaaac7c7c30e/Pillow-9.4.0.tar.gz",
"sha256": "a1c2d7780448eb93fbcc3789bf3916aa5720d942e37945f4056680317f1cd23e"
}
]
},
Expand All @@ -35,21 +35,21 @@
"name": "python3-python-vlc",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"python-vlc==3.0.16120\" --no-build-isolation"
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"python-vlc>=3.0.18121\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/98/79/85f33652bb51b3b161d609966cb894f4b3104b70a3fba00f7df09bdf8411/python_vlc-3.0.16120-py3-none-any.whl",
"sha256": "c409afb38fe9f788a663b4302ca583f31289ef0860ab2b1668da96bbe8f14bfc"
"url": "https://files.pythonhosted.org/packages/3b/16/b1fd601f73913d8dbe7907448d3320db4485f229535ff30f76ff65d2b299/python_vlc-3.0.18121-py3-none-any.whl",
"sha256": "b8f4bdea22d363377c51996db94cac38d02df02fee9b79c03f1840ff6d376455"
}
]
},
{
"name": "python3-yt-dlp",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"yt-dlp>=2022.8.8\" --no-build-isolation"
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"yt-dlp>=2023.3.4\" --no-build-isolation"
],
"sources": [
{
Expand All @@ -59,8 +59,8 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/52/0d/6cc95a83f6961a1ca041798d222240890af79b381e97eda3b9b538dba16f/pycryptodomex-3.15.0.tar.gz",
"sha256": "7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed"
"url": "https://files.pythonhosted.org/packages/3d/07/cfd8f52b9068877801317d26dc7225e19421bc659e1395d2cd6933b1a351/pycryptodomex-3.17.tar.gz",
"sha256": "0af93aad8d62e810247beedef0261c148790c52f3cd33643791cc6396dd217c1"
},
{
"type": "file",
Expand All @@ -69,8 +69,8 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/1d/38/fa96a426e0c0e68aabc68e896584b83ad1eec779265a028e156ce509630e/certifi-2022.9.24-py3-none-any.whl",
"sha256": "90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"
"url": "https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl",
"sha256": "4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"
},
{
"type": "file",
Expand All @@ -79,22 +79,22 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/b6/7a/4f1067904adad79b5f3ba8c81f879975b56515764cb42e241cf3528cb017/yt_dlp-2022.11.11-py2.py3-none-any.whl",
"sha256": "8bb7bd9ab2e6ecf4db7627e9151ce00572ae7ee24dedc78f611e7467b0ccd7d9"
"url": "https://files.pythonhosted.org/packages/a7/df/498c57f641e9993376cf52489047158e6d660e8bab06b72c470ad5cce2bd/yt_dlp-2023.3.4-py2.py3-none-any.whl",
"sha256": "40ca421407ce07c8fd700854fd978d58526ec6fff3468caa34ff1c7333b8dc34"
}
]
},
{
"name": "python3-requests",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests==2.28.1\" --no-build-isolation"
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests>=2.28.2\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/6f/de/5be2e3eed8426f871b170663333a0f627fc2924cc386cd41be065e7ea870/urllib3-1.26.12-py2.py3-none-any.whl",
"sha256": "b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"
"url": "https://files.pythonhosted.org/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl",
"sha256": "aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"
},
{
"type": "file",
Expand All @@ -103,18 +103,18 @@
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/db/51/a507c856293ab05cdc1db77ff4bc1268ddd39f29e7dc4919aa497f0adbec/charset_normalizer-2.1.1-py3-none-any.whl",
"sha256": "83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
"url": "https://files.pythonhosted.org/packages/ff/d7/8d757f8bd45be079d76309248845a04f09619a7b17d6dfc8c9ff6433cac2/charset-normalizer-3.1.0.tar.gz",
"sha256": "34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/1d/38/fa96a426e0c0e68aabc68e896584b83ad1eec779265a028e156ce509630e/certifi-2022.9.24-py3-none-any.whl",
"sha256": "90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"
"url": "https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl",
"sha256": "4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl",
"sha256": "8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
"url": "https://files.pythonhosted.org/packages/d2/f4/274d1dbe96b41cf4e0efb70cbced278ffd61b5c7bb70338b62af94ccb25b/requests-2.28.2-py3-none-any.whl",
"sha256": "64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pillow==9.2.0
Pillow>=9.4.0
pydbus==0.6.0
python-vlc==3.0.16120
yt-dlp>=2022.8.8
requests==2.28.1
python-vlc>=3.0.18121
yt-dlp>=2023.3.4
requests>=2.28.2
setproctitle==1.3.2
5 changes: 5 additions & 0 deletions src/player/video_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def _on_active_changed(self, active):
self.pause_playback()

def _on_window_state_changed(self, state):
if not self.config[CONFIG_KEY_DETECT_MAXIMIZED]:
return
self.is_any_maximized, self.is_any_fullscreen = state[
"is_any_maximized"], state["is_any_fullscreen"]
if self._should_playback_start():
Expand Down Expand Up @@ -366,6 +368,9 @@ def data_source(self, data_source):
window.set_media(media)
if monitor.is_primary():
window.add_audio_track(audio_url)
else:
# `get_optimal_video` now might return video with audio.
media.add_option("no-audio")
window.set_position(0.0)
window.centercrop(video_width, video_height)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/player/web_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import gi
gi.require_version("Gtk", "3.0")
gi.require_version("WebKit2", "4.0")
gi.require_version("WebKit2", "4.1")
from gi.repository import Gtk, WebKit2, Gdk

from pydbus import SessionBus
Expand Down
Loading

0 comments on commit ab623af

Please sign in to comment.