[COLOR orchid][B]The Crew - Changelog[/B][/COLOR]

=====================================================
Version 3.2.9 - "Years + builders quiet boot" (August 2026)
=====================================================

Movies
- [COLOR orange]Fix[/COLOR] Movies -> Years was empty/sparse for many users (Trakt trending?years=); now TMDB discover with the same English/origin filters as Genres

[COLOR red][B]Debug / Builders [/B][/COLOR]only!
- [COLOR lime]New[/COLOR] Builders-only: Suppress all startup UI (plugin Debug) — mutes version announcement, Trakt startup notices, debrid toasts, health-check UI, and library auto-update / new-season toasts (separate from Silent boot)
- [COLOR orange]Warning[/COLOR] Builders who enable this: users will not see Crew startup notices (version/update dialogs, library auto-update toasts, debrid expiry toasts, health-check UI). If a user “never got the update notice” or library message at boot, that silence is the build’s setting — not a Crew bug. Day-to-day dialogs while using the addon still work.

- [COLOR orange]Polish[/COLOR] Debug settings: Warning block above Enable Debug; shorter help lines (Kodi truncates long text rows)

Plugin 3.2.2 ships the builders setting + strings and requires this module.

=====================================================
Version 3.2.8 - "Search Back navigation" (August 2026)
=====================================================

Search
- [COLOR orange]Fix[/COLOR] People Search uses Container.Update(...,replace) so Back skips the keyboard dialog
- [COLOR orange]Fix[/COLOR] Advanced Search is a folder again — results list into that handle (Classy pattern) so Back returns to Movies/TV instead of trapping in Container.Update

=====================================================
Version 3.2.7 - "People + Advanced Search" (August 2026)
=====================================================

Search
- [COLOR orange]Fix[/COLOR] People Search (Movies + TV) showed no results after the keyboard — dialog routes now Container.Update into moviePersons / tvPersons like title search
- [COLOR orange]Fix[/COLOR] Advanced Search (Movies + TV) same dialog-handle trap — results open via movieAdvancedResults / tvAdvancedResults with the filter in the URL
- [COLOR orange]Fix[/COLOR] Advanced Search year filters on movies used TV TMDB params (`first_air_date_*`); now `year` / `primary_release_date` (and movie-aware Release Date sort)
- [COLOR orange]Fix[/COLOR] Advanced Search "expired" toast — filter was stashed on a non-existent Window property; payload is passed on the results URL instead

=====================================================
Version 3.2.6 - "Adult PIN master reset" (August 2026)
=====================================================

Adult Section
- [COLOR orange]Fix[/COLOR] Master Reset Key could clear the lockout loop but leave Enter PIN stuck (Omega empty PIN stored as a space; reset refused when protection was on with no real PIN). Reset now clears the placeholder, disables protection, and recovers that state.

=====================================================
Version 3.2.5 - "Next Episodes, library boot, scrape noise" (August 2026)
=====================================================

