Skip to content

Instantly share code, notes, and snippets.

@CarstenG2
CarstenG2 / gui.py
Last active March 8, 2026 12:35
xStream trailer: per-language priority search (Version: 2026-03-08) — code + design docs
# -*- coding: utf-8 -*-
# Python 3
import sys
import xbmc
import xbmcgui
import xbmcplugin
from resources.lib import utils
from resources.lib.config import cConfig
@CarstenG2
CarstenG2 / CHANGELOG.txt
Created March 4, 2026 21:24
xShip PATCHED changelog (2026-03-04)
xShip PATCHED — Issues #40 through #68
Base: plugin.video.xship v2026.01.18 (michaz1988)
== 2026-03-04 ==
Source search fix: isFolder=True for clean context menu now works
correctly with source list displayed as directory after scan.
FSK age rating: movie listings show FSK rating (0/6/12/16/18)
from TMDB release_dates API. Shown in plot and as overlay.
@CarstenG2
CarstenG2 / kodi-boolean-extra-test-clean.log
Created February 27, 2026 07:32
Kodi debug log: StartAndroidActivity boolean extra not implemented
2026-02-27 08:30:31.586 T:16000 info <general>: -----------------------------------------------------------------------
2026-02-27 08:30:31.586 T:16000 info <general>: Starting Kodi (21.3 (21.3.0) Git:20251031-a3a448d26b). Platform: Android ARM 32-bit
2026-02-27 08:30:31.586 T:16000 info <general>: Using Release Kodi x32
2026-02-27 08:30:31.586 T:16000 info <general>: Kodi compiled 2025-12-13 by Clang 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) for Android ARM 32-bit API level 21 (API level 21)
2026-02-27 08:30:31.586 T:16000 info <general>: Running on Amazon AFTKRT with Android TV 11.0.0 API level 30, kernel: Linux ARM 32-bit version 5.10.43-android12-9-ga8c852b26125
2026-02-27 08:30:31.587 T:16000 info <general>: FFmpeg version/source: 6.0.1-Kodi
2026-02-27 08:30:31.587 T:16000 info <general>: Host CPU: ARMv8 Processor rev 0 (v8l), 4 cores available
2026-02-27 08:30:31.587 T:16000 info <general>: Product: karat, Device: ka
@CarstenG2
CarstenG2 / gist:9abd615f33a00eebf13a3e3192948915
Created February 26, 2026 07:43
xShip: Fix ValueError in listings.py _call() when TMDB returns status_code 34
--- a/resources/lib/indexers/listings.py
+++ b/resources/lib/indexers/listings.py
@@ -106,7 +106,7 @@ class listings:
name = oRequestHandler.request()
data = json.loads(name)
if 'status_code' in data and data['status_code'] == 34:
- return {}
+ return [], 0
list = []
for i in data['results']:
@CarstenG2
CarstenG2 / gist:58452e4ae288d94b53b177554de27a2c
Created February 24, 2026 16:51
xShip: skip captcha/popup hosters during scan, fallback during play
--- a/resources/lib/utils.py
+++ b/resources/lib/utils.py
@@ -61,6 +61,11 @@ def isBlockedHoster(url, isResolve=True):
url = html.unescape(url) # https://github.com/Gujal00/ResolveURL/pull/1115
hmf = resolver.HostedMediaFile(url=url, include_disabled=True, include_universal=False)
if hmf.valid_url():
+ try:
+ if hmf._HostedMediaFile__resolvers[0].isPopup():
+ prioHoster = hmf._HostedMediaFile__resolvers[0].priority
+ return False, sDomain, url, max(prioHoster, 999)
@CarstenG2
CarstenG2 / xship-patched-readme.md
Created February 23, 2026 07:27
xShip PATCHED (v2026.01.18) — Issues #40 through #59 — install instructions + changelog

xShip PATCHED — Issues #40 through #59

Base: plugin.video.xship v2026.01.18 (michaz1988) ZIP: 16-plugin.video.xship-2026.01.18-PATCHED-40-59.zip

Note: This patched build is provided for easier testing only. It is not intended to officially replace any of michaz's releases. If michaz decides to integrate these fixes into the upstream project, that is entirely his call. Until then, this ZIP serves as a convenient way to test all patches together on a real device.

@CarstenG2
CarstenG2 / navigator.py
Created February 22, 2026 18:02
xShip fix #59: navigator.py — async download path check with 2s timeout
#2021-07-14
# edit 2025-06-12
import sys
from os import path
import xbmcvfs, xbmc
from resources.lib import control
from resources.lib.tools import cParser
@CarstenG2
CarstenG2 / control.py
Last active February 26, 2026 10:32
xShip patches: Medien-Info (Issue #48) + Trailer ansehen (Issue #58) — all modified files
#2021-07-20
#edit 2024-12-04
import os, sys
import xbmc, xbmcplugin, xbmcaddon, xbmcgui, xbmcvfs
from six import iteritems
is_python2 = sys.version_info.major == 2
@CarstenG2
CarstenG2 / default.py
Last active February 14, 2026 10:40
xShip: download manager support (JD1, JD2, MyJD, PyLoad) - all new + modified files
# 2023-05-10
# edit 2025-06-12
import sys, json
from urllib.parse import parse_qs, urlsplit
from resources.lib import control
params = dict(control.parse_qsl(control.urlsplit(sys.argv[2]).query))
@CarstenG2
CarstenG2 / resources--lib--gui--guiElement.py
Last active February 14, 2026 10:41
xStream v2026.01.21 - Python 3.12+ fixes + startup optimization + pyaes import fix
# -*- coding: utf-8 -*-
# Python 3
from resources.lib.tools import cParser, cUtil
from resources.lib.config import cConfig
from xbmc import LOGERROR, log
from os import path
class cGuiElement:
'''