Skip to content

Commit

Permalink
Partially revert 75488c3
Browse files Browse the repository at this point in the history
- Retain old settings and plugin paths
- Avoids resetting settings and messing up existing favourites/widgets
  • Loading branch information
MoojMidge committed Jan 11, 2024
1 parent 569e7a9 commit d4de81b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions resources/lib/youtube_plugin/youtube/helper/yt_specials.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,16 @@ def _process_new_uploaded_videos_tv_filtered(provider, context):
def process(category, provider, context):
_ = provider.get_client(context) # required for provider.is_logged_in()
if (not provider.is_logged_in()
and category in ['new_uploaded_videos_tv',
and category in ('new_uploaded_videos_tv',
'new_uploaded_videos_tv_filtered',
'disliked_videos']):
'disliked_videos')):
return UriItem(context.create_uri(('sign', 'in')))

if category == 'related_videos':
return _process_related_videos(provider, context)
if category == 'trending':
if category == 'popular_right_now':
return _process_trending(provider, context)
if category == 'recommended':
if category == 'recommendations':
return _process_recommendations(provider, context)
if category == 'browse_channels':
return _process_browse_channels(provider, context)
Expand Down
10 changes: 5 additions & 5 deletions resources/lib/youtube_plugin/youtube/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,11 +1294,11 @@ def on_root(self, context, re_match):
history_id = logged_in and access_manager.get_watch_history_id()
local_history = settings.use_local_history()

# Home / Recommended
if settings.get_bool('youtube.folder.recommended.show', True):
# Home / Recommendations
if settings.get_bool('youtube.folder.recommendations.show', True):
recommendations_item = DirectoryItem(
localize('recommendations'),
create_uri(('special', 'recommended')),
create_uri(('special', 'recommendations')),
image='{media}/home.png',
)
result.append(recommendations_item)
Expand All @@ -1314,10 +1314,10 @@ def on_root(self, context, re_match):
result.append(related_item)

# Trending
if settings.get_bool('youtube.folder.trending.show', True):
if settings.get_bool('youtube.folder.popular_right_now.show', True):
trending_item = DirectoryItem(
localize('trending'),
create_uri(('special', 'trending')),
create_uri(('special', 'popular_right_now')),
image='{media}/trending.png',
)
result.append(trending_item)
Expand Down
4 changes: 2 additions & 2 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
<heading>30585</heading>
</control>
</setting>
<setting id="youtube.folder.recommended.show" type="boolean" label="30551" help="">
<setting id="youtube.folder.recommendations.show" type="boolean" label="30551" help="">
<level>0</level>
<default>true</default>
<control type="toggle"/>
Expand All @@ -426,7 +426,7 @@
<default>true</default>
<control type="toggle"/>
</setting>
<setting id="youtube.folder.trending.show" type="boolean" label="30513" help="">
<setting id="youtube.folder.popular_right_now.show" type="boolean" label="30513" help="">
<level>0</level>
<default>true</default>
<control type="toggle"/>
Expand Down

0 comments on commit d4de81b

Please sign in to comment.