Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.0.7 #774

Merged
merged 7 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youtube" name="YouTube" version="7.0.7+beta.3" provider-name="anxdpanic, bromix, MoojMidge">
<addon id="plugin.video.youtube" name="YouTube" version="7.0.7" provider-name="anxdpanic, bromix, MoojMidge">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.requests" version="2.27.1"/>
Expand Down
75 changes: 75 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
## v7.0.7
### Fixed
- Fixed not being able to re-refresh a directory listing that has already been refreshed
- Fixed various window and history nagivation issues
- Fixed http server idle shutdown not restarting if plugin is run but GUI is still idle
- Additional improvements to busy dialog crash workaround
- Workaround for new settings interface not updated correctly
- Fix bookmarks icon background colour
- Fix adding channel items directly to bookmarks
- Fixes for player monitoring preventing item being marked as watched #746
- Fix invalid pageToken error by removing jump from unsupported listings #715
- Fix issues with post play refresh possibly causing loss of window history
- Fix bug that could lead to plugin continuously reloading #608
- Attempted fix for socket error 98 on Linux #746
- For error 10013 on Windows try either of the following:
- Start-Process powershell -Verb runAs -ArgumentList "net stop winnat; net start winnat"
- Start-Process powershell -Verb runAs -ArgumentList "net stop hns; net start hns"
- Fix changing fanart type on My Subscriptions #751
- Fix not using thumbnail fanart for channels/subscriptions/playlists when enabled #751
- Fix My Subscriptions threading issues #529
- Fix failing to login #759
- Improve resource usage
- Fix adding video to playlist #764
- Fix plugin settings raising exception in Kodi 19-20 #769
- Fix location icon background colour

### Changed
- Removed Settings > Advanced > Views > Show channel fanart
- Now included as option in Settings > Advanced > Views > Show fanart
- MPEG-DASH for live streams only enabled by default in Kodi v21
- Make better use of reuselanguageinvoker and various memory usage improvements
- Use internal Kodi resume enable/disable for all playback #693
- For playback where Kodi does not prompt to resume, the plugin will also no longer resume
- For playback where Kodi does prompt to resume, the plugin will follow whatever is selected
- Cached data for My Subscriptions and Related Videos will be replaced due to changes in cached data
- Use channel fanart as backup to thumbnail fanart for channel items without thumbnails #751

### New
- Improvements to plugin page navigation #715
- Refresh added to context menu of Next page item
- Jump to page added to context menu of Next page item
- Can also be used in plugin url: plugin://plugin.video.youtube/goto_page/<PAGE>/<PATH> #317
- Home added to context menu of Next page item
- Quick search added to context menu of Next page item
- Next page item added to last page of directory list to go back to first page
- Add option to use channel name as studio and/or cast #717
- Settings > Advanced > Views > Use channel name as
- Add option to use best available thumbnail quality
- Settings > Advanced > Views > Thumbnail size
- Added option to use video thumbnail as fanart in Settings > Advanced > Views > Show fanart #716
- Also added plugin url query parameter fanart_type to override settings
- Can be used to set fanart for specific widgets only: plugin://plugin.video.youtube/<PATH>?fanart_type=<0/1/2/3>
- Allowable values are the same as the setting:
- 0: No fanart
- 1: Default
- 2: Channel
- 3: Thumbnail
- Enable syncing of plugin watched state with Kodi watched state when using Kodi mark as (un)watched #709
- Add website link to video descriptions #721
- Update video filtering for live streams #755
- Add options to filter/hide the following types of videos
- shorts
- upcoming videos (either live streams or premieres)
- upcoming live streams
- currently live streams
- upcoming premieres
- completed videos (previously either live or premieres)
- No currently live streams will be shown in searches, only in the Live subfolder
- No currently live or upcoming live streams will be shown in channels, only in the Live subfolder
- Should also be much faster
- Completed stream will continue to be shown in listings unless filtered out
- Live subfolders will not be filtered by default
- Filter selection dialog has option to also filter the Live subfolder
- Most other listings will be filtered using whatever options have been set

## v7.0.7+beta.3
### Fixed
- Fix plugin settings raising exception in Kodi 19-20 #769
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/youtube_plugin/kodion/items/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def from_json(json_data, *args):
:return:
"""
if isinstance(json_data, string_type):
if json_data == 'None':
if json_data == b'None':
# Channel bookmark that will be updated. Store timestamp for update
if args and args[0] and len(args[0]) == 4:
return args[0][1]
Expand Down
27 changes: 19 additions & 8 deletions resources/lib/youtube_plugin/youtube/client/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def get_recommended_for_home(self,

return v3_response

def get_related_for_home(self, page_token=''):
def get_related_for_home(self, page_token='', refresh=False):
"""
YouTube has deprecated this API, so we use history and related items to
form a recommended set.
Expand Down Expand Up @@ -653,7 +653,10 @@ def get_related_for_home(self, page_token=''):
# Fetch existing list of items, if any
cache = self._context.get_data_cache()
cache_items_key = 'get-activities-home-items-v2'
cached = cache.get_item(cache_items_key, None) or []
if refresh:
cached = []
else:
cached = cache.get_item(cache_items_key, None) or []

# Increase value to recursively retrieve recommendations for the first
# recommended video, up to the set maximum recursion depth
Expand Down Expand Up @@ -1428,6 +1431,7 @@ def get_my_subscriptions(self,
page_token=1,
logged_in=False,
do_filter=False,
refresh=False,
**kwargs):
"""
modified by PureHemp, using YouTube RSS for fetching latest videos
Expand All @@ -1454,7 +1458,10 @@ def get_my_subscriptions(self,

# if new uploads is cached
cache_items_key = 'my-subscriptions-items-v2'
cached = cache.get_item(cache_items_key, cache.ONE_HOUR) or []
if refresh:
cached = None
else:
cached = cache.get_item(cache_items_key, cache.ONE_HOUR) or []
if cached:
items = cached
# no cache, get uploads data from web
Expand Down Expand Up @@ -1573,7 +1580,7 @@ def _threaded_fetch(kwargs,
elif kwargs:
_kwargs = kwargs.pop()
elif input_wait:
input_wait.acquire(blocking=True)
input_wait.acquire(True)
input_wait.release()
if kwargs:
continue
Expand Down Expand Up @@ -1605,6 +1612,7 @@ def _threaded_fetch(kwargs,
threads['available'].release()
if dynamic:
threads['pool_counts'][pool_id] -= 1
threads['pool_counts']['all'] -= 1
threads['current'].discard(thread)

try:
Expand All @@ -1616,7 +1624,9 @@ def _threaded_fetch(kwargs,
'max': max_threads,
'available': threading.Semaphore(max_threads),
'current': set(),
'pool_counts': {},
'pool_counts': {
'all': 0,
},
'balance': threading.Event(),
}
payloads = [
Expand Down Expand Up @@ -1668,14 +1678,14 @@ def _threaded_fetch(kwargs,
else:
continue

spots_available = threads['available']._value
available = threads['max'] - threads['pool_counts']['all']
limit = payload['limit']
if limit:
if current_num >= limit:
continue
if not spots_available:
if not available:
threads['balance'].set()
elif not spots_available:
elif not available:
continue

thread = threading.Thread(
Expand All @@ -1685,6 +1695,7 @@ def _threaded_fetch(kwargs,
thread.daemon = True
threads['current'].add(thread)
threads['pool_counts'][pool_id] += 1
threads['pool_counts']['all'] -= 1
threads['available'].acquire(blocking=True)
thread.start()

Expand Down
Loading
Loading