Skip to content

Commit

Permalink
Merge pull request #642 from MoojMidge/master
Browse files Browse the repository at this point in the history
v7.0.4
  • Loading branch information
MoojMidge authored Mar 22, 2024
2 parents 24ce7a3 + 6806edd commit 44d0da3
Show file tree
Hide file tree
Showing 23 changed files with 232 additions and 90 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -P \
-s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" \
-u '/addon/@version' -v "${version}" \
-u '/addon/@version' -v "${version}+nexus.1" \
addon.xml
filename=${{ github.event.repository.name }}-${version}.zip
filename=${{ github.event.repository.name }}-${version}.nexus.1.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
mv .git ${{ github.event.repository.name }}
Expand All @@ -85,9 +85,9 @@ jobs:
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -P \
-s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" \
-u '/addon/@version' -v "${version}+unofficial.1" \
-u '/addon/@version' -v "${version}+nexus.unofficial.1" \
addon.xml
filename=${{ github.event.repository.name }}-${version}.unofficial.1.zip
filename=${{ github.event.repository.name }}-${version}.nexus.unofficial.1.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
mv .git ${{ github.event.repository.name }}
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/submit-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ jobs:
git add .
git commit -m "Remove Unwanted Files"
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" addon.xml
xmlstarlet ed -L -P \
-s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" \
-u '/addon/@version' -v "${version}+nexus.1" \
addon.xml
git add .
git commit -m "Update news"
git commit -m "Update news and repository identifier"
working-directory: ${{ github.event.repository.name }}

- name: Submit to Official Repository (Nexus)
Expand All @@ -80,14 +83,18 @@ jobs:
git add .
git commit -m "Remove Unwanted Files"
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" addon.xml
xmlstarlet ed -L -P \
-s '/addon/extension[@point="xbmc.addon.metadata"]' -t elem -n news -v "${news:0:1500}" \
addon.xml
git add .
git commit -m "Update news"
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -P -u '/addon/@version' -v "${version}+matrix.1" addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -P -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
xmlstarlet ed -L -P \
-u '/addon/@version' -v "${version}+matrix.1" \
-u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' \
-u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' \
-d '/addon/requires/import[@addon="script.module.infotagger"]' \
addon.xml
git add .
git commit -m "Kodi 19 Patch"
working-directory: ${{ github.event.repository.name }}
Expand Down
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.4+beta.2" provider-name="anxdpanic, bromix">
<addon id="plugin.video.youtube" name="YouTube" version="7.0.4" provider-name="anxdpanic, bromix">
<requires>
<import addon="xbmc.python" version="3.0.1"/>
<import addon="script.module.requests" version="2.27.1"/>
Expand Down
12 changes: 12 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v7.0.4
### Fixed
- Fix issues with Profiler running without timer when debug logging was enabled
- Fix additional Python 2 unicode handling issues when accessing My Subscription #639

### Changed
- Only set combined cache size to 20 MB in Setup Wizard if value is not already larger
- Cached playlist items will be forced to reload when deleting item from playlist rather than waiting 5 minutes

### New
- Make colours used for extra details in video listings customisable in Kodi 20+

## v7.0.4+beta.2
### Fixed
- Overhaul of http server settings to try and fix #633
Expand Down
14 changes: 13 additions & 1 deletion resources/language/resource.language.en_au/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1470,5 +1470,17 @@ msgid "4K/60 fps, HDR, using AV1 | Fire TV Cube Gen 3, Fire TV Stick 4K Max, Ver
msgstr ""

msgctxt "#30792"
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities "
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities"
msgstr ""

msgctxt "#30793"
msgid "Views count display colour"
msgstr ""

msgctxt "#30794"
msgid "Likes count display colour"
msgstr ""

msgctxt "#30795"
msgid "Comments count display colour"
msgstr ""
14 changes: 13 additions & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1470,5 +1470,17 @@ msgid "4K/60 fps, HDR, using AV1 | Fire TV Cube Gen 3, Fire TV Stick 4K Max, Ver
msgstr ""

