| … | … | @@ -91,6 +91,7 @@ class JacktookPLayer(xbmc.Player): |
| 91 | 91 | # URL without the `|header` suffix, since ISA takes headers via its |
| 92 | 92 | # own properties instead. |
| 93 | 93 | adaptive_url = set_adaptive_stream(self.list_item, self.data) |
| 94 | self._adaptive = bool(adaptive_url) |
| 94 | 95 | if adaptive_url: |
| 95 | 96 | self.url = adaptive_url |
| 96 | 97 | self.PLAYLIST.add(self.url, self.list_item) |
| … | … | @@ -172,11 +173,20 @@ class JacktookPLayer(xbmc.Player): |
| 172 | 173 | # busy dialog, crashing Kodi with "Logic error due to two |
| 173 | 174 | # concurrent busydialogs". |
| 174 | 175 | is_plugin = self.url.startswith("plugin://") |
| 176 | # An inputstream.adaptive item must be opened ONCE. setResolvedUrl |
| 177 | # already hands Kodi this list_item with the ISA properties on it, |
| 178 | # so the extra Player().play() opens the SAME stream a second time |
| 179 | # ~0.7s later and interrupts the first open midway through |
| 180 | # "Finding audio codec" -- the aac decoder never opens and there is |
| 181 | # no sound, while video and seek work fine. Measured 2026-08-10: |
| 182 | # two "Creating Demuxer" + two "Manifest successfully parsed" per |
| 183 | # play, and the successful-open line present only when opened once. |
| 184 | double_open = not is_plugin and not getattr(self, "_adaptive", False) |
| 175 | 185 | kodilog( |
| 176 | | f"[PLAYER] play_video: is_plugin={is_plugin}, " |
| 177 | | f"calling {'setResolvedUrl only' if is_plugin else 'setResolvedUrl + Player().play()'}" |
| 186 | f"[PLAYER] play_video: is_plugin={is_plugin}, adaptive={getattr(self, '_adaptive', False)}, " |
| 187 | f"calling {'setResolvedUrl + Player().play()' if double_open else 'setResolvedUrl only'}" |
| 178 | 188 | ) |
| 179 | | if not is_plugin: |
| 189 | if double_open: |
| 180 | 190 | self.play(self.url, list_item) |
| 181 | 191 | self.monitor() |
| 182 | 192 | kodilog("[PLAYER] play_video: monitor() returned") |