<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.skin.info.service"
	   name="Skin Info Service"
	   version="2.0.0~beta23"
	   provider-name="MikeSiLVO">
	<requires>
		<import addon="xbmc.python" version="3.0.1" />
		<import addon="xbmc.json" version="12.0.0" />
		<import addon="script.module.pil" version="1.1.7" />
		<import addon="script.module.requests" version="2.31.0" />
	</requires>
	<extension point="xbmc.python.pluginsource" library="plugin.py">
		<provides>video</provides>
	</extension>
	<extension point="xbmc.python.library" library="script.py" />
	<extension point="kodi.context.item">
		<menu id="kodi.core.main">
			<item library="context.py">
				<label>$ADDON[script.skin.info.service 32102]</label>
				<visible>!String.IsEmpty(ListItem.DBID) + [String.IsEqual(ListItem.DBType,movie) | String.IsEqual(ListItem.DBType,tvshow) | String.IsEqual(ListItem.DBType,season) | String.IsEqual(ListItem.DBType,episode) | String.IsEqual(ListItem.DBType,musicvideo) | String.IsEqual(ListItem.DBType,set) | String.IsEqual(ListItem.DBType,artist) | String.IsEqual(ListItem.DBType,album) | String.IsEqual(ListItem.DBType,song)]</visible>
			</item>
		</menu>
	</extension>
	<extension point="xbmc.addon.metadata">
		<summary lang="en_GB">Provides rich media info and artwork to skins.</summary>
		<description lang="en_GB">Skin Info Service provides additional properties such as ratings, artwork, and stream details for movies, sets, artists, and albums. Includes a gif poster scanner tool to automatically find and add animated gif posters to your library.
		</description>
		<platform>all</platform>
		<license>GPL-3.0-only</license>
		<source>https://github.com/MikeSiLVO/script.skin.info.service</source>
		<assets>
			<icon>icon.png</icon>
			<fanart>fanart.jpg</fanart>
		</assets>
		<news>
2.0.0~beta23
- Fix stale music video online data when navigating between items
- Fix cache not updating after editing metadata
- Updated path stats documentation

2.0.0~beta22
- DBID rollcall: detect and clean up stale/reused library IDs across all cached data
- Fix stale Tomatometer/Popcornmeter persisting when navigating between items
- Fix stale next episode data for TV shows with past air dates
- Fix stinger notification timing on chaptered files
- Correct next/last episode data when TMDB base response is stale
- Database version bump

2.0.0~beta21
- Fix slow Kodi shutdown caused by updater thread blocking on xbmc.sleep
- Trakt API falls back to TMDB ID when IMDB unavailable

2.0.0~beta20
- Continuous TV show updater replaces one-shot warmup
- Smart TTL tiers for TV shows based on episode schedule and completeness
- Stale next-episode detection invalidates outdated cache entries
- Texture cache reports failed artwork URLs for stale library entries
- JSON-RPC invalid params errors downgraded to debug logging

2.0.0~beta19
- Kodi version detection for adaptive JSON-RPC queries
- Blur skips Kodi virtual icons (DefaultShortcut.png, etc.)
- Widget handlers return empty directory instead of error on missing metadata

2.0.0~beta18
- Smarter caching, the manual "cache days" setting has been removed
- TV show warmup for active/returning shows
- Cross-provider ID mapping table for faster IMDB/TMDB/TVDB lookups
- New properties: TVShow.TotalRuntime, Season.TotalRuntime (with .Hours/.Minutes)
- Removed 14 orphaned language strings