msgctxt "#30792"
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities "
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities"
msgstr ""

msgctxt "#30793"
msgid "Views count display colour"
msgstr ""

msgctxt "#30794"
msgid "Likes count display colour"
msgstr ""

msgctxt "#30795"
msgid "Comments count display colour"
msgstr ""
14 changes: 13 additions & 1 deletion resources/language/resource.language.en_nz/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1470,5 +1470,17 @@ msgid "4K/60 fps, HDR, using AV1 | Fire TV Cube Gen 3, Fire TV Stick 4K Max, Ver
msgstr ""

msgctxt "#30792"
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities "
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities"
msgstr ""

msgctxt "#30793"
msgid "Views count display colour"
msgstr ""

msgctxt "#30794"
msgid "Likes count display colour"
msgstr ""

msgctxt "#30795"
msgid "Comments count display colour"
msgstr ""
14 changes: 13 additions & 1 deletion resources/language/resource.language.en_us/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1471,5 +1471,17 @@ msgid "4K/60 fps, HDR, using AV1 | Fire TV Cube Gen 3, Fire TV Stick 4K Max, Ver
msgstr ""

msgctxt "#30792"
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities "
msgid "8K/60 fps, HDR, using AV1 | Modern device or PC with full capabilities"
msgstr ""

msgctxt "#30793"
msgid "Views count display color"
msgstr ""

msgctxt "#30794"
msgid "Likes count display color"
msgstr ""

msgctxt "#30795"
msgid "Comments count display color"
msgstr ""
81 changes: 45 additions & 36 deletions resources/lib/youtube_plugin/kodion/constants/const_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,61 @@
from __future__ import absolute_import, division, unicode_literals


THUMB_SIZE = 'kodion.thumbnail.size' # (int)
SHOW_FANART = 'kodion.fanart.show' # (bool)
SAFE_SEARCH = 'kodion.safe.search' # (int)
ITEMS_PER_PAGE = 'kodion.content.max_per_page' # (int)
SEARCH_SIZE = 'kodion.search.size' # (int)
CACHE_SIZE = 'kodion.cache.size' # (int)
SETUP_WIZARD = 'kodion.setup_wizard' # (bool)
SETUP_WIZARD_RUNS = 'kodion.setup_wizard.forced_runs' # (int)

MPD_VIDEOS = 'kodion.mpd.videos' # (bool)
MPD_STREAM_SELECT = 'kodion.mpd.stream.select' # (int)
MPD_QUALITY_SELECTION = 'kodion.mpd.quality.selection' # (int)
MPD_STREAM_FEATURES = 'kodion.mpd.stream.features' # (list[string])
VIDEO_QUALITY_ASK = 'kodion.video.quality.ask' # (bool)
VIDEO_QUALITY = 'kodion.video.quality' # (int)
AUDIO_ONLY = 'kodion.audio_only' # (bool)
AGE_GATE = 'kodion.age.gate' # (bool)

SUBTITLE_SELECTION = 'kodion.subtitle.languages.num' # (int)
SUBTITLE_DOWNLOAD = 'kodion.subtitle.download' # (bool)
SETUP_WIZARD = 'kodion.setup_wizard' # (bool)
SETUP_WIZARD_RUNS = 'kodion.setup_wizard.forced_runs' # (int)
LANGUAGE = 'youtube.language' # (str)
REGION = 'youtube.region' # (str)
LOCATION = 'youtube.location' # (str)
LOCATION_RADIUS = 'youtube.location.radius' # (int)
PLAY_COUNT_MIN_PERCENT = 'kodion.play_count.percent' # (int)
USE_LOCAL_HISTORY = 'kodion.history.local' # (bool)
USE_REMOTE_HISTORY = 'kodion.history.remote' # (bool)