TV Shows
- [COLOR orange]Fix[/COLOR] Simkl Next Episodes showed unaired season premieres (Grey's S23, 9-1-1 S10, Ghosts S06, etc.) - drop markers with a known future air date (Simkl date + TMDB enrich + season-cache premiere); stop treating next_to_watch.date as last_watched_at

Library (#245 follow-up)
- [COLOR orange]Fix[/COLOR] Auto Update Library again runs once when Kodi/service starts (with notification if enabled), then every 6 hours - startup pass was missing because only the 6h interval was checked
- [COLOR orange]Fix[/COLOR] Library service thread died at boot (`list index out of range`) - no longer uses plugin `sys.argv` for .strm matching/writing; ensures service + tvshows tables before update; starts after boot main() so it does not race settings repair
- [COLOR orange]Fix[/COLOR] Root cause of that IndexError: `libtools` imported `movies`->`navigator` which did `sys.argv[1]` at import time under the service thread - navigator argv is now safe; movies/tvshows are lazy-imported

Sources
- [COLOR orange]Fix[/COLOR] Title filter wiped M*A*S*H (etc.) results - keep asterisks out of cleaned titles; Trakt aliases are dicts (`title` key), not `str(dict)` junk like `{titlemashcountry}`
- [COLOR orange]Fix[/COLOR] Orion TV cache read hit IndexError (looked for timestamp on `rel_url` which has none) - use `rel_src` with `added` like other providers; drop noisy CM Debug traceback spam
- [COLOR orange]Fix[/COLOR] Classy scrapers (and alike) failed on 2nd+ play in-session (`'list' object is not callable`) - `self.sources = []` shadowed the method on cached instances; resolve unbound `sources()` instead
- [COLOR deepskyblue]Tweak[/COLOR] Drop per-source `[seas_ep_filter]` log lines (filter is settled)

=====================================================
Version 3.2.4 - "Search speed + scrape polish" (July 2026)
=====================================================

Movies
- [COLOR orange]Fix[/COLOR] Movie search was slow (especially Xbox / low-end): every hit ran full worker (TMDB details + credits + Fanart.tv) before the list opened. Search now uses a light path (search payload only)
- [COLOR orange]Fix[/COLOR] Movie search still stalled ~10s+ after clear-cache: directory waited on Trakt/Simkl full watched sync + per-row bookmark DB. Search now uses soft cached indicators only and skips resume lookups
- [COLOR orange]Fix[/COLOR] Clear Search History no longer drops into an empty listing (was added as a folder); stays on search and refreshes. Empty keyboard/term searches are ignored
- [COLOR orange]Fix[/COLOR] Movie search play no longer scrapes with imdb=0 - light path fills tt* via cached TMDB /external_ids (also play() safety net)

TV Shows
- [COLOR orange]Fix[/COLOR] Same Clear Search History / empty-query guard as movies

Debrid
- [COLOR orange]Fix[/COLOR] Cancelling a Real-Debrid (etc.) cloud download no longer asks "keep transferring?" three times - cancel now arms Crew stop + suppresses ResolveURL keep-transfer prompts so Smart Resolve does not re-ask on the next links

Sources
- [COLOR orange]Fix[/COLOR] "No stream available" right after a cold scrape timeout with 0 hits while scrapers were still running - wait a short grace for the first sources before aborting
- [COLOR orange]Fix[/COLOR] Scrape dialog felt stuck for several seconds: re-imported ~70 scrapers every play; cache providers for the Kodi session, skip Gears helper modules, paint dialog immediately (0.5s updates), cache ResolveURL host list
- [COLOR orange]Fix[/COLOR] 15/69 scrapers completing then whole Gears/Classy packs looking "slow": was a 69-thread stampede + SlowScraper strikes on finished-after-close. Cap concurrency; only strike while dialog open
- [COLOR orange]Fix[/COLOR] Fast scrapers sat queued for the full 15s: dead hosts held slots on default `client.request` 30s timeout. During scrape, cap HTTP waits (~7-8s) and raise concurrency to 48 so 1-2s providers actually run
- [COLOR deepskyblue]Tweak[/COLOR] Settings -> Scrapers: "Enable built-in Crew scrapers" (`crewscrapers.enabled`, default on) - turn off to scrape with Classy/external packs only (skips dead HTML internals)
- [COLOR orange]Fix[/COLOR] Reuse prior source cache keyed imdb=0+tmdb when play now has a real tt* (light-search fill) so a second click is not a cold miss
- [COLOR orange]Fix[/COLOR] Source list paint was ~25s for 1000 rows (full meta/cast per torrent) - slim InfoTags; freeze list before filter so late scrapers cannot balloon it
- [COLOR deepskyblue]Tweak[/COLOR] Source cache: default 60 min; soft/stale ~4h for movies and episodes - keys are imdb|tmdb + sXeY (imdb missing -> tmdb scopes the title)

=====================================================
Version 3.2.3 - "Library add/auto-update" (July 2026)
=====================================================

Library (#245)
- [COLOR orange]Fix[/COLOR] TV Add to Library failed - episodes indexer imported as `lib.resources.lib.indexers` (broken under module path); use relative `..indexers`
- [COLOR orange]Fix[/COLOR] Movie Add to Library failed - `movieToLibrary` passed `tmdb` into `libmovies.add` which rejected the kwarg; accept optional `tmdb`
- [COLOR orange]Fix[/COLOR] TV Add to Library no longer skips Kodi `UpdateLibrary(video)` (was left disabled from testing)
- [COLOR orange]Fix[/COLOR] Auto Update Library service: same broken episodes import aborted silent runs; stamp last_run after update attempt; clearer service logs

=====================================================
Version 3.2.2 - "Hot fixes" (July 2026)
=====================================================

Up Next / playback
- [COLOR orange]Fix[/COLOR] Up Next no longer offers Unknown Show / S00E01 when Home props were cleared mid-session (identity_complete + refuse incomplete rebind)
- [COLOR orange]Fix[/COLOR] Up Next Play Now / autoplay no longer scrapes the previous episode - sourcesDirect kept stale window meta S/E over play()-set identity (pack resolve followed the wrong ep)
- [COLOR orange]Fix[/COLOR] Bind Up Next session from live Crew player meta after playback starts (beats dual-install / Classy leftover thecrew.upnext.* props)

Calendars (#244)
- [COLOR orange]Fix[/COLOR] Simkl calendars honor the same sorts as Trakt: Today A-Z; This Week / Next Week / New Aired / multi-day = air date ASC then title A-Z
- [COLOR orange]Fix[/COLOR] Calendar air dates survive worker enrich (Simkl int S/E vs worker str keys missed preserve - wrong order + missing dates like The Ark / AGT)
- [COLOR deepskyblue]Tweak[/COLOR] Re-sort calendars after enrich so list order matches the dates you see

Art / fanart.tv / trailers
- [COLOR orange]Fix[/COLOR] Fanart.tv first for show/episode art (poster, fanart, clearlogo, clearart); TMDB fills gaps; short CDN logo URLs kept; prefer highest-likes logo
- [COLOR orange]Fix[/COLOR] Seasons clearlogo was stuck on Crew default - TMDB external_ids key is tvdb_id (was reading tvdb, so fanart.tv never ran)
- [COLOR orange]Fix[/COLOR] Episode info -> Trailer now passes poster + fanart in meta (was missing - only addon poster showed)
- [COLOR deepskyblue]Tweak[/COLOR] Also set tvshow.clearlogo for skins that look for that art key (Aeon Nox Silvo MyFlix)

Lists / seasons / episodes
- [COLOR orange]Fix[/COLOR] Unaired season titles use unaired.identify color (aired seasons stay normal)
- [COLOR orange]Fix[/COLOR] Thin / future episode rows keep sensible show art + plot placeholders when TMDB stills/plots are empty

Movies
- [COLOR orange]Fix[/COLOR] Movie info cast/actors missing when metacache had art but no credits - refresh those rows; harden cast/crew parse + setCast
- [COLOR orange]Fix[/COLOR] Movie director/writer init bug (tuple instead of two strings)
- [COLOR orange]Fix[/COLOR] Sources list background used only fanart2 - movies send fanart, so BG fell back to Crew default; now fanart2 -> fanart -> landscape
- [COLOR orange]Fix[/COLOR] Sources listitem info: setCast + TMDB credits fill when play meta lacked director/writer/actors (poster/discart still present)
- [COLOR orange]Fix[/COLOR] Sources listitem trailer missing - play meta was built before trailer URL was set; now included + setTrailer on source rows
- [COLOR orange]Fix[/COLOR] Playing info cast/director/writer missing - player used legacy setInfo only (no setCast); now InfoTag + shared TMDB credits fill (art/stream badges were already fine)
- [COLOR orange]Fix[/COLOR] Simkl history / personal movie lists: light enrich skipped credits and re-cached without cast - Info on listitem empty while sources Info showed full crew
- [COLOR orange]Fix[/COLOR] Movie MPAA showed NR - TMDB has no top-level certification; now read US cert from release_dates (theatrical preferred)

=====================================================
Version 3.2.1 - the "Saskia did it again - stop busy-cursor hotfix" (July 2026)
=====================================================

Trakt (confirmed user path for the 26s video):
- [COLOR orange]Fix[/COLOR] cachesyncTVShows was bypassing cache (always full /sync/watched/shows?extended=progress) - now cache.get like movies; syncTVShows reuses shared watched-shows cache

Simkl (same symptom class):
- [COLOR orange]Fix[/COLOR] episode/movie lists no longer force a full library re-download on every Container.Refresh
- [COLOR orange]Fix[/COLOR] Mid-episode Stop scrobbles as pause (<92%), matching CrewMonitor

Sources / packs:
- [COLOR orange]Fix[/COLOR] Pack resolve: prefer provider language (English by default) over size-only so French/English twins pick the right file (RD/AD/PM)
- [COLOR orange]Fix[/COLOR] RD pack: never fall back to links[0] when the matched episode is not in the selected set - delete + reselect instead
- [COLOR orange]Fix[/COLOR] Screeners and Cams toggle: OFF actually hides cams (was treating the string "false" as truthy)
- [COLOR orchid]Change[/COLOR] External scraper packs: removed all code fixes and shims, our new own pack is ClassyScrapers

Shared:
- [COLOR orange]Fix[/COLOR] Stop scrobble + Trakt queue flush run in a background thread (player callback returns immediately)
- [COLOR orange]Fix[/COLOR] Tools menu: Trakt / Simkl Authorize show again when that service has no token (was gated on active tracker only, so the other auth link stayed hidden)

=====================================================
Version 3.2.0 - the "Hey there SIMKL while trakt tracker tracks" release (July 2026)
=====================================================

Simkl
- [COLOR limegreen]Add[/COLOR] Simkl as an alternate tracker (lists, continue watching, ratings, calendars, playcount)
- [COLOR limegreen]Add[/COLOR] TV Evening: Simkl next-to-watch pool (same idea as Next Episodes)
- [COLOR orange]Fix[/COLOR] Switch Trakt <-> Simkl mid-session: scrobble follows the new tracker right away
- [COLOR orange]Fix[/COLOR] Simkl Mark Watched: skip bad IDs; toast on context menu

Trakt & accounts
- [COLOR limegreen]Add[/COLOR] Revoke Trakt (Tools + Settings) - stays revoked (no surprise re-login from backups)
- [COLOR limegreen]Add[/COLOR] Trakt usage vs limits (Tools): lists, list items, watchlist, library
- [COLOR limegreen]Add[/COLOR] Clear toast when you hit a Trakt account/list limit
- [COLOR orange]Fix[/COLOR] Trakt revoke clears tokens from settings backups too (no more deleting .bak by hand)
- [COLOR orange]Fix[/COLOR] Dead Trakt tokens no longer come back from backups
- [COLOR orange]Fix[/COLOR] Re-authorize starts a fresh device/QR flow (no silent "already done")
- [COLOR orange]Fix[/COLOR] Trakt Manager: errors toast instead of failing silently
- [COLOR orange]Fix[/COLOR] Startup no longer freezes Kodi with a Trakt dialog - one toast only
- [COLOR orange]Fix[/COLOR] Trending lists still work with a dead/revoked Trakt login (public catalogs)
- [COLOR orange]Fix[/COLOR] New Episodes lives under My TV Shows (Trakt) so it does not error when logged out
- [COLOR deepskyblue]Tweak[/COLOR] Tools: Auth Trakt / Auth Simkl only when that tracker is selected and not yet linked - reauth/revoke stay in Settings

Watch, widgets & play
- [COLOR orange]Fix[/COLOR] Widget Mark Watched refreshes home Next Episodes / Progress (incl. Aeon Nox)
- [COLOR orange]Fix[/COLOR] Mark movie watched: checkmark shows correctly (no fake 00:01 resume)
- [COLOR orange]Fix[/COLOR] Source cache no longer serves links from a different episode (UpNext / wrong scrape)
- [COLOR orange]Fix[/COLOR] Episode scrobble/resume when episode IDs were missing
- [COLOR orange]Fix[/COLOR] Play Random episode no longer fails silently
- [COLOR orange]Fix[/COLOR] TV Auto Play from context menu scrapes again
- [COLOR deepskyblue]Tweak[/COLOR] Play Random can autoplay the best source (on by default)
- [COLOR deepskyblue]Tweak[/COLOR] Find Similar uses TMDB (not Trakt)

Menus, search & calendars
- [COLOR orange]Fix[/COLOR] New Search runs immediately (no extra click on history)
- [COLOR orange]Fix[/COLOR] Calendar -> Browse Series opens seasons correctly
- [COLOR orange]Fix[/COLOR] Browse Season from Progress no longer empty when status is missing
- [COLOR deepskyblue]Tweak[/COLOR] Movie/TV calendars moved up in the menus (easier to find)

Documentaries & genres
- [COLOR limegreen]Add[/COLOR] Documentaries hub: Movie + TV Documentaries (TMDB)
- [COLOR limegreen]Add[/COLOR] TV genres: Thriller, Detective, Cop Shows
- [COLOR crimson]Removed[/COLOR] Top Documentary Films (TDF) browser
- [COLOR deepskyblue]Tweak[/COLOR] TV Sci-Fi & Fantasy: better English + international mix

Tools & health
- [COLOR limegreen]Add[/COLOR] Classy Scrapers support (script.module.classyscrapers)
- [COLOR orange]Fix[/COLOR] Downloads: folder paths belong under Downloads (not Library labels); Download appears in source CM when enabled + path set
- [COLOR orange]Fix[/COLOR] Settings repair no longer corrupts userdata settings on Kodi Omega
- [COLOR deepskyblue]Tweak[/COLOR] Test Scrapers runs a real scrape (not a fake "Blocked" domain check)
- [COLOR deepskyblue]Tweak[/COLOR] Health check names each repair (or "All good") - no phantom "1 repair"
- [COLOR deepskyblue]Tweak[/COLOR] Clearer "No Trakt account found" message

=====================================================
Version 3.0.9.9 - "Sports HLS hold" (July 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Lists live HLS: prefer inputstream.ffmpegdirect so Referer/UA survive playlist refreshes (stops ~10s stalls / 403 on sports)

=====================================================
Version 3.0.9.8 - "Welcome stays gone" (July 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Settings repair: profile backup no longer full-overwrites userdata (was stomping last_version -> welcome dialog every boot)
- [COLOR orange]Fix[/COLOR] Emergency .bak restore preserves forward-only markers (last_version, module_base, plugin_base)
- [COLOR limegreen]Add[/COLOR] Refresh emergency profile backup on module/plugin version change

=====================================================
Version 3.0.9.7 - "Tokens + welcome" (July 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Version announcement: persist last_version to disk AND setSetting so boot setSetting flushes cannot stomp it back
- [COLOR orange]Fix[/COLOR] Trakt: stop clearing tokens on HTTP 400/401 (avoids empty default="true" settings poison / endless re-auth)
- [COLOR orange]Fix[/COLOR] Settings repair: strip default= on sensitive keys; restore empty auth keys from backups on boot
- [COLOR limegreen]Add[/COLOR] ssl unverified default HTTPS context for hosts with broken certificates (White ;))
- [COLOR deepskyblue]Tweak[/COLOR] New TV Shows: sort by popularity, fixed UK -> GB (cleaner list, ~3 pages)

=====================================================
Version 3.0.9.6 - "Progress + cleanup" (July 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Trakt #775: progress widgets fetch `/sync/watched/shows?extended=progress` with pagination - `extended=full` no longer includes season/episode rows (root cause of Next Episodes / In Progress showing S01E01)
- [COLOR orange]Fix[/COLOR] Watched-show cache validates season/episode detail; poisoned pre-#775 cache is rejected and refetched
- [COLOR orange]Fix[/COLOR] Progress / TV Evening: skip shows without watched episode detail instead of defaulting to S01E01
- [COLOR orange]Fix[/COLOR] Startup batch sync, TV indicators, and TV Evening backdrop use the same paginated progress fetch
- [COLOR orange]Fix[/COLOR] In-progress widget: enrich TMDB posters before listing (no posterless deferred rows)
- [COLOR orange]Fix[/COLOR] Next Episodes widget: stop infinite "Loading..." refresh loop when Trakt auth has failed
- [COLOR orange]Fix[/COLOR] Sources: busy spinner stuck after user cancel on PlayMedia/STRM routes
- [COLOR orange]Fix[/COLOR] Settings repair: normalize empty `adult_pin` userdata for Kodi 21/Omega settings load
- [COLOR limegreen]Add[/COLOR] One-time startup purge (v3.0.9.5 flag): clears stale `trakt_watched_shows_extended` / next-episode cache and Trakt ETag validators
- [COLOR orange]Remove[/COLOR] IPTV/whitehat: bundled `whitehat.xml`, list route, actionlist handler, and dead navigator wiring

=====================================================
Version 3.0.9.4 - "The quietly good housekeeping version" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Movies -> Genres: switched from Trakt /movies/trending (tiny pool, 1-2 pages) to TMDB /discover/movie with English-language/country filters - now returns many pages of results, same approach as TV Shows genres
- [COLOR orange]Fix[/COLOR] Watchlist truncation: movies and TV shows watchlist limit raised from 250 to 2000 - VIP users with large watchlists no longer get silently cut off
- [COLOR orange]Fix[/COLOR] movies.py: collection_link (dead code) used limit={self.count} which would have capped at the page-item setting; collection display uses the local SQLite mirror (no cap) so this was harmless but clarified

=====================================================
Version 3.0.9.3 - "The My Final Goodbye version" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Disney+ movies category empty: TMDB URL had literal %s before cache fetch; poisoned empty result cached forever
- [COLOR orange]Fix[/COLOR] cache.get_with_etag: no longer caches empty results arrays (same guard as cache.get)
- [COLOR limegreen]Add[/COLOR] One-time startup cache purge (v3.0.9.3): removes all empty/poisoned entries so lists reload cleanly on first boot
- [COLOR orange]Fix[/COLOR] metacache (meta.5.db): insert used repr() but fetch used json.loads() - format mismatch caused every item to miss the cache every time; all lists re-ran full TMDB lookups on every open (first and second load equally slow); fixed by storing with json.dumps() and adding repr/eval fallback for old entries
- [COLOR orange]Fix[/COLOR] metacache.fetch: replaced 200 individual per-item SQLite queries with 2 batch IN(...) lookups - eliminates Nxquery overhead on large lists
- [COLOR orange]Fix[/COLOR] metacache.fetch: show-level cache entry was overwriting episode-specific season/episode/title/premiered on all episodes of the same show - binge-drop releases (e.g. 8-episode drop) showed every entry as the same episode; fixed by preserving episode-specific fields across the show-cache update
- [COLOR orange]Fix[/COLOR] worker(): ThreadPoolExecutor capped at min(total, 20) threads - was spawning up to 200 simultaneous threads for large lists
- [COLOR orange]Fix[/COLOR] Documentaries -> Top 100: page uses <ol>/<li> layout instead of WordPress <article> tags - scraper now falls back to <ol> link-scan when no articles are found; also removed /top-100/ from skip_slugs (was harmless but incorrect)
- [COLOR limegreen]Add[/COLOR] "What's On" global TV calendar (TV Shows menu): Today / This Week / This Month - fetches Trakt's /calendars/all/ endpoint, deduplicates regional entries across 6 layers (title, TMDB ID, episode Trakt/TMDB ID, air-slot, S/E), sorts by air date, caches 2h, paginates 50 per page; shows your Trakt "following" marker (*) on episodes from shows you track; warm-cache page opens in ~93ms

=====================================================
Version 3.0.9.2 - "Module hotfix" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Trakt: TOCTOU race on concurrent token refresh - second process now detects cross-process rotation via fresh settings read instead of wiping credentials
- [COLOR orange]Fix[/COLOR] Trakt: missing tokens with user still configured now surfaces as auth_dead (startup dialog) instead of silent empty lists
- [COLOR orange]Fix[/COLOR] Trakt: one-time corner toast notification when Trakt is disconnected mid-session (non-blocking, suppressed during playback)
- [COLOR orange]Fix[/COLOR] Cache: empty results no longer cached - prevents stale auth failure poisoning lists for hours
- [COLOR orange]Fix[/COLOR] Settings repair: remove non-existent chainscrapers; pre-check addon existence before instantiating to suppress Kodi log spam
- [COLOR limegreen]Add[/COLOR] External scraper packs (Coco/Gears/Viper) now route HTTP through Crew client (SSL fix, cfscrape, Xbox UWP)

=====================================================
Version 3.0.9.1 - "Module hotfix" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] TV Evening zombie monitor: play gate + AV timeout recovery; regular Crew play no longer blocked by stale session
- [COLOR orange]Fix[/COLOR] Debrid: `debrid_names` matcher (TorBox/Torbox); TB cache labels during scrape; resolve pre-check + timeout backoff
- [COLOR orange]Fix[/COLOR] Smart resolve: ResolveStatus overlay only (no legacy pack progress dialog)
- [COLOR orange]Fix[/COLOR] RD cache check: skip disabled instantAvailability API (TorBox/PM/AD still checked)

=====================================================
Version 3.0.9 - "Dev only distribution" (June 2026)
=====================================================
- [COLOR lime]New[/COLOR] Knaben native torrent scraper: JSON meta-search via `api.knaben.org` - broad indexer coverage for movies and TV; lighter title matching and no scrape-time min-seeder drop (aligns with torrentio)
- [COLOR lime]New[/COLOR] Bitsearch native torrent scraper: DHT HTML search on `bitsearch.to` - supplements torrentio/Knaben with de-centralized swarm results
- [COLOR orange]Fix[/COLOR] Source loader: failed scraper imports now log traceback (was silently skipped)
- [COLOR orange]Fix[/COLOR] TV/movie search history: new terms missing until re-entering menu - `cacheToDisc=False` on history folder + refresh after save; `endDirectory` passes `cacheToDisc` as keyword (was setting `succeeded=False`, causing Kodi GetDirectory failed)
- [COLOR orange]Fix[/COLOR] Legacy internal scrapers (2ddl, scenerls, etc.): dict metadata from unified wrapper no longer hits `parse_qs` decode errors - `_parse_data()` accepts dict or query string
- [COLOR orange]Fix[/COLOR] Orion/provider cache: JSON write + legacy `repr()` read fallback - stops corrupt cache rows and noisy decode tracebacks on TV/movie scrape
- [COLOR orange]Fix[/COLOR] scenerls error reporting: correct `scraper_error()` argument order
- [COLOR orange]Fix[/COLOR] Upgrade health check: suite version follows installed module (addon.xml) - no manual constant; version mismatches across plugin/module/artwork are logged only, install integrity checks still run
- [COLOR orange]Fix[/COLOR] TV Evening no-sources: failure text routes to fullscreen overlay (not Kodi infoDialog); `ready` state no longer shows "0 sources found!"
- [COLOR orange]Fix[/COLOR] TV Evening no-sources: failed plugin play calls `setResolvedUrl(False)` so Kodi does not keep a stuck busy cursor (PC)
- [COLOR orange]Fix[/COLOR] TV Evening scrape failures: monitor detects `source_failure` immediately (no 45s wait), marks episode skipped, and recovery advances past slots that failed twice
- [COLOR orange]Fix[/COLOR] TV Evening air-date filter: robust date parsing + user dialog when 48h minimum-air-age rejects all candidates (Shield)
- [COLOR orange]Fix[/COLOR] TV Evening Stop: soft pause - playlist + resume points kept for recovery; mid-episode Stop no longer advances to next show

=====================================================
Version 3.0.7/3.0.8 - "Dev only distribution" (June 2026)
=====================================================
- [COLOR lime]New[/COLOR] Unified smart resolve: list-click, autoplay, and source dialog share one queue - full visible source list (not 40-row cap), quality/debrid-aware ordering, RD 451/429 cooldown while PM/AD/TorBox continue
- [COLOR lime]New[/COLOR] Resolve status overlay (`ResolveStatus.xml`): fanart background, live status ("Trying 1080p - Premiumize...", RD cooldown), link counter, Cancel - replaces silent resolve + easy-to-miss toast
- [COLOR orange]Fix[/COLOR] AllDebrid token diagnostics: log masked candidate sources + AD rejection codes; clear session "unusable" flag when a newly validated ResolveURL key passes `/v4/user`
- [COLOR orange]Fix[/COLOR] Next Episodes home widget after settings/debrid save: detect widget routes via `reload=` in plugin URL; transient Trakt failure shows Loading... + scheduled refresh instead of empty row and blank "The Crew" toast (string #32500 was empty in en_us)
- [COLOR orange]Fix[/COLOR] ResolveURL settings return: dialog-only route (`ResolveUrlTorrent`) now closes the plugin handle after `Addon.OpenSettings`; debounced `onSettingsChanged` (2s) stops 6x debrid cache clears + repeated widget reload busy storms
- [COLOR orange]Fix[/COLOR] Navigator dialog-only routes: `is_folder: False` + `finish_dialog_route()` on Trakt auth, person/advanced search, cache/tools, views, adult PIN gate, and related handlers - stops stuck busy cursor after cancel or dialog-only actions
- [COLOR orange]Fix[/COLOR] Debrid expiry startup toast: Crew `icon.png`, heading `[COLOR orchid]The Crew[/COLOR] - [COLOR orange]Debrid manager[/COLOR]`, single-line body - no generic Kodi INFO icon or multi-line text that skins truncate
- [COLOR lime]New[/COLOR] Settings backup: auto-copy `settings.xml` to `Kodi/thecrew_settings_backup/` (outside `addon_data`) on boot and after save - survives plugin uninstall; restored on reinstall via health check
- [COLOR lime]New[/COLOR] TV Evening session layer (`tvevening_session`): DB-backed state, play gate, resumable recovery after Kodi restart/crash, and unit tests for gate/resume logic
- [COLOR orange]Fix[/COLOR] TV Evening completion screen: stays visible the full 30s on last episode (completing gate + ordered teardown; blocks rogue plugin replay from stealing focus)
- [COLOR orange]Fix[/COLOR] TV Evening play gate: current playlist slot always allowed during gap/countdown/scrape - fixes false 45s startup skip and blocked first episode
- [COLOR orange]Fix[/COLOR] TV Evening recovery: rewind to first unwatched after false startup skip; dialog shows resume episode title; startup-timeout skips no longer mark episode skipped in DB
- [COLOR orange]Fix[/COLOR] TV Evening too-recent replacement toast deferred until after preview Play (not during pause countdown)
- [COLOR orange]Fix[/COLOR] TV Evening monitor: cross-process AV-start signal, reserve swap vs visible skip, UpNext prefetch suppressed during session, player owner guard on multi-process play
- [COLOR orange]Fix[/COLOR] My TV Evening playlist dialog: full episode row text, episode info popup on list click, readable hover contrast on bright accents
- [COLOR orange]Fix[/COLOR] Debrid services disabled in ResolveURL are respected in Crew (`debrid.status()` reads fresh `_enabled` flags - no restart needed)
- [COLOR orange]Fix[/COLOR] AllDebrid auth hint when device approval is pending - don't DENY your own test connection from a foreign CF edge IP
- [COLOR orange]Fix[/COLOR] Documentaries menu: empty/error paths call `close_directory` - no stuck busy cursor
- [COLOR orange]Fix[/COLOR] Trakt prompts suppressed for non-Trakt users after TV Evening / normal playback when Trakt is not configured
- [COLOR orange]Fix[/COLOR] Upgrade health check bumped to v3.0.7 (settings backup restore, schema repair, scraper registry migration)

=====================================================
Version 3.0.6 - "Dev only distribution" (June 2026)
=====================================================
- [COLOR lime]New[/COLOR] Dev repo 1.0.9: one GitHub Pages URL for File Manager browse and Kodi repository index (drops raw.githubusercontent Crew datadir)
- [COLOR orange]Fix[/COLOR] settings_repair: preserve original settings.xml.bak - never overwrite on repair or reboot
- [COLOR orange]Fix[/COLOR] Upgrade health check bumped to v3.0.6 with version gate and artwork install integrity detection

=====================================================
Version 3.0.5 - "Dev only distribution" (June 2026)
=====================================================
- [COLOR lime]New[/COLOR] Scraper Maintenance (Tools menu, formerly Scraper Status): parallel connectivity tests (5-10 workers), per-scraper Enable/Disable for internal Crew and external pack scrapers (Coco/Gears/Viper), and Auto Disable Blocked for bulk turn-off of non-working sources
- [COLOR lime]New[/COLOR] ScraperRegistry: SQLite-backed enable/disable with `user_disabled` column; legacy `provider.*` Kodi toggles retired from settings schema and migrated into the registry on first load
- [COLOR orange]Fix[/COLOR] Kodi 21 `failed to load addon settings`: automatic userdata repair prunes orphan setting IDs and restores missing XML headers on Kodi startup (service), on every Crew menu open, and again after you close native Settings (`onSettingsChanged`)
- [COLOR orange]Fix[/COLOR] Settings schema durable IDs: stable `id` on all separator/action/text rows (no auto-generated `labelN` orphans); removed placeholder `label1`-`label50` rows that caused native crash ~5s after opening Crew Settings on Kodi 21
- [COLOR orange]Fix[/COLOR] Retired per-scraper `provider.*` categories from `settings.xml`; external packs keep master toggles only (`cocoscrapers.enabled`, etc.)
- [COLOR orange]Fix[/COLOR] `the_crew.log` on Windows: append via native `open()` (`crew_file_write`) - `xbmcvfs.File` has no append mode and failed with `CWin32File::Write`
- [COLOR orange]Fix[/COLOR] `the_crew.log` on macOS: same class of bug as Android/Shield - Python `open()` and `xbmcvfs.File(..., 'a')` fail under Kodi sandbox; writes go through `crew_file_write` + `xbmcvfs` with fallback to profile/addon_data when `Library/Logs` is not writable; failed file writes mirror to `kodi.log`
- [COLOR orange]Fix[/COLOR] Fanart quality cache stamp moved off retired `fanart.quality.old` Kodi setting to module profile file (survives schema cleanup)
- [COLOR orange]Fix[/COLOR] Airing Today calendar: empty list no longer leaves `Cursor.busy()` spinning - `endOfDirectory` always called; grey placeholder row when nothing airs today; local calendar dates aligned with Trakt `date[N]` URLs
- [COLOR orange]Fix[/COLOR] Empty directory safety net across indexers: movies, TV shows, episodes, and progress views now call `endOfDirectory` on empty/error paths (matches 3.0.3 widget fixes)
- [COLOR orange]Fix[/COLOR] Home widgets (Trending, Next Episodes, In Progress): fast path still avoids the full TMDB worker stampede - Trending lists pull posters from SQLite metacache first, then capped TMDB fetch (6 workers) for cache misses; episode widgets now sync-fetch artwork (6 workers), reuse cached show posters for icon/thumb when episode stills are missing, and accept any-age SQLite episode cache on widgets; empty widget routes show a Loading placeholder instead of a permanently blank row
- [COLOR orange]Fix[/COLOR] Next Episodes startup 404 storm: progress indexer now honours `next_episode_cache` (batch-loaded SQLite) - known TMDB 404s skip HTTP on boot, are persisted immediately, negative cache no longer invalidates when you watch other episodes, and Trakt next-ep guesses advance past cached gaps (e.g. S01E04 missing -> S02E01)
- [COLOR orange]Fix[/COLOR] Busy cursor after saving ResolveURL/debrid settings: `onSettingsChanged` clears debrid session caches (so a new API key is picked up immediately), dismisses the busy spinner, and skips legacy Crew `alldebridtoken` when ResolveURL already has a token
- [COLOR orange]Fix[/COLOR] AllDebrid startup log spam: cloud/manager/debridcheck paths now use the same validated ResolveURL token as the pack resolver - dead `AllDebridResolver_token` values are not sent repeatedly; `AUTH_BAD_APIKEY` marks AllDebrid unusable for the session after one notice
- [COLOR lime]New[/COLOR] One-time v3.0.5 upgrade health check at Kodi startup: notifies you while it runs, repairs userdata settings.xml, verifies databases/tables/columns (metacache, cache, scraper_status, bookmarks, Trakt), migrates legacy `provider.*` toggles, and marks completion in `health_check_3.0.5.done` (retries next boot if settings still fail to load)
- [COLOR orange]Fix[/COLOR] Lists, Adult, Documentaries, season picker, and source-picker empty paths: `control.close_directory()` helper + audit (`tools/audit_directory_closure.py`) - no more stuck busy spinner when a scraper/list returns nothing
- [COLOR orange]Fix[/COLOR] Navigator account gate: failed Trakt/IMDb check now closes the directory handle instead of leaving a stuck list
- [COLOR orange]Fix[/COLOR] Trakt Manager collection: full mirror resync from Trakt (DELETE + re-insert), HTTP status validation, instant `Container.Refresh` after add/remove - fixes removed titles lingering in My Collection
- [COLOR orange]Fix[/COLOR] Trakt Manager custom lists: invalidate 720h-cached Movie/TV user-list menus after create/add/remove so new lists (e.g. via Add to new List) show up in Userlists immediately
- [COLOR orange]Fix[/COLOR] Trakt My Ratings / resume display: single-line health-check toasts; >=92% progress no longer shows resume arrow + "min remaining" on history; anticipated movies with `duration: None` no longer spam `movieDirectory`
- [COLOR orange]Fix[/COLOR] Trakt Manager watchlist: live fetch on open (no 30-day stale cache), cache invalidation on add/remove, imdb+tmdb POST IDs, and `added: 0` error when Trakt rejects the item
- [COLOR orange]Fix[/COLOR] Disney+ movies menu: TMDb discover now uses `with_watch_providers=337` + `watch_region` (streaming catalog) instead of invalid `with_networks` on movie discover - was showing unrelated studios (Lionsgate, etc.)
- [COLOR orange]Fix[/COLOR] Caching Tools (Clear All Cache, Clear Cache, Meta, Search, Sources): `is_folder: False` + `control.idle()` in `finally` - no stuck busy cursor after confirm/cancel
- [COLOR orange]Fix[/COLOR] Episode widgets (Next Episodes / In Progress): fetch episode still before poster->thumb fallback - avoids show posters masquerading as widget icons after cache clear
- [COLOR orange]Fix[/COLOR] Scraper Maintenance Usenet tab: unchecking the empty Usenet filter now restores Direct/Torrent scrapers instead of leaving the list blank
- [COLOR orange]Fix[/COLOR] Trakt pause scrobble (movies + tmdb-only titles): service player now syncs playback metadata from player.run()/window properties before pause/stop; scrobble uses tmdb when imdb is 0/missing; episode scrobble no longer fires without season/episode
- [COLOR orange]Fix[/COLOR] Trakt Lists -> This Weeks Top 10 Movies: dead private giladg list (403) no longer blanks the menu - uses Trakt `/movies/boxoffice`; dead-list replacement fallback no longer returns None and crashes sorting
- [COLOR orange]Fix[/COLOR] Trakt curated lists: paginate all pages (limit=100), preserve list rank order, and stop treating list slugs containing "collection" as your personal Trakt collection (e.g. Quentin Tarantino collection showed watchlist); dead giladg cinematography/stand-up menus fall back to TMDb discover



=====================================================
Version 3.0.4 - "Silence the noise" (June 2026)
=====================================================
- [COLOR cyan]info[/COLOR] We have been searching for a long time for a bug that caused Trakt to fail re-authentication at startup, invalidating both keys and forcing users to re-authorize. Our first assumption was always that our own code was at fault. After careful investigation and log tracking, we found the real culprit: race conditions and startup stampedes from other addons that treat themselves as the only Trakt client and leave no room for anything else. During those first 90 seconds to 2 minutes after Kodi boot, Trakt can be so saturated that even a single call may not get through. The Crew now defers background Trakt until that rush eases. If we detect addons that run immediate background Trakt sync from their startup service, a one-time neutral notice is written to kodi.log per session (no popup, no addon names in the user-visible lines). We could fight or block those addons - we chose to coexist and respect that users run more than one addon.
- [COLOR orange]Fix[/COLOR] Trakt startup stampede: Crew defers background Trakt work for 90-120s after Kodi boot (longer when other addons hit Trakt immediately at startup, or when script.trakt is installed) so competing oauth/token refresh can finish first - TraktMonitor, scrobble queue, and silent sync wait through boot quiet
- [COLOR orange]Fix[/COLOR] Trakt rate limits: 429 responses arm a shared cross-process backoff (`Retry-After` when present); oauth/token refresh no longer wipes credentials on rate limit; API calls and health checks are skipped until backoff ends
- [COLOR orange]Fix[/COLOR] Trakt token refresh: 5xx/gateway errors treated as transient (credentials preserved); cross-process refresh lock uses named window properties consistently
- [COLOR orange]Fix[/COLOR] Trakt idle/sleep: scrobble flush before device sleep now uses `force=True` so it still runs during boot quiet; wake `last_activities` reconcile respects boot quiet and rate-limit backoff
- [COLOR orange]Fix[/COLOR] Trakt `sync_last_activities`: guard against non-dict API responses so a bad payload cannot crash the sync path
- [COLOR lime]UX[/COLOR] Trakt startup conflict: one kodi.log notice per session (after boot quiet) when other installed addons run immediate background Trakt sync at startup - neutral copy at WARNING level, no popup, no addon names in the user-visible lines
- [COLOR orange]Fix[/COLOR] TV Evening XML dialogs (duration, numeric input, playlist, recovery, countdown, complete): `super().__init__`, explicit `1080i` resolution, and `thecrew` skin fallback when appearance is unset - fixes blank or missing dialogs on Shield/Android
- [COLOR orange]Fix[/COLOR] TV Evening recovery dialog: load skin from `c.get_artwork_path()` instead of a stale artwork path reference
- [COLOR orange]Fix[/COLOR] Debug logging on Android/Shield: `the_crew.log` writes via `xbmcvfs` (not plain `open()`); log rotation in the service uses `xbmcvfs` rename/delete; runtime always binds settings to `plugin.video.thecrew` so debug toggles read correctly under reuse language invoker; debug on/off and log destination are read fresh each call (were frozen at import); when set to Kodi log, lines mirror to `kodi.log`
- [COLOR lime]Perf[/COLOR] Debrid token lookup: session cache (window property + in-memory) so pack/scrape loops do not re-read ResolveURL settings on every source attempt
- [COLOR orange]Fix[/COLOR] Scraper Status dialog: respect appearance skin (`thecrew`/`modern`/`stylish`) with fallback when XML is missing; adds missing `ScraperStatus.xml` to thecrew skin and `EpisodeInfo.xml` to stylish skin
- [COLOR orange]Fix[/COLOR] Adult section: removed HD Blog Videos scraper (naughtyblog) - integration never worked reliably; menu entry and scraper code dropped
- [COLOR orange]Fix[/COLOR] TorBox cache check: use `format=object` (key present = cached), batch hashes in groups of 10 with short delay, and fall back to single-hash requests on batch timeout - fixes false "not cached" results and timeouts on large scrapes



=====================================================
Version 3.0.3 - "Signal & Resolve" (June 2026)
=====================================================
- [COLOR lime]UX[/COLOR] TV Evening playlist build: quiet progress copy with simple "X of Y" counters (no show names or service jargon) while the lineup is prepared
- [COLOR orange]Fix[/COLOR] New TV Shows list: TMDB discover uses `region` + en/US/UK/AU filters and preserves `first_air_date.desc` order (parallel fetch had scrambled results); dropped `vote_count.gte=10` so genuinely new series are not capped at ~2 pages
- [COLOR orange]Fix[/COLOR] TV Evening cancel/back: `endOfDirectory` + `idle` on exit so Kodi dismisses the busy spinner (menu item is now `is_folder: false` like other dialog-only actions)
- [COLOR orange]Fix[/COLOR] TV Evening build dialog went blank after duration selection - Kodi re-fired `onInit` after `show()` and hid the progress controls; building state is now preserved across re-init
- [COLOR orange]Fix[/COLOR] Debrid cloud browser: empty/error listings now call `endOfDirectory` before the info toast - fixes stuck busy spinner after "no magnets" (and same pattern for RD/PM/TorBox cloud)
- [COLOR orange]Fix[/COLOR] Up Next dialog: call `WindowXMLDialog.__init__` so `UpNext.xml` loads; queue dialog on window properties and dispatch from CrewMonitor service loop (`RunPlugin` is blocked during fullscreen playback)
- [COLOR orange]Fix[/COLOR] Up Next poster missing when using pre-fetched container path - fetch show poster from TMDb before opening dialog
- [COLOR orange]Fix[/COLOR] RD 451 / resolve failure: close scraper and resolving overlays plus shared progress dialog before error toast - prevents stuck "Resolving..." UI and Kodi freeze; cooperative cancel watcher + interruptible sleeps so resolve can abort between RD API calls (in-flight HTTP still waits for timeout)
- [COLOR orange]Fix[/COLOR] Debrid cache checker: restored missing `DebridCheck` class declaration so `debridcheck.DebridCheck()` resolves correctly again
- [COLOR orange]Fix[/COLOR] Source payload parsing: added defensive handling for payload types (string/list/dict) to prevent decode failures when a source object is already a dict
- [COLOR orange]Fix[/COLOR] Source selection: strengthened pack candidate ordering to prioritize cached and exact episode matches before broader pack candidates
- [COLOR orange]Fix[/COLOR] AllDebrid resolver loop: known repeated resolver failure path now marks AD unusable for the active session to prevent retry storms
- [COLOR orange]Fix[/COLOR] AllDebrid pack auth: hardened API key retrieval across ResolveURL resolver settings and legacy fallbacks, with token normalization
- [COLOR orange]Fix[/COLOR] TorBox resolver matching: normalized service-name matching (`Torbox`/`TorBox`) to prevent false "resolver not found" misses
- [COLOR orange]Fix[/COLOR] Pack resolution flow: preserved no-fallback behavior for failed pack resolution to avoid wrong-episode playback
- [COLOR orange]Fix[/COLOR] Documentaries is substantially rewritten:
  -- made documentaries scraping much more resilient
  -- improved diagnostics
  -- the hand off to YouTube playback is now correctly via the YouTube plugin
- [COLOR orange]Fix[/COLOR] Artwork: we fixed the size of the artwork, the artwork directory is now roughly ~ 40% of the previous directory. If you see the original artwork size, please clear the artwork cache in The Crew settings and restart Kodi to see the new smaller artwork size. This should reduce memory usage and speed up loading times, especially on lower-end devices.
- [COLOR orange]Fix[/COLOR] Startup Maintenance: We fixed a check that was missing from the maintenance routine where some table (columns) weren't properly checked for existence before attempting to access them, which could lead to errors on first run or after a database reset. This should improve stability and prevent crashes related to database access during startup.
- [COLOR orange]Fix[/COLOR] We fixed a bug in a shim file that was causing some (invisible) errors to appear in the logs caused by a removed file that was still being imported. This should clean up the logs and prevent confusion for users and developers when troubleshooting issues.
- [COLOR orange]Fix[/COLOR] We fixed the torbox/resolveURL overlay dialog that was doubling and essentially showing the same info as our own dialog. The resolveURL dialogs are now surpressed.
- [COLOR orange]Fix[/COLOR] Documentaries (Vimeo): Vimeo embeds no longer hit "Unknown Host" - playback is deferred to the ResolveURL Vimeo resolver (`player.vimeo.com` / `vimeo.com`); Vimeo URL detection added to the embed scan fallback
- [COLOR orange]Fix[/COLOR] Documentaries playback: YouTube/Vimeo hand off via `setResolvedUrl(True)` only (trailer.py contract) - `setResolvedUrl(False)` + `player.play` caused Kodi to retry the same item and flash YouTube open/close; warns if `plugin.video.youtube` is missing
- [COLOR orange]Fix[/COLOR] Documentaries: moved `DAILYMOTION_PLUGIN` constant out of `__del__` into `__init__` where it belongs (session cleanup in `__del__` is unchanged)
- [COLOR orange]Fix[/COLOR] Trakt activity gate: added `playback` activity type (`movies.paused_at` + `episodes.paused_at`) and `getPlaybackActivity_from_db()` for resume freshness; scrobble now bumps the local activity mirror instead of invalidating the ETag cache
- [COLOR orange]Fix[/COLOR] Device idle detection: screensaver, CEC TV standby (`System.OnSleep`), and wake events flush the scrobble queue before the box sleeps and reconcile `last_activities` on wake (`thecrew.device.sleeping` window property)
- [COLOR orange]Fix[/COLOR] TV Evening playlist: unaired and not-yet-eligible episodes could slip into the list when TMDB returned no `air_date`, and replacement episodes bypassed the min-age filter entirely
  -- air-date filtering is now centralized and also applied during validation and replacement selection
  -- episodes with missing, invalid, or future air dates are excluded (respects `tvevening.min_episode_age`, default 48h)
  -- validated episodes now carry TMDB `first_aired` into the playlist dict before the final eligibility check
- [COLOR orange]Fix[/COLOR] Kodi plugin lifecycle: removed runtime `sys.exit()` calls from sources, indexers, libtools, playcount, and debridcheck - empty directories and abort paths now return cleanly (required for `reuselanguageinvoker` and correct directory handling)
- [COLOR lime]Perf[/COLOR] Menu navigation: stopped eagerly importing `sources.py` on every plugin entry - `crew.py` now lazy-loads sources only for download actions (playback already used lazy routing)
- [COLOR lime]Perf[/COLOR] Devmode profiling: added `@timed` / `[Perf]` logging for plugin entry, router, module imports, and handler calls - enter dev password in settings, reproduce slow clicks, read `the_crew.log`



=====================================================
Version 3.0.2 - "Under the Hood" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] Next Episodes widget: missing endOfDirectory call when the list was empty caused Kodi to log "Error getting plugin://..." and leave the widget permanently broken until restart; now always closes the directory handle cleanly
- [COLOR orange]Fix[/COLOR] Next Episodes widget: suppressed "No results found" toast when running in widget context - dialogs are not appropriate there
- [COLOR orange]Fix[/COLOR] Empty info dialog ("The Crew", no message): lang() was bound at module import time to whatever addon happened to be active; if script.module.thecrew was the active context (no strings.po) every string lookup returned "" - now always explicitly bound to plugin.video.thecrew
- [COLOR lime]UX[/COLOR] My TV Evening: replaced the "Trakt required" error dialog with a setup prompt - users without a Trakt account can now authenticate directly via QR code and continue straight into TV Evening without a second click
- [COLOR orange]Fix[/COLOR] "Trakt Authorization Required" dialog appearing for users without a Trakt account when stopping an episode: scrobble functions (scrobbleMovie, scrobbleEpisode, process_scrobble_queue) had no credentials check and always attempted an API call, receiving a 401 which triggered the re-auth dialog; all three now bail out immediately if no Trakt credentials are configured - same fix applied to the playback progress tracker (markEpisodeDuringPlayback)
- [COLOR orange]Fix[/COLOR] TV Evening playlist dialog: episode badge (S01E01) truncated to "S01E..." - label width was 100px, too narrow for font12 at 1080i; increased to 200px in both skins
- [COLOR orange]Fix[/COLOR] TV Evening playlist dialog: focused row background was transparent lavender (66E0B0FF) which rendered as bright pink/magenta on most TVs, making white text unreadable; replaced with dark indigo-purple at 80% opacity
- [COLOR orange]Fix[/COLOR] TV Evening playlist dialog: clicking an episode item showed no info popup for users on the Modern skin - EpisodeInfo.xml was missing from that skin entirely, causing a silent exception; file added to Modern skin
- [COLOR orange]Fix[/COLOR] Documentaries browser: topdocumentaryfilms.com listings were broken because the site is now heavily polluted with gambling/casino spam articles; the old link-based scraper could not reliably filter them out; rewritten to scrape WordPress &lt;article&gt; post cards directly, which are only present for real posts - nav, sidebar and footer noise is automatically excluded
- [COLOR orange]Fix[/COLOR] TV Evening playlist: episodes could run 50%+ over the user's chosen duration because the validation pass selects with a 45-minute buffer but no trim-back step existed; playlist is now trimmed to the target duration (+/- 15 min tolerance) after validation completes
- [COLOR orange]Fix[/COLOR] Season boundary cache: two startup crashes prevented the cache from ever populating - a wrong module import (crewruntime module instead of the c instance) and a dead import of a non-existent tmdbscraper module; both removed
- [COLOR orange]Fix[/COLOR] Cache layer: five functions (get_image, get_episode_details, get_season_artwork, get_show_artwork, get_diverse_backdrop_pool) called _get_connection_cursor() directly and received the context manager object instead of a cursor, causing "_GeneratorContextManager has no attribute execute" errors on every call
- [COLOR orange]Fix[/COLOR] Debrid enabled/disabled state ignored until Kodi restart: ResolveURL resolver list and enabled flags were read once at module import time and frozen for the entire session; disabling or enabling a debrid service in ResolveURL had no effect until Kodi restarted - sources were still tagged for disabled services and disabled services were still used for resolution
  -- three locations fixed: sourcesFilter() now builds the resolver list fresh on each scrape, debrid.status() now reads settings directly, and resolver() falls back to a live lookup instead of crashing when a service wasn't in the cached list
- [COLOR red][B]IMPORTANT[/B][/COLOR] Kodi 19 (Matrix) and below are no longer supported. The minimum required version is now Kodi 20 (Nexus). Users on Kodi 19 or older will not receive this update or any future updates. If you are still running Kodi 19, it is time to update


=====================================================
Version 3.0.1 - "The Sorting Hat" (June 2026)
=====================================================
- [COLOR orange]Fix[/COLOR] AllDebrid pack resolver: replaced deprecated magnet/instant (404) with magnet/upload which returns ready=True for cached content, eliminating the broken pre-check and redundant magnet/status round-trip
- [COLOR orange]Fix[/COLOR] AllDebrid pack resolver: auth was using Authorization: Bearer header. AD API requires ?apikey= query param; resolver now reads token directly from ResolveURL settings
- [COLOR orange]Fix[/COLOR] Premiumize pack resolver: replaced transfer/create (rate-limited, creates queue entries) with transfer/directdl for cached content resolution
- [COLOR orange]Fix[/COLOR] Trakt token expiry loop: cross-process race condition between plugin and TraktMonitor service caused both processes to use the same refresh token simultaneously; the second process received a 401 and wiped valid credentials
  -- fixed with cross-process window property guard and pre-wipe token rotation
- [COLOR orange]Fix[/COLOR] debridcheck thread blocking: thread.join() with no timeout could block indefinitely after the 20s progress dialog; added 35s timeout
- [COLOR orange]Fix[/COLOR] debridcheck AllDebrid hash tracking: hashes absent from the API response (not cached) were never written to the local DB, causing repeated API lookups on every scrape
  -- now all input hashes are recorded as True or False
- [COLOR orange]Fix[/COLOR] Up Next auto-play setting: default value changed from True to False
- [COLOR orange]Fix[/COLOR] YourBitTorrent scraper: HTTP requests had no timeout, causing the scraper to block the full 30s on unresponsive servers; added per-request timeouts (10s search, 8s detail), capped concurrent threads at 15, and fixed domain discovery check that never matched
- [COLOR orange]Fix[/COLOR] In Progress Shows: fully-watched returning series were not filtered out because the watched >= aired check was restricted to ended/canceled shows; now any show where watched episodes >= aired episodes is removed regardless of status (will reappear automatically when new episodes air)
- [COLOR orange]Fix[/COLOR] EasyNews scraper: sources were silently discarded because the source dict was missing the required 'debrid' key; sourcesResolve() uses a hard key access (not .get()) so the missing key caused a KeyError that was swallowed on every result
  -- also changed source label from generic 'direct' to 'easynews' for correct attribution in the sources list
- [COLOR orange]Fix[/COLOR] Trakt "session expired" dialog shown to users with no Trakt account: syncTrakt() was called unconditionally at every Kodi startup; it hit a 401 (no token) and triggered the re-auth dialog even for sports-only users who never configured Trakt
  -- added credentials guard at the top of syncTrakt() so users with empty Trakt settings skip the sync entirely
- [COLOR orange]Fix[/COLOR] Orion settings menu: all options silently did nothing because script.module.orion/lib was not on sys.path, causing import orion to fail silently; fixed with explicit path injection via xbmcvfs.translatePath
  -- added try/except around Orion() constructor calls to prevent a RuntimeError (addon not in Kodi DB) from crashing the entire Crew module import
- [COLOR orange]Fix[/COLOR] Movies collection and watchlist sort order: both lists were sorted by year (ascending/descending respectively); now sorted alphabetically by title (articles like "The" and "A" ignored)
- [COLOR orange]Fix[/COLOR] TV shows watchlist sort order: list had no explicit sort and relied on Trakt's default return order; now sorted alphabetically by title
- [COLOR orange]Fix[/COLOR] Adult section (HD & UHD Videos - WH): videos were always playing in SD (480p) because the resolver picked the first quality in the list, which is the lowest; qualities are now sorted descending by resolution so the highest available quality (1080p, 4K) is selected

=====================================================
Version 3.0.0 (June 2026)
=====================================================
- [COLOR green]Info[/COLOR] Initial release version 3.0.0
