tedhinklater / Jellyfin-Featured-Content-Bar

Featured Bar now with Fullscreen Version
GNU General Public License v3.0
50 stars 10 forks source link

After back button update the trailer on desktop version dont showup #16

Open Isaiasgamedev opened 5 days ago

Isaiasgamedev commented 5 days ago

Screenshot_1 This product has trailer, but the trailer don play you can see the console error too

Isaiasgamedev commented 5 days ago

i made changes to remove play button but is just that, to test i copy and paste yourcode with no changes e same thing happens

Isaiasgamedev commented 5 days ago

just to help i made a code to identify the device e use the right banner for device and personalize sizes

"use strict"; (self.webpackChunk = self.webpackChunk || []).push([[8372], { 5939: function (a, e, t) { t.r(e);

    // Função para verificar se é um dispositivo móvel
    function isMobile() {
        return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
    }

    // Função para verificar se é uma TV
    function isTV() {
        return /SmartTV|Android TV|Google TV|Apple TV|Tizen/i.test(navigator.userAgent);
    }

    // Determinar altura do iframe com base no tipo de dispositivo
    const iframeHeight = isTV() ? 600 : (isMobile() ? 500 : 950);

    // Determinar a URL do iframe com base no tipo de dispositivo
    const iframeSrc = isTV() ? '/web/avatars/slideshow.html' : '/web/ui/spotlight.html';

    // Código principal
    e.default = `
        <div id="indexPage" style="outline:0" data-role="page" data-dom-cache="true" class="page homePage libraryPage allLibraryPage backdropPage pageWithAbsoluteTabs withTabs" data-backdroptype="movie,series,book">
            <style>
                .featurediframe {
                    width: 100%;
                    height: ${iframeHeight}px;
                    display: block;
                    margin: 0 auto;
                    overflow: hidden; /* Remove barras de rolagem */
                }

                iframe {
                    width: 100%;
                    height: 100%;
                    border: none;
                    overflow: hidden; /* Remove barras de rolagem no conteúdo interno */
                }

            </style>
            <div class="featurediframe">
                <iframe src="${iframeSrc}" title="Slideshow"></iframe>
            </div>
            <div class="tabContent pageTabContent" id="homeTab" data-index="0">
                <div class="sections"></div> 
            </div>
            <div class="tabContent pageTabContent" id="favoritesTab" data-index="1"> 
                <div class="sections"></div>
            </div>
        </div>`;
},

}]);

Isaiasgamedev commented 5 days ago

just to be sure yes the product has trailer Screenshot_2

tedhinklater commented 5 days ago

download List.txt and just leave the first line (delete line 2 and below) and put it in the /ui/ folder