ITEMS_PER_PAGE = 'kodion.content.max_per_page' # (int)
HIDE_SHORT_VIDEOS = 'youtube.hide_shorts' # (bool)
DETAILED_DESCRIPTION = 'youtube.view.description.details' # (bool)
DETAILED_LABELS = 'youtube.view.label.details' # (bool)

SUPPORT_ALTERNATIVE_PLAYER = 'kodion.support.alternative_player' # (bool)
ALTERNATIVE_PLAYER_WEB_URLS = 'kodion.alternative_player.web.urls' # (bool)
SAFE_SEARCH = 'kodion.safe.search' # (int)
AGE_GATE = 'kodion.age.gate' # (bool)

API_CONFIG_PAGE = 'youtube.api.config.page' # (bool)
API_KEY = 'youtube.api.key' # (string)
API_ID = 'youtube.api.id' # (string)
API_SECRET = 'youtube.api.secret' # (string)
ALLOW_DEV_KEYS = 'youtube.allow.dev.keys' # (bool)

VIDEO_QUALITY = 'kodion.video.quality' # (int)
VIDEO_QUALITY_ASK = 'kodion.video.quality.ask' # (bool)
WATCH_LATER_PLAYLIST = 'youtube.folder.watch_later.playlist' # (str)
HISTORY_PLAYLIST = 'youtube.folder.history.playlist' # (str)

CLIENT_SELECTION = 'youtube.client.selection' # (int)
SUPPORT_ALTERNATIVE_PLAYER = 'kodion.support.alternative_player' # (bool)
ALTERNATIVE_PLAYER_WEB_URLS = 'kodion.alternative_player.web.urls' # (bool)

USE_ISA = 'kodion.video.quality.isa' # (bool)
LIVE_STREAMS = 'kodion.live_stream.selection' # (int)
MPD_VIDEOS = 'kodion.mpd.videos' # (bool)
MPD_QUALITY_SELECTION = 'kodion.mpd.quality.selection' # (int)
MPD_STREAM_FEATURES = 'kodion.mpd.stream.features' # (list[string])
MPD_STREAM_SELECT = 'kodion.mpd.stream.select' # (int)

USE_LOCAL_HISTORY = 'kodion.history.local' # (bool)
USE_REMOTE_HISTORY = 'kodion.history.remote' # (bool)

SEARCH_SIZE = 'kodion.search.size' # (int)
CACHE_SIZE = 'kodion.cache.size' # (int)

DETAILED_DESCRIPTION = 'youtube.view.description.details' # (bool)
DETAILED_LABELS = 'youtube.view.label.details' # (bool)
LABEL_COLOR = 'youtube.view.label.color' # (string)

THUMB_SIZE = 'kodion.thumbnail.size' # (int)
SHOW_FANART = 'kodion.fanart.show' # (bool)

LANGUAGE = 'youtube.language' # (str)
REGION = 'youtube.region' # (str)
LOCATION = 'youtube.location' # (str)
LOCATION_RADIUS = 'youtube.location.radius' # (int)

PLAY_COUNT_MIN_PERCENT = 'kodion.play_count.percent' # (int)

VERIFY_SSL = 'requests.ssl.verify' # (bool)
CONNECT_TIMEOUT = 'requests.timeout.connect' # (int)
Expand All @@ -55,13 +74,3 @@
HTTPD_PORT = 'kodion.http.port' # (number)
HTTPD_LISTEN = 'kodion.http.listen' # (string)
HTTPD_WHITELIST = 'kodion.http.ip.whitelist' # (string)

API_CONFIG_PAGE = 'youtube.api.config.page' # (bool)
API_KEY = 'youtube.api.key' # (string)
API_ID = 'youtube.api.id' # (string)
API_SECRET = 'youtube.api.secret' # (string)

CLIENT_SELECTION = 'youtube.client.selection' # (int)