2.0.0~beta17
- Cache invalidation: online and music caches refresh when library items are edited
- Trakt season prefetching: batch episode rating updates use one API call per season
- Wikipedia validation: filters out non-music results (films, games, novels)
- IMDb auto-update: persists check schedule across restarts, shows progress bar
- IMDb auto-update: always shows completion notification
- Fixed musicvideo online cache treating all tracks by same artist as identical
- Removed AudioDB CDN URL rewriting (unnecessary, rescrape if images need new URL's)

2.0.0~beta16
- Music video online properties: track wiki, tags, album wiki from Last.fm, Wikipedia, AudioDB
- Wikipedia API: track and album summaries as fallback source (Last.fm → Wikipedia → AudioDB)
- New player online prefixes: SkinInfo.Player.Online.MusicVideo.*
- Artist online properties use Artist.* grouping (Artist.Bio, Artist.Clearlogo, etc.)
- Music video focus: online track/album properties (SkinInfo.MusicVideo.Online.Track/Album.*)
- Music metadata cache: Wikipedia source with language support

2.0.0~beta15
- IMDb Top 250: update movie rankings from Trakt's official daily-updated list (Tools menu)
- Incremental IMDb sync now picks up new library items (not just changed ratings)
- Service skin toggle: Skin.SetBool(SkinInfo.Service) controls start/stop
- Duplicate RunScript ignored when service already running
- SkinInfo.Service.Running window property for skin visibility conditions
- Post-scan uses incremental sync instead of full update when items already synced
- Abort handling throughout rating update pipeline for cleaner Kodi shutdown

2.0.0~beta14
- Music player library properties (artist bio, fanart, album discography)
- Music player online properties (TheAudioDB bio, rotating fanart slideshow)
- On-demand artist artwork fetching during playback (Fanart.tv/TheAudioDB)
- Support for library, local files, and radio addon streams
- Artist/album artwork download path building
- Multi-art dialog crash fix on add/remove while editing focused list
- Rating executor timeout handling improvements

2.0.0~beta13
- Music artwork: fetch artist and album artwork from Fanart.tv and TheAudioDB
- Extended album art types: discart, back, spine, 3dcase, 3dflat, 3dface, 3dthumb
- Stale MusicBrainz ID resolution via TheAudioDB name search with permanent cache
- Context menu now available for artist, album, and song items
- Artwork scanner support for music artists and albums
- Metadata editor support for music artists, albums, and songs
- Artwork selection dialog layout categories for skin-side layout control
- Reworked settings layout for API key management
- Fixed bypass_cache not forwarded to music artwork fetch methods
- Fixed settings dependency operator (isnot → !is)
- Fixed smart quote encoding in TheAudioDB search
- Database init for standalone script entry points (service not required)

2.0.0~beta12
- Smart TTL caching: cache duration now based on content status and age
- Batched JSON-RPC calls for ratings updates (reduces Kodi load)
- Improved abort handling during background updates (responds to Kodi shutdown)
- Backdrop images now sorted by language preference
- Landscape art type now prioritizes Fanart.tv source
- Database v2: cache cleared on upgrade (regenerates automatically)
- Added abort checks to menu loops for cleaner Kodi shutdown
- Fixed online service cache key consistency
- Fixed TMDB rating written as both "tmdb" and "themoviedb" for skin compatibility
- Fixed container_move skipping unnecessary jumps when already at target position

2.0.0~beta11
- Added actor image download to Download Artwork context menu (movies and TV shows)
- New setting: Include TV Episode Guest Stars (default off)
- New setting: Include Episode Thumbnails (default off)
- Auto-download after Manage Artwork now always overwrites existing files
- Fixed episode Download Artwork including parent show/season artwork
- Simplified IMDb dataset progress messages
- Fixed hardcoded strings to use localized versions
- Removed unused localization strings

2.0.0~beta10
- Updated Fanart.tv API to v3.2 with built-in project key
- Moved Fanart.tv personal key to Advanced settings (matches TMDB pattern)
- API keys now save immediately without requiring dialog confirmation
- Added progress dialog to Download Artwork context menu action
- Requires Kodi 21+ (xbmc.python 3.0.1)

2.0.0~beta9
- Fixed episode artwork download failing due to duplicate JSON-RPC property

2.0.0~beta8
- Added Download Artwork context menu action for single items
- TV show download now includes all seasons and episodes
- Fixed season artwork path building
- Fixed bulk download not including episodes in tvshows scope
- Fixed inherited artwork prefixes (tvshow.*, season.*) being downloaded
- Fixed online service cache causing property flicker
- Fixed slideshow timing bug (sqlite3.Row compatibility)
- Fixed blur retry logging and stinger exception logging
- Fixed Python 3.8 compatibility issues
- Fixed editor save when value unchanged
- Fixed artwork auto download property fetching
- Various service and artwork scanner cleanups

2.0.0~beta7
- Fixed metadata editor for TV shows (removed invalid 'status' field)
- Fixed artwork downloader downloading tvshow/season art for each episode
- Fixed season artwork not being downloaded (now included with tvshow downloads)
- Fixed artwork paths for tvshows/seasons without trailing slash
- Fixed metadata editor Cancel button looping instead of closing

2.0.0~beta6
- Added online metadata language setting for TMDb localization
- Reworked settings with Language category (metadata + artwork)
- Added auto-download option after Manage Artwork selection
- Fixed metadata editor year field (now updates premiered date)
- Fixed metadata editor menu refresh after field edits
- Replaced some addon strings with Kodi strings
- Removed duplicate and unused strings from strings.po
- Added translator comments to ambiguous strings
- Fixed blur failing on images with alpha channel (LA/PA modes)

2.0.0~beta5
- Changed addon type to plugin for visibility in My Add-ons
- Added plugin root menu with Tools, Search, and Widgets
- Added seasonal submenu with all season options
- Added setContent for proper content type in widgets
- Added mpaa/studio infolabels to next_up widget
- Added TotalSeasons property to tvshow widgets
- Fixed halloween tag 'witch' to 'witchcraft' to avoid false positives
- Added halloween tags: slasher, haunted, ghost, supernatural, demon, demonic possession, gore, occult

2.0.0~beta4
- Added incremental ratings sync for faster auto-updates
- Added TV show context menu now updates all episodes
- Added art types settings as individual toggles

2.0.0~beta3
- Added stinger (mid/post-credits scene) notifications
- Added custom stinger icon
- Added skin override support for stinger messages and display
- Added stinger documentation

2.0.0~beta2
- Fixed property prefix duplication issue
- Documentation fixes

2.0.0~beta1
- Complete rewrite
- Added online properties from TMDb, OMDb, MDBList, Trakt
- Added multi-source ratings (IMDb, RT, Metacritic, TMDb, Trakt, etc.)
- Added plugin paths for widgets, cast, person info, stats
- Added artwork review tool
- Added metadata editor
- Added blur, color picker, slideshow tools
- Added GIF scanner
- Added context menu integration
		</news>
	</extension>
</addon>