Skip to content

Commit 934d085

Browse files
authored
Merge pull request #1414 from MoojMidge/v7.4
v7.4.1.1
2 parents 212a74f + d08e2ed commit 934d085

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.youtube" name="YouTube" version="7.4.1" provider-name="anxdpanic, bromix, MoojMidge">
2+
<addon id="plugin.video.youtube" name="YouTube" version="7.4.1.1" provider-name="anxdpanic, bromix, MoojMidge">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.requests" version="2.27.1"/>

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v7.4.1.1
2+
### Fixed
3+
- Address possible race condition resulting in KeyError exception when calling pop() on an empty set
4+
15
## v7.4.1
26
### Fixed
37
- Fix unnecessary double resolve on playback #1371

resources/lib/youtube_plugin/youtube/client/data_client.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,8 +2392,7 @@ def _get_cached_feed(output,
23922392
else:
23932393
channel_prefix = False
23942394

2395-
batch = inputs.copy()
2396-
for item_id in batch:
2395+
for item_id in inputs:
23972396
if channel_prefix:
23982397
channel_id = item_id
23992398
item_id = item_id.replace('UC', channel_prefix, 1)
@@ -2419,7 +2418,6 @@ def _get_cached_feed(output,
24192418
else:
24202419
to_refresh.add(channel_id)
24212420

2422-
inputs -= batch
24232421
return True, False
24242422

24252423
def _get_feed(output,
@@ -2642,11 +2640,18 @@ def _threaded_fetch(kwargs,
26422640
_kwargs = {}
26432641
elif kwargs:
26442642
if do_batch:
2645-
_kwargs = {'inputs': kwargs}
2646-
elif unpack:
2647-
_kwargs = {'input': kwargs.pop()}
2643+
batch = kwargs.copy()
2644+
kwargs -= batch
2645+
_kwargs = {'inputs': batch}
26482646
else:
2649-
_kwargs = kwargs.pop()
2647+
try:
2648+
_kwargs = kwargs.pop()
2649+
except KeyError:
2650+
if check_inputs:
2651+
check_inputs.clear()
2652+
break
2653+
if unpack:
2654+
_kwargs = {'input': _kwargs}
26502655
elif check_inputs:
26512656
if check_inputs.wait(0.1) and kwargs:
26522657
continue

0 commit comments

Comments
 (0)