WATCH_LATER_PLAYLIST = 'youtube.folder.watch_later.playlist' # (str)
HISTORY_PLAYLIST = 'youtube.folder.history.playlist' # (str)
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class AbstractContext(object):
'play',
'prompt_for_subtitles',
'refresh',
'refresh_container'
'resume',
'screensaver',
'strm',
Expand Down Expand Up @@ -84,11 +83,13 @@ class AbstractContext(object):
'playlist_name',
'q',
'rating',
'reload_path',
'search_type',
'subscription_id',
'uri',
'videoid', # deprecated
'video_id',
'video_name',
'visitor',
}

Expand Down
7 changes: 5 additions & 2 deletions resources/lib/youtube_plugin/kodion/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def wrapper(*args, **kwargs):
return wrapper

def _create_profiler(self):
self._profiler = self._Profile(timer=self._timer)
if self._timer:
self._profiler = self._Profile(timer=self._timer)
else:
self._profiler = self._Profile()
self._profiler.enable()

@classmethod
Expand Down Expand Up @@ -202,7 +205,7 @@ def get_stats(self, flush=True, reuse=False):
self._Stats(
self._profiler,
stream=output_stream
).strip_dirs().sort_stats('cumulative', 'time').print_stats(20)
).strip_dirs().sort_stats('cumulative', 'time').print_stats(50)
# Occurs when no stats were able to be generated from profiler
except TypeError:
pass
Expand Down
20 changes: 11 additions & 9 deletions resources/lib/youtube_plugin/kodion/items/menu_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
from ..constants import paths


def more_for_video(context, video_id, logged_in=False, refresh_container=False):
def more_for_video(context, video_id, logged_in=False, refresh=False):
return (
context.localize('video.more'),
'RunPlugin({0})'.format(context.create_uri(
('video', 'more',),
{
'video_id': video_id,
'logged_in': logged_in,
'refresh_container': refresh_container,
'refresh': refresh,
},
))
)
Expand Down Expand Up @@ -129,11 +129,13 @@ def remove_video_from_playlist(context, playlist_id, video_id, video_name):
context.localize('remove'),
'RunPlugin({0})'.format(context.create_uri(
('playlist', 'remove', 'video',),
{
'playlist_id': playlist_id,
'video_id': video_id,
'video_name': video_name,
},
dict(
context.get_params(),
playlist_id=playlist_id,
video_id=video_id,
video_name=video_name,
reload_path=context.get_path(),
),
))
)

Expand Down Expand Up @@ -242,14 +244,14 @@ def add_my_subscriptions_filter(context, channel_name):
)


def rate_video(context, video_id, refresh_container=False):
def rate_video(context, video_id, refresh=False):
return (
context.localize('video.rate'),
'RunPlugin({0})'.format(context.create_uri(
('video', 'rate',),
{
'video_id': video_id,
'refresh_container': refresh_container,
'refresh': refresh,
},
))
)
Expand Down
8 changes: 5 additions & 3 deletions resources/lib/youtube_plugin/kodion/items/xbmc/xbmc_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,17 @@ def video_playback_item(context, video_item, show_fanart=None):
'path': uri,
'offscreen': True,
}
props = {}
else:
kwargs = {
'label': video_item.get_title() or video_item.get_name(),
'label2': video_item.get_short_details(),
'path': uri,
'offscreen': True,
}
props = {
'isPlayable': str(video_item.playable).lower(),
}
props = {
'isPlayable': str(video_item.playable).lower(),
}

if (alternative_player
and settings.alternative_player_web_urls()
Expand Down Expand Up @@ -262,6 +263,7 @@ def video_playback_item(context, video_item, show_fanart=None):
list_item.setMimeType(mime_type)

if is_strm:
list_item.setProperties(props)
return list_item

if not context.get_param('resume'):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def onSettingsChanged(self):
return
if changes > 1:
log_debug('onSettingsChanged: {0} changes'.format(changes))
self._settings_changes = 0

settings = self._settings
settings.flush(xbmcaddon.Addon(ADDON_ID))
Expand Down
Loading

0 comments on commit 44d0da3

Please sign in to comment.