<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.autowidget" name="AutoWidget" version="CURRENT_VERSION" provider-name="drinfernoo">
    <requires>
        <import addon="script.module.pil" />
        <import addon="script.module.six" />
    </requires>
    
    <extension point="xbmc.python.pluginsource" library="main.py">
        <provides>executable video music</provides>
    </extension>
    
    <extension point="xbmc.service" library="service.py" />
    
    <extension point="kodi.context.item">
        <menu id="kodi.core.main">
            <item library="context_add.py">
                <label>$ADDON[plugin.program.autowidget 30003]</label>
                <visible>String.IsEqual(Window(10000).Property(context.autowidget),true)</visible>
            </item>
            <item library="context_refresh.py">
                <label>$ADDON[plugin.program.autowidget 30006]</label>
                <visible>String.Contains(ListItem.FolderPath, plugin://plugin.program.autowidget)</visible>
            </item>
			<item library="context_refresh_single.py">
                <label>$ADDON[plugin.program.autowidget 30046]</label>
                <visible>!String.IsEmpty(ListItem.Property(autoID)) + [!String.IsEqual(ListItem.Property(autoAction),static) + !String.IsEqual(ListItem.Property(autoAction),merged)]</visible>
            </item>
			<item library="clear_cache_single.py">
                <label>$ADDON[plugin.program.autowidget 30116]</label>
                <visible>!String.IsEmpty(ListItem.Property(autoCache))</visible>
            </item>
        </menu>
    </extension>
    
    <extension point="xbmc.addon.metadata">
        <reuselanguageinvoker>true</reuselanguageinvoker>
        <summary lang="en_GB">Automatically changes out widgets</summary>
        <description lang="en_GB">Automatically changes out widgets on the homescreen for a more interesting browsing experience.</description>
	<summary lang="es_ES">Cambia los widgets automáticamente</summary>
	<description lang="es_ES">Cambia los widgets en la pantalla de inicio automáticamente para una experiencia de navegación más interesante.</description>
	<platform>all</platform>
        <license>LGPL-3.0</license>
        <website>https://www.github.com/drinfernoo/</website>
        <source>https://www.github.com/drinfernoo/plugin.program.autowidget/</source>
        <news>
3.5.1
 - Fix sorting bug with higher group counts
3.5.0
 - Allow bulk operations in some groups
 - More informative dialogs
 - Allow manually sorting groups in "My Groups"
 - Fixes for direct shortcuts
 - Update "version" attribute in metafiles when updating
3.4.2
 - Some fixes for constant notification
3.4.1
 - Fix clearing cache from settings
3.4.0
 - Rework caching mechanism
 - Add more notifications of progress
 - Add placeholder items when no content is loaded
3.3.7
 - Delay widget updates during library scans or when in media views
 - Fix widget cleaning scan for skins which don't use Skin Shortcuts
 - Fix refreshing widgets created before 3.3.0
 - Add more content type choices in editor dialog
3.3.6
 - Fix "Next Page" for Python 2.7
3.3.5
 - Better handling of error and empty states
 - Better handling of "Next Page" items
 - Fix "Active Widgets" menu
 - Delay library updates when inside media views
3.3.4
 - Fix "Next Page" localizations
3.3.3
 - Fix "Clear Cache"
3.3.2
 - Fix bug when paths return no items
3.3.1
 - Fix bug when Skin Shortcuts is not installed
 - More improvements to page item handling
3.3.0
 - Add "Copy Group" in group context menu
 - Add "Create New ... Group" in "My Groups" menu
 - Add "Clear Cache" in "Tools" menu
 - Add "Refresh Widget" to widget context menu
 - Add "Clear Cache" to widget context menu
 - Add rudimentary error item for failed widgets
 - Add "Icon Packs" for library widgets from genres, studios, and countries
 - Remove dependency on Kodi Six
 - Allow editing content type
 - Allow Cycling Widgets to pull from a subset of paths
 - Support cast thumbnails for Kodi N
 - Fix translatePath reference again
 - Faster and more robust item creation
 - Make `.widget` files much simpler
 - Better support for library paths
 - Better support for music
3.2.3
 - Add English (US) and Portugese localizations
3.2.2
 - Add more localizations
 - Better "Next Page" detection
 - Support for "Next Page" items in other languages
3.2.1
 - Fix for items with no artwork
3.2.0
 - Add setting to prefer episodes/shows when removing duplicates
 - Rework duplicate removal
 - Fix bug in Active Widgets editor dialog
 - Fix landscape art for some items
 - Fix paged widgets not resetting on boot
 - Format with black
3.1.9
 - Fix error with translatePath
3.1.8
 - Fix resume progress on items
3.1.7
 - Fix widget cleaning
 - Fix Active Widgets menu
3.1.6
 - Fix detection of JSON-RPC version
3.1.5
 - Fix editor dialog
3.1.4
 - Fix settings shortcuts
 - Fix some Unicode errors
 - Fix some dialog labels in editor
3.1.3
 - Fix hashing in Matrix
3.1.2
 - Fix "Clear Cache"
3.1.1
 - Fixes for cache mechanism
 - Add "Force Refresh Widgets" to context menu for AutoWidget items
3.1.0
 - Improved background caching for paths that change frequently
 - Fix unneeded refreshes
 - Fix caching on merged widgets
 - Fix more Unicode errors
3.0.2
 - Fix bug in background caching
3.0.1
 - Fix bug when adding paths
3.0.0
 - Huge speed improvements thanks to @djay's background caching implementation
 - Fix merged widget duplicate removal
2.3.7
 - Unicode fixes
 - Fix method calls
 - Fix separator in menus
 - Fix logging in Kodi 19
 - Update Spanish translation
2.3.6
 - Fix separator in shortcut groups
2.3.5
 - Fix various shortcut- and refresh-related bugs
 - Fix error when path contained no items
 - Add more debug logging
 - Add widget ID as ListItem property (autoID)
 - Reduce library updates (again)
2.3.4
 - Fix logging error
2.3.3
 - Fix shortcuts to Android apps
2.3.2
 - Fix error in debug logging logic
2.3.1
 - Fix editing and adding new groups
 - Overall cleanup
 - Trim as many library updates as possible
2.3.0
 - Huge simplification of plugin paths
 - Speed improvements
 - Better detection for "Next Page" items in various add-ons
 - Add dedicated debug log
 - Allow 'path' to be editing for static widgets
2.2.0
 - Reduce library updates to improve overall speed
 - Sort "Active Widgets" by most recently refreshed
 - Fix any straggling widget errors, I hope :D
2.1.6
 - Fix "Next Page" error
2.1.5
 - Fix non-merged paths :D
2.1.4
 - Support more add-ons' "Next Page" items
 - Fix merged paths
2.1.3
- Fixes for Unicode characters in path labels
- Fix for viewing groups in Kodi 17.x
- Change "Icon Color" to a per-path basis
2.1.2
 - Add per-widget icon color
2.1.1
 - Fix "Icon Color"
2.1.0
 - New artwork for add-on
 - Add icon coloring
 - Improved "Active Widgets" menu
 - Added "Clean Old Widget Files" shortcut in Tools
 - Fix shortcut paths
 - Fix missing InfoLabels
2.0.2
 - Make artwork for groups and paths more consistent
2.0.1
 - Add "Toggle Skin Debugging" shortcut
2.0.0
 - Rewrite most of add-on functions
 - Add "Static Path" option
 - Add "Merged Path" option
 - Add "Paged Widgets"
 - Revamp editor dialog
 - More complete skin compatibility
 - More miscellaneous fixes
1.6.8
 - Add setting for notification sound
1.6.7
 - Fix crash when window cannot be detected. Notably fixes Disney+ support.
1.6.6
 - Fix extract location
1.6.5
 - Add backup/restore features
1.6.4
 - Fix more rogue refreshes
 - Fix wording in Spanish translation (again, thanks to @roliverosc)
1.6.3
 - Update settings localizations
1.6.2
 - Fix bug that caused Skin Shortcuts to not be able to rebuild the skin
1.6.1
 - Fix bug with shortcut widgets being "converted"
1.6.0
 - Android App shortcut support (thanks to @Sandmann79)
 - Add Spanish translation (thanks to @roliverosc)
 - Fix bug with empty action nodes
 - Reduce refreshes
 - Prettify .props file output
1.5.5
 - Fix regex for labels in some skins
1.5.4
 - Fix recursion crash during refresh
1.5.3
 - Fix indent error
1.5.2
 - Fix shortcut calls for YouTube
1.5.1
 - Fix error in editor dialog
 - Fix changelog
1.5.0
 - Add "Active Widgets" menu
 - Consistency fixes during initialization and refresh
 - Allow adding playable items as shortcuts
 - Fix crashes in Krypton
 - Fix crashes from invalid group/widget files
 - Fix Unicode compatibility
1.4.5
 - Refresh Shortcut widgets Automatically
 - Add "Next Path" widget action
 - Add "Clone" and "Explode" widget modes
 - Allow refreshing between 15m-2h, at 15m intervals
1.4.3
 - Add context menu on more items
 - Fix some log spam
 - Catch more errors from invalid files
 - Fix "Settings" shortcuts
 - Gracefully handle remote artwork
 - Use special paths for artwork
1.4.2
 - Fix bug in conversion
1.4.1
 - Fix bug in migration
1.4.0
 - Add "Clean Old References" shortcuts
 - Change main menu layout
1.3.9
 - Fix label bug in Embuary (and maybe elsewhere)
1.3.8
 - Add "Wipe Add-on Data" shortcuts
 - Allow Unicode characters in labels
1.3.7
 - Fix typo in path handling
1.3.6
 - Fix error handling
1.3.5
 - Add extra error checking for file operations
1.3.4
 - Add proper migration from old JSON to current
1.3.3
 - Rewrite editor dialog
 - Fix path conversion for skin string paths
1.3.2
 - Fixes and cleanup in editor dialog
1.3.1
 - Cleanup skin string conversion
1.3.0
 - Add group editing dialog
 - Non-Skin Shortcuts skin support
 - Fix issues with groups and paths with the same name
 - Fix settings shortcuts
 - Add rudimentary JSON migration
1.2.5
 - Update some skin localizations
 - Add more widget artwork
 - Update documentation
1.2.3
 - Fix paths made from add-on browser
 - Add ability to set plot
1.2.2
 - Fix group dialog calls
1.2.1
 - Fix imports
1.2.0
 - Better handling of art
 - Better add-on art added
 - Redesigned path addition dialog
 - Settings shortcuts added
1.1.2
 - Add art editing for paths
 - Add group renaming
1.1.1
 - Add setting to disable notification
1.1.0
 - Remove Skin Shortcuts dependency
 - Expand context menu options
 - Add support for skins with "basic" Skin Shortcuts integration
 - Add setting to pause AutoWidget's service
1.0.7
 - Fix context menu option not showing
1.0.6
 - Fix paths not saving
1.0.5
 - Raise required Skin Shortcuts version to  1.0.19
1.0.4
 - Allow custom labels
 - Add removal notifications    
1.0.3
 - Fix shortcuts and widgets added from context menu
1.0.2
 - Fix crash from non-XML files
1.0.1
 - Fix crash from non-existent context menu setting
1.0.0
 - First stable release
        </news>
        <assets>
            <icon>resources/media/icon.png</icon>
            <fanart>resources/media/fanart.png</fanart>
            <poster>resources/media/poster.png</poster>
            <banner>resources/media/banner.png</banner>
            <clearlogo>resources/media/clearlogo.png</clearlogo>
        </assets>
    </extension>
</addon>
