Skip to content

60secondsassassin patch 1#1183

Open
60secondsassassin wants to merge 4 commits into
elgatito:masterfrom
60secondsassassin:60secondsassassin-patch-1
Open

60secondsassassin patch 1#1183
60secondsassassin wants to merge 4 commits into
elgatito:masterfrom
60secondsassassin:60secondsassassin-patch-1

Conversation

@60secondsassassin
Copy link
Copy Markdown

@60secondsassassin 60secondsassassin commented May 8, 2026

Fix: Inconsistent ViewMode application + local icons when in remote server mode

Description

This PR fixes the issue where Elementum fails to apply the configured View ID (Posters, List, etc.) when navigating through directories.

The fix involves:

  1. Reordering execution: Ensuring xbmcplugin.endOfDirectory is called before attempting to set the view.
  2. Timing Buffer: Introducing a 400ms sleep to allow the Kodi skin to render the container before the SetViewMode command is sent.
  3. Global View Support: Adding a new setting to allow users to force a single View ID across all categories.

Related Issue

Fixes inconsistent UI behavior on Kodi 20/21, especially on low-end hardware where the UI thread is slower than the Python execution.

Motivation and Context

Currently, the Container.SetViewMode command often fires while the directory is still "loading," causing Kodi to ignore it and fall back to the skin's default view. By finalizing the directory first and adding a slight delay, we ensure the command is received when the UI is ready to process it.

How Has This Been Tested?

  • Environment: Kodi 21.3 on OpenSUSE and tvOS.
  • Test Case 1: Set "Movies" to View 51 (Posters) in Estuary. Result: Consistently applies the view on every entry.
  • Test Case 2: Enabled "Global View Mode" and set it to 50 (List). Result: All directories (Movies, Shows, Search) now correctly use the List view.
  • Hardware: Tested on high-end PC and lower-end hardware to verify that 400ms is a sufficient buffer.

Screenshots (if appropriate):

(Optionnel : tu peux ajouter ici une capture d'écran de l'affichage correct des Posters)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Translation

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation (Settings).
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

fix: timing issue for SetViewMode
Add a comment to clarify the purpose of setting the ViewMode.
Implement robust path translation for icons and thumbnails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant