Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request tab no reappear #41

Open
MultiMadjik opened this issue Sep 18, 2024 · 20 comments
Open

Request tab no reappear #41

MultiMadjik opened this issue Sep 18, 2024 · 20 comments

Comments

@MultiMadjik
Copy link

Hello 🙂

First, congratulations to this awesome job!

Last day, I put the request tab button and it's works
Sadly, the tab as no longer work when I switch to a library or another's in the website
I do refresh the page to see again the request tab

Can you have any ideas?

Thanks for advance!

@sureshfizzy
Copy link

+1 for this, I'm no longer able to login to my jellyseer inside the requests tab after setting it up. @ToMattBan any idea on this ?

@ToMattBan
Copy link
Contributor

ToMattBan commented Sep 20, 2024

Good catch @MultiMadjik. I'm going to take a look at that. Never really had noticed it before.
Just to be sure, the tab don't show again when you click on "Home", coming back from one of your libraries, right?

About being unable to login, @sureshfizzy I tried some things here and it seems related to "max number of devices" setting.
I put it no -1 again and had no trouble logging in. Maybe clean the devices that are logged can help you?
Seems like Jellyseer counts as 1 device for Jellyfin

@sureshfizzy
Copy link

Still not able to do that.. i checked on web and i get this, Am i missing something ?

myjellyseerip:port/api/v1/auth/me:1

Failed to load resource: the server responded with a status of 401 ()

FYI: Jellyseer is working when i connect to it directly

@ToMattBan
Copy link
Contributor

401 is an error code about unauthorized access.
For what I understood about how it works, the /api/v1/auth/me uses the cookies got from another request.
One request above, there is the /api/v1/auth/jellyfin request. This one return some error or does it login successfully?

@sureshfizzy
Copy link

surprisingly I couldn't find /api/v1/auth/jellyfin so i believe there are no errors on it. and regarding the 401, i'm able to login to my jellyseer from web though, it's just I can't login from the requests tab inside my jellyfin.

@MakD
Copy link

MakD commented Sep 20, 2024

Same here @ToMattBan. After entering a library, it doesn't reappear, and after pressing home as well.

@ToMattBan
Copy link
Contributor

@sureshfizzy can you open another issue about the login stuff? Let's keep this one about the tab not reappearing.

As soon as I got some (prob later today or tomorrow) time I will take a look on the issues.

@MakD
Copy link

MakD commented Sep 20, 2024

@ToMattBan thanks for agreeing to take a look. Also, wanted to get this to your attention, this doesn't play well with the featured content bar, and also, doesn't seem to render well on a mobile device as well.
screen-20240921-040038-ezgif com-optimize

Edit: Managed to sort it and got the slideshow only on the home tab, and removed it from appearing in the request tab, but still there is the issue of the entire tab vanishing on navigating anywhere+rendering+even I cannot login now to jellyseer 🫣.

@sureshfizzy
Copy link

@sureshfizzy can you open another issue about the login stuff? Let's keep this one about the tab not reappearing.

As soon as I got some (prob later today or tomorrow) time I will take a look on the issues.

Sure, thanks :)

@MakD
Copy link

MakD commented Sep 21, 2024

Also @ToMattBan I had to set the width and height to vw and vh values as somehow the calc is messing the entire thing up (on desktop and phone both)

Screenshot_20240921-111607

@ToMattBan
Copy link
Contributor

@MakD Which browser/client are you using?
I tested here on my browser phone, jellyfin app, desktop and it doesn't shows like yours. The mobile here is great.

About the tab vanishing, @MultiMadjik @sureshfizzy I found why it was happening. I edited the instructions, can you test it please?

You can see the edited instructions here:
https://github.com/ToMattBan/jellyfin-mods/blob/patch-1/10.9.x.md#add-requests-tab

It fixed for me, hope it fixes for you too

@MakD
Copy link

MakD commented Sep 21, 2024

@MakD Which browser/client are you using?
I tested here on my browser phone, jellyfin app, desktop and it doesn't shows like yours. The mobile here is great.

About the tab vanishing, @MultiMadjik @sureshfizzy I found why it was happening. I edited the instructions, can you test it please?

You can see the edited instructions here:
https://github.com/ToMattBan/jellyfin-mods/blob/patch-1/10.9.x.md#add-requests-tab

It fixed for me, hope it fixes for you too

