jellyfin / jellyfin-media-player

Jellyfin Desktop Client
GNU General Public License v2.0
2.87k stars 297 forks source link

Intro Skip not working in Windows since v1.11.1 #701

Open Don-Chris opened 2 weeks ago

Don-Chris commented 2 weeks ago

Describe the bug

Since the update of JMP from v1.10.1 to v.11.1, the Skip Intro Button is only shown in the first video stream after starting JMP. After stopping the stream and restarting the same video, the Skip Intro Button is not shown. Additionally, the skip Intro Button is always shown correctly in the browser. Since not a lot changed between these versions, the bug is probably located in commit 1976274.

To Reproduce

  1. Use version v1.11.1 on windows
  2. Start JMP and click instantly on a video. Wait or skip to a part of the video that got flagged as an intro/outro.
  3. You can see the "Skip Intro" or "Next" Button.
  4. Stop the Video (Click on the arrow in the top left)
  5. Click on the same video or another one with a part of the video that got flagged as an intro/outro.
  6. The "Skip Intro" or "Next" Button will not be displayed.

Expected behavior

The Skip Intro Button should be shown everytime a new video stream is started.

Desktop

Additional context

Log of the program with v1.10.1 : https://pastebin.com/A1eyec5R Log of the program with v1.11.1: https://pastebin.com/TdfF7K59 Log while debugging with edge/chrome in v1.11.1: https://pastebin.com/eD6du7e8

Debugging

Error in web-debug:

3skipIntroPlugin.js:174  
  Uncaught (in promise) TypeError: Cannot read property 'SkipButtonIntroText' of undefined
    at mpvVideoPlayer.onTimeUpdate (skipIntroPlugin.js:174:110)
  onTimeUpdate @ skipIntroPlugin.js:174
  await in onTimeUpdate (asynchron)
  onTimeUpdate @ skipIntroPlugin.js:155
  (anonym) @ main.jellyfin.bundle.js?cdb0dd9873705de79052:2
  trigger @ main.jellyfin.bundle.js?cdb0dd9873705de79052:2
  onTimeUpdate @ mpvVideoPlayer.js:130
  (anonym) @ qwebchannel.js:303
  invokeSignalCallbacks @ qwebchannel.js:302
  QObject.signalEmitted @ qwebchannel.js:325
  QWebChannel.handleSignal @ qwebchannel.js:125
  QWebChannel.transport.onmessage @ qwebchannel.js:83

The first time a video stream is started the code in skipIntroPlugin.js in line 174 results in an undefined "skipIntroConfig" object. However, this time, the skip intro button can be seen. The next time, when a video stream is started, this object is valid, however the skip intro button can't be seen. It looks like the function injectSkipIntroHtml() returns an undefined skipIntroConfig object the first time it is called, and is defined after the second time.

line 173-174:

case "Introduction":
       skipIntro.querySelector("#btnSkipSegmentText").textContent = skipIntroConfig.SkipButtonIntroText;

line 126 somehow returns an undefined object the first time the function injectSkipIntroHtml() is called:

skipIntroConfig = await secureFetch("/Intros/UserInterfaceConfiguration");

Temporary Fix

Manually overriding the lines 174 and 177 fixes the issue:

case "Introduction":
       skipIntro.querySelector("#btnSkipSegmentText").textContent = "Skip Intro";
       break;
case "Credits":
       skipIntro.querySelector("#btnSkipSegmentText").textContent = "Next";
       break;
FizzyRust commented 2 weeks ago

The temporary fix didn't have any effect for me, the bug is still there. image

Uncle-Tio commented 1 week ago

Temporary fix didn't have any effect for me either.

The bug is probably located in commit 0c57c6d2eac9a806e7aa6be95d99a260f23adb98 not 1976274513795f0c6ac6bee50ebb9d8982af57bc. I already used an external web-client before 1.10, so I don't think that's the problem. Unless the problem didn't occur in version 1.10? I haven't tested it.

Also the skip intro (in 1.9.1) already worked with the jumoog version. Of course, using the fix from commit bc0ec5a099a7d78c467211ce438e0165a1de71c1 which was never officially "released".

Uncle-Tio commented 5 days ago

Could someone test whether this build solves the problems? although not related to the error you had in the debug, it solved the problem you described, which also happened to me. https://github.com/Uncle-Tio/jmp-fork/actions/runs/9702138999/artifacts/1646047794 I also rolled back mpv, but that was to solve another issue with the subtitles.

FizzyRust commented 17 hours ago

I tested it out, and unfortunately the issue still persists.

Uncle-Tio commented 12 hours ago

It's still working for me and a friend, can you check if the file C:\Program Files\Jellyfin\Jellyfin Media Player\web-client\extension\skipIntroPlugin.js has actually changed? should be 244-245 lines, if you want to compare or replace manually: https://github.com/Uncle-Tio/jmp-fork/blob/fix-skipintro/native/skipIntroPlugin.js

I'm running Jellyfin 10.9.7 + Intro Skipper 0.2.0.9