mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-26 01:18:50 +03:00
Compare commits
10 Commits
service
...
update-dep
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dd144357d | ||
|
|
8c9ce641f0 | ||
|
|
7b1a59e01f | ||
|
|
d9ab2cd070 | ||
|
|
ea2004ba94 | ||
|
|
63f5a3bc41 | ||
|
|
e999a93503 | ||
|
|
8cc3f8aa05 | ||
|
|
5fadc81a69 | ||
|
|
39aef5babf |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -179,6 +179,8 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
publish-to-release:
|
publish-to-release:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs:
|
needs:
|
||||||
- build-sdist-and-wheel
|
- build-sdist-and-wheel
|
||||||
- build-binaries
|
- build-binaries
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "iSponsorBlockTV"
|
name = "iSponsorBlockTV"
|
||||||
version = "2.1.0"
|
version = "2.2.1"
|
||||||
authors = [
|
authors = [
|
||||||
{"name" = "dmunozv04"}
|
{"name" = "dmunozv04"}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
aiohttp==3.9.5
|
aiohttp==3.10.6
|
||||||
appdirs==1.4.4
|
appdirs==1.4.4
|
||||||
argparse==1.4.0
|
|
||||||
async-cache==1.1.1
|
async-cache==1.1.1
|
||||||
pyytlounge==2.0.0
|
pyytlounge==2.1.1
|
||||||
rich==13.7.1
|
rich==13.8.1
|
||||||
ssdp==1.3.0
|
ssdp==1.3.0
|
||||||
textual==0.58.0
|
textual==0.81.0
|
||||||
textual-slider==0.1.1
|
textual-slider==0.1.2
|
||||||
xmltodict==0.13.0
|
xmltodict==0.13.0
|
||||||
rich_click==1.8.3
|
rich_click==1.8.3
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
|
|||||||
self.mute_ads = config.mute_ads
|
self.mute_ads = config.mute_ads
|
||||||
self.skip_ads = config.skip_ads
|
self.skip_ads = config.skip_ads
|
||||||
self.auto_play = config.auto_play
|
self.auto_play = config.auto_play
|
||||||
|
self._command_mutex = asyncio.Lock()
|
||||||
|
|
||||||
# Ensures that we still are subscribed to the lounge
|
# Ensures that we still are subscribed to the lounge
|
||||||
async def _watchdog(self):
|
async def _watchdog(self):
|
||||||
@@ -145,9 +146,12 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
|
|||||||
self.shorts_disconnected = False
|
self.shorts_disconnected = False
|
||||||
create_task(self.play_video(video_id_saved))
|
create_task(self.play_video(video_id_saved))
|
||||||
elif event_type == "loungeScreenDisconnected":
|
elif event_type == "loungeScreenDisconnected":
|
||||||
data = args[0]
|
if args: # Sometimes it's empty
|
||||||
if data["reason"] == "disconnectedByUserScreenInitiated": # Short playing?
|
data = args[0]
|
||||||
self.shorts_disconnected = True
|
if (
|
||||||
|
data["reason"] == "disconnectedByUserScreenInitiated"
|
||||||
|
): # Short playing?
|
||||||
|
self.shorts_disconnected = True
|
||||||
elif event_type == "onAutoplayModeChanged":
|
elif event_type == "onAutoplayModeChanged":
|
||||||
create_task(self.set_auto_play_mode(self.auto_play))
|
create_task(self.set_auto_play_mode(self.auto_play))
|
||||||
|
|
||||||
@@ -181,3 +185,9 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
|
|||||||
|
|
||||||
async def play_video(self, video_id: str) -> bool:
|
async def play_video(self, video_id: str) -> bool:
|
||||||
return await self._command("setPlaylist", {"videoId": video_id})
|
return await self._command("setPlaylist", {"videoId": video_id})
|
||||||
|
|
||||||
|
# Test to wrap the command function in a mutex to avoid race conditions with
|
||||||
|
# the _command_offset (TODO: move to upstream if it works)
|
||||||
|
async def _command(self, command: str, command_parameters: dict = None) -> bool:
|
||||||
|
async with self._command_mutex:
|
||||||
|
return await super()._command(command, command_parameters)
|
||||||
|
|||||||
Reference in New Issue
Block a user