@ToMattBan official android client. I changed the width calc to harcoded 98vw and that works for now. The only issue will be getting the reversed proxied url to open, which I have searched heaven and hell but couldn't get my hands around. Tried different caddy variation ls as well ( I'm not that client with caddy setup, so🤷). Only thing I came across is it needs a modded setup of jellyfin-web I guess. Even though I posted a query in the jellyseerr discord let's see if they address that.

@MakD
Copy link

MakD commented Sep 21, 2024

@ToMattBan Typo in the index.html code bit \&\&

@ToMattBan
Copy link
Contributor

Thanks @MakD

@MakD
Copy link

MakD commented Sep 21, 2024

@ToMattBan it's still disappearing for me. So one part is solved. When I am in any library and press home, the button is there, but if I just press back, it doesn't render

@ToMattBan
Copy link
Contributor

Gonna look at that @MakD
I haven't test hitting the back button.
Seems Jellyfin have a lot of different behaviours, hard to catch them all. If you find another way to return to home that doesn't render the tab, please let me know

@MakD
Copy link

MakD commented Sep 21, 2024

@ToMattBan please test this I guess solved it

    <script>
      const createRequestTab = () => {
        console.log("Creating request tab");
        const title = document.createElement("div");
        title.classList.add("emby-button-foreground");
        title.innerText = "Requests";
  
        const button = document.createElement("button");
        button.type = "button";
        button.is = "empty-button";
        button.classList.add("emby-tab-button", "emby-button", "lastFocused");
        button.setAttribute("data-index", "2");
        button.setAttribute("id", "requestTab");
        button.appendChild(title);
  
        (function e() {
          const tabb = document.querySelector(".emby-tabs-slider");
          if (tabb && !document.querySelector("#requestTab")) {
            tabb.appendChild(button);
          } else if (!tabb) {
            setTimeout(e, 500);
          }
        })();
      };
  
      // Initial page load
      document.addEventListener("DOMContentLoaded", () => {
        createRequestTab();
      });
  
      // When navigating back or forward
      window.addEventListener("popstate", () => {
        createRequestTab();
      });
    </script>

Edit: ARRRRGH... So

  1. When you are on a movie detail page, and press back/home, the button renders.
  2. When you are in a library and press back it renders
  3. When you are in a library and press home it doesn't.😂😂

@ToMattBan
Copy link
Contributor

hahaha yeah @MakD
I lost some time trying tons of stuff and it just doesn't work.

Every way to come back to home have it's own behaviour, and this is making me crazy hahahaha.
Sometimes it re-render the page, sometimes it just changes the display property of a part of the page.
Sometimes it just nuke everything and recreate using JS. I'm clueless about a universal solution.

When I get some more time, I will come back to this nightmare hahahaha

@MultiMadjik
Copy link
Author

Thanks @MakD and @ToMattBan for your job, it resolve a part of the problem for me :)
Like you said, maybe find a fix solution last

Hoever, the new CSS script are fixed also, I haven't screen problem anymore.

@brkr1
Copy link

brkr1 commented Dec 5, 2024

@ToMattBan please test this I guess solved it

    <script>
      const createRequestTab = () => {
        console.log("Creating request tab");
        const title = document.createElement("div");
        title.classList.add("emby-button-foreground");
        title.innerText = "Requests";
  
        const button = document.createElement("button");
        button.type = "button";
        button.is = "empty-button";
        button.classList.add("emby-tab-button", "emby-button", "lastFocused");
        button.setAttribute("data-index", "2");
        button.setAttribute("id", "requestTab");
        button.appendChild(title);
  
        (function e() {
          const tabb = document.querySelector(".emby-tabs-slider");
          if (tabb && !document.querySelector("#requestTab")) {
            tabb.appendChild(button);
          } else if (!tabb) {
            setTimeout(e, 500);
          }
        })();
      };
  
      // Initial page load
      document.addEventListener("DOMContentLoaded", () => {
        createRequestTab();
      });
  
      // When navigating back or forward
      window.addEventListener("popstate", () => {
        createRequestTab();
      });
    </script>

Edit: ARRRRGH... So

  1. When you are on a movie detail page, and press back/home, the button renders.
  2. When you are in a library and press back it renders
  3. When you are in a library and press home it doesn't.😂😂

Is it working on 10.10.3? It has created the tab, but shows nothing.

Nevermind. I had not put http://.
The issue now is that the Jellyseerr interface is cropped. I can't reach the search..

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

No branches or pull requests

5 participants