Skip to content

Commit

Permalink
Merge pull request #766 from MoojMidge/master
Browse files Browse the repository at this point in the history
v7.0.7+beta.2
  • Loading branch information
MoojMidge committed May 23, 2024
2 parents f4aa1a9 + 02a954f commit 4c2c34c
Show file tree
Hide file tree
Showing 45 changed files with 1,430 additions and 1,037 deletions.
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.1" provider-name="anxdpanic, bromix, MoojMidge">
<addon id="plugin.video.youtube" name="YouTube" version="7.0.7+beta.2" 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
28 changes: 28 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## v7.0.7+beta.2
### Fixed
- 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
- Update video filtering for live streams #755

### Changed
- 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
- 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

## v7.0.7+beta.1
### Fixed
- Fixed not being able to re-refresh a directory listing that has already been refreshed
Expand Down
18 changes: 17 additions & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ msgid "Edited"
msgstr ""

msgctxt "#30736"
msgid "Hide short videos (1 minute or less)"
msgid "Shorts (1 minute or less)"
msgstr ""

msgctxt "#30737"
Expand Down Expand Up @@ -1536,3 +1536,19 @@ msgstr ""
msgctxt "#30807"
msgid "Use channel name as"
msgstr ""

msgctxt "#30808"
msgid "Hide videos from listings"
msgstr ""

msgctxt "#30809"
msgid "All upcoming videos"
msgstr ""

msgctxt "#30810"
msgid "All previously streamed (completed) videos"
msgstr ""

msgctxt "#30811"
msgid "Filter Live folders"
msgstr ""
2 changes: 1 addition & 1 deletion resources/lib/youtube_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,6 @@ def reset_access_tokens(addon_id):
.format(addon_id))
return
context = XbmcContext(params={'addon_id': addon_id})
context.get_access_manager().update_dev_access_token(
context.get_access_manager().update_access_token(
addon_id, access_token='', refresh_token=''
)
12 changes: 9 additions & 3 deletions resources/lib/youtube_plugin/kodion/compatibility/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"""

__all__ = (
'BaseHTTPServer',
'BaseHTTPRequestHandler',
'TCPServer',
'byte_string_type',
'cpu_count',
'datetime_infolabel',
'parse_qs',
'parse_qsl',
Expand All @@ -32,7 +34,9 @@
# Kodi v19+ and Python v3.x
try:
from html import unescape
from http import server as BaseHTTPServer
from http.server import BaseHTTPRequestHandler
from socketserver import TCPServer
from os import cpu_count
from urllib.parse import (
parse_qs,
parse_qsl,
Expand All @@ -58,8 +62,10 @@
to_str = str
# Compatibility shims for Kodi v18 and Python v2.7
except ImportError:
import BaseHTTPServer
from BaseHTTPServer import BaseHTTPRequestHandler
from contextlib import contextmanager as _contextmanager
from multiprocessing import cpu_count
from SocketServer import TCPServer
from urllib import (
quote as _quote,
unquote as _unquote,
Expand Down
6 changes: 6 additions & 0 deletions resources/lib/youtube_plugin/kodion/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
ABORT_FLAG = 'abort_requested'
BUSY_FLAG = 'busy'
CHECK_SETTINGS = 'check_settings'
PLAY_COUNT = 'video_play_count'
PLAYER_DATA = 'player_json'
PLAYLIST_PATH = 'playlist_path'
PLAYLIST_POSITION = 'playlist_position'
REFRESH_CONTAINER = 'refresh_container'
REROUTE = 'reroute'
SLEEPING = 'sleeping'
SWITCH_PLAYER_FLAG = 'switch_player'
VIDEO_ID = 'video_id'
WAIT_FLAG = 'builtin_running'
WAKEUP = 'wakeup'

Expand All @@ -52,15 +55,18 @@
'CHECK_SETTINGS',
'DATA_PATH',
'MEDIA_PATH',
'PLAY_COUNT',
'PLAYER_DATA',
'PLAYLIST_PATH',
'PLAYLIST_POSITION',
'REFRESH_CONTAINER',
'RESOURCE_PATH',
'REROUTE',
'SLEEPING',
'SWITCH_PLAYER_FLAG',
'TEMP_PATH',
'VALUE_FROM_STR',
'VIDEO_ID',
'WAIT_FLAG',
'WAKEUP',
'content',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

SETUP_WIZARD = 'kodion.setup_wizard' # (bool)
SETUP_WIZARD_RUNS = 'kodion.setup_wizard.forced_runs' # (int)
SETTINGS_END = '|end_settings_marker|' # (bool)

MPD_VIDEOS = 'kodion.mpd.videos' # (bool)
MPD_STREAM_SELECT = 'kodion.mpd.stream.select' # (int)
Expand All @@ -26,7 +27,7 @@
SUBTITLE_DOWNLOAD = 'kodion.subtitle.download' # (bool)

ITEMS_PER_PAGE = 'kodion.content.max_per_page' # (int)
HIDE_SHORT_VIDEOS = 'youtube.hide_shorts' # (bool)
HIDE_VIDEOS = 'youtube.view.hide_videos' # (list[string])

SAFE_SEARCH = 'kodion.safe.search' # (int)
AGE_GATE = 'kodion.age.gate' # (bool)
Expand Down
13 changes: 11 additions & 2 deletions resources/lib/youtube_plugin/kodion/context/abstract_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@


class AbstractContext(object):
_initialized = False
_addon = None
_settings = None

_BOOL_PARAMS = {
'ask_for_quality',
'audio_only',
Expand Down Expand Up @@ -114,6 +118,7 @@ def __init__(self, path='/', params=None, plugin_id=''):
self._plugin_handle = -1
self._plugin_id = plugin_id
self._plugin_name = None
self._plugin_icon = None
self._version = 'UNKNOWN'

self._path = self.create_path(path)
Expand Down Expand Up @@ -343,7 +348,7 @@ def get_addon_path(self):
raise NotImplementedError()

def get_icon(self):
return self.create_resource_path('media/icon.png')
return self._plugin_icon

def get_fanart(self):
return self.create_resource_path('media/fanart.jpg')
Expand Down Expand Up @@ -420,7 +425,11 @@ def get_infolabel(name):
raise NotImplementedError()

@staticmethod
def get_listitem_detail(detail_name, attr=False):
def get_listitem_detail(detail_name):
raise NotImplementedError()

@staticmethod
def get_listitem_info(detail_name):
raise NotImplementedError()

def tear_down(self):
Expand Down
Loading

0 comments on commit 4c2c34c

Please sign in to comment.