<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
	<category label="30014"><!-- Connection -->
		<setting id="plex_servername" label="39067" type="text" default="" enable="false" /><!-- Your current PMS server: -->
		<setting id="ipaddress" label="39069" type="text" default="" enable="false" /><!-- Current address: -->
		<setting id="port" label="39070" type="text" default="" enable="false" /><!-- Current port: -->
        <setting id="pms_websocket_status" label="39072" type="text" default="" enable="false" /><!-- Background sync connection: -->
		<setting type="sep" text=""/>
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39050][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=chooseServer)" option="close" /><!-- Choose Plex Server from a list -->
		<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39068][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=enterPMS)" option="close" /><!-- Manually enter Plex Media Server IP -->
		<setting type="sep" text=""/>
        <setting id="plex_serverowned" label="30031" type="bool" default="true" /><!-- I own this PMS -->
		<setting id="https" label="30243" type="bool" default="false" />
        <setting id="sslcert" subsetting="true" label="30501" type="file" default="None" visible="eq(-1,true)" />
		<setting id="sslverify" label="30500" type="bool" default="false" visible="String.StartsWith(System.BuildVersion,17.)" /><!-- Verify SSL Certificate (more secure) - Only visible for Kodi 17 Krypton eq(-1,true) +  -->
		<setting id="show_pms_offline" label="30025" type="bool" default="true" /><!-- Display message if PMS goes offline -->

		<setting type="sep" text=""/>

		<setting id="enforceUserLogin" label="30536" type="bool" default="false" />
		<setting id="accessToken" type="text" visible="false" default="" />
	</category>

	<category label="Plex">
		<setting type="lsep" label="plex.tv"/>
		<setting id="plex_status" label="39071" type="text" default="Not logged in to plex.tv" enable="false" /><!-- Current plex.tv status: -->
		<setting id="plexLogin" label="39228" type="text" default="" enable="false" /><!-- Plex admin user -->
        <setting id="username" label="39230" type="text" default="" enable="false" /><!-- Logged in Plex home user -->
		<setting id="myplexlogin" label="39025" type="bool" default="true" /> <!-- Log into plex.tv on startup -->
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39231][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=switchuser)" option="close" /><!-- Change logged in Plex home user -->
		<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39209][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=togglePlexTV)" option="close" /><!-- Toggle plex.tv login (sign in or sign out) -->
		<setting id="plexToken" label="plexToken" type="text" default="" visible="false" />
        <setting type="sep" text=""/>
		<setting type="lsep" label="39008" />
		<setting id="plexCompanion" label="39004" type="bool" default="true" />
		<setting id="deviceName" label="30016" type="text" visible="eq(-1,true)" default="" subsetting="true" />
		<setting id="companionPort" label="39005" type="number" default="3005" option="int" visible="eq(-2,true)" subsetting="true" />
		<setting id="companionUpdatePort" label="39078" type="number" default="32412" option="int" visible="eq(-3,true)" subsetting="true" />
		<setting type="sep" text=""/>
        <setting type="lsep" label="39700" />
		<setting id="enable_alexa" label="39701" type="bool" default="true"/>
        <setting id="alexa_websocket_status" label="39089" type="text" default="" enable="false" /><!-- Alexa connection status: -->
        <!-- Different settings that are not visible - to avoid warnings in the log -->
		<setting id="plex_restricteduser" type="bool" default="false" visible="false"/>
		<setting id="plex_allows_mediaDeletion" type="bool" default="true" visible="false"/>
		<setting id="companion_show_gdm_port_warning" type="bool" default="true" visible="false"/>
        <setting id="InstallQuestionsAnswered" type="bool" default="false" visible="false"/>
        <setting id="SyncInstallRunDone" type="bool" default="false" visible="false"/>
        <setting id="last_migrated_PKC_version" type="text" default="" visible="false"/>
        <setting id="plexAvatar" type="text" default="" visible="false"/>
        <setting id="plex_client_Id" type="text" default="" visible="false"/>
        <setting id="plex_machineIdentifier" type="text" default="" visible="false"/>
        <setting id="dbCreatedWithVersion" type="text" default="" visible="false"/>
        <setting id="plexid" type="text" default="" visible="false"/>
        <setting id="userid" type="text" default="" visible="false"/>
        <setting id="sections_asked_for_machine_identifier" type="text" default="" visible="false"/>
	</category>

	<category label="30506"><!-- Sync Options -->
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 30524][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=select-libraries)" option="close" help="Choose which Plex library you want to sync"/><!-- Select Plex libraries to sync -->
		<setting type="lsep" label="30537" /><!-- Restart if you make changes -->
		<setting type="sep" />
        <setting id="fullSyncInterval" type="number" label="39053" default="60" option="int" />
        <setting id="dbSyncScreensaver" type="bool" label="39062" default="false" /><!--Sync when screensaver is deactivated-->
        <setting id="dbSyncIndicator" label="30507" type="bool" default="true" /><!-- show syncing progress -->
        <setting id="playstate_sync_indicator" label="30523" type="bool" default="false" visible="eq(-1,true)" subsetting="true"/><!-- Also show sync progress for playstate and user data -->
        <setting id="syncThreadNumber" type="slider" label="39003" default="10" option="int" range="1,1,30"/><!-- Number of simultaneous download threads -->
        <setting id="limitindex" type="slider" label="30515" default="200" option="int" range="50,50,1000"/><!-- Maximum items to request from the server at once -->
        <setting type="lsep" label="$LOCALIZE[136]" /><!-- Playlists -->
        <setting type="sep" />
        <setting id="enablePlaylistSync" type="bool" label="30020" default="true" visible="true"/><!-- Sync Plex playlists -->
        <setting id="syncSpecificKodiPlaylists" type="bool" label="30023" default="false" visible="eq(-1,true)" /><!-- Only sync specific Kodi playlists to Plex -->
        <setting id="syncSpecificKodiPlaylistsPrefix" type="text" label="30027" default="sync_" visible="eq(-1,true) + eq(-2,true)"/><!-- Prefix in Kodi playlist name to trigger sync -->
        <setting id="syncSpecificPlexPlaylists" type="bool" label="30021" default="false" visible="eq(-3,true)"/><!-- Only sync specific Plex playlists to Kodi -->
        <setting id="syncSpecificPlexPlaylistsPrefix" type="text" label="30026" default="sync_" visible="eq(-1,true) + eq(-4,true)" /><!-- Prefix in Plex playlist name to trigger sync -->
        <setting type="sep" />
        <setting type="lsep" label="39052" /><!-- Background Sync -->
        <setting id="enableBackgroundSync" type="bool" label="39026" default="true" visible="true"/>
        <setting id="backgroundsync_saftyMargin" type="slider" label="39051" default="5" option="int" range="5,1,300" visible="eq(-1,true)" subsetting="true" />
        <setting type="sep" />
        <setting type="lsep" label="30538" /><!-- Manual complete reset of Kodi database necessary, see "Advanced" -->
        <setting id="showExtrasInsteadOfTrailer" type="bool" label="30514" default="false" /><!-- Show all Plex extras instead of immediately playing trailers -->
        <setting id="indicate_media_versions" type="bool" label="39719" default="false" /><!-- Replace user ratings with number of versions -->
        <setting id="enableMusic" type="bool" label="30509" default="true" />
        <setting id="useDirectPaths" type="enum" label="30511" values="Addon (Default)|Direct Paths" default="0" visible="true"/> <!-- Playback mode -->
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 30517][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=passwords)" option="close" /><!-- Set network credentials for Direct Paths and direct play -->

        <setting id="streamMusic" type="bool" label="30510" default="false" visible="false" subsetting="true"/> <!-- Direct stream Music library -->
        <setting id="themoviedbAPIKey" type="text" default="19c90103adb9e98f2172c6a6a3d85dc4" visible="false"/>
        <setting id="FanArtTVAPIKey" type="text" default="639191cb0774661597f28a47e7e2bad5" visible="false"/>
        <setting id="syncEmptyShows" type="bool" label="30508" default="false" visible="false"/>
        <setting id="kodi_db_has_been_wiped_clean" type="bool" label="PKC needs to completely clean the Kodi DB at least once, then reboot, to avoid Kodi error messages, e.g. OperationalError" default="false" visible="false" />
	</category>

	<category label="39057"><!-- Customize Paths -->
		<setting type="lsep" label="39056" /><!-- Used by sync and when attempting Direct Paths. Restart Kodi on changes! -->
		<setting id="replaceSMB" type="bool" label="39034" default="true" /> <!-- replace all Plex paths with SMB paths -->
		<setting id="remapSMB" type="bool" label="39035" default="false" /> <!-- replace Plex paths /volume1/media or \\myserver\media with a custom SMB path smb://NAS/mystuff -->
		<setting id="remapSMBmovieOrg" type="text" label="39037" default="" visible="eq(-1,true)" subsetting="true" /> <!-- Original Plex MOVIE path to replace -->
		<setting id="remapSMBmovieNew" type="text" label="39038" default="smb://" visible="eq(-2,true)" subsetting="true" /> <!-- Replace Plex MOVIE with: -->
		<setting id="remapSMBtvOrg" type="text" label="39039" default="" visible="eq(-3,true)" subsetting="true" /> <!-- Original Plex TV SHOWS path to replace: -->
		<setting id="remapSMBtvNew" type="text" label="39040" default="smb://" visible="eq(-4,true)" subsetting="true" /> <!-- Replace Plex TV SHOWS with: -->
		<setting id="remapSMBmusicOrg" type="text" label="39041" default="" visible="eq(-5,true)" subsetting="true" /> <!-- Original Plex MUSIC path to replace: -->
		<setting id="remapSMBmusicNew" type="text" label="39042" default="smb://" visible="eq(-6,true)" subsetting="true" /> <!-- Replace Plex MUSIC with: -->
		<setting id="remapSMBphotoOrg" type="text" label="39045" default="" visible="eq(-7,true)" subsetting="true" /> <!-- Original Plex MUSIC path to replace: -->
		<setting id="remapSMBphotoNew" type="text" label="39046" default="smb://" visible="eq(-8,true)" subsetting="true" /> <!-- Replace Plex MUSIC with: -->
        <setting id="escapePath" type="bool" label="39036" default="false" /> <!-- Escape special characters in path (e.g. space to %20) -->
        <setting id="escapePathSafeChars" type="text" label="39090" default="%/:=&amp;?~#+!$,;'@()*[]" visible="eq(-1,true)" subsetting="true"/> <!-- Safe characters for http(s), dav(s) and (s)ftp urls -->
	</category>

	<category label="30516"><!-- Playback -->
		<setting id="enableCinema" type="bool" label="30518" default="false" />
		<setting id="askCinema" type="bool" label="30519" default="false" visible="eq(-1,true)" subsetting="true" />
        <setting id="trailerNumber" type="slider" label="39000" default="3" visible="eq(-2,true)" range="1,1,15" option="int" />
        <setting id="enableSkipIntro" type="bool" label="30525" default="true" /><!-- Enable skipping of intros -->
	    <setting id="ignoreSpecialsNextEpisodes" type="bool" label="30527" default="false" />
        <setting id="resumeJumpBack" type="slider" label="30521" default="10" range="0,1,120" option="int" visible="false"/>
        <setting type="sep" />
        <setting id="playType" type="enum" label="30002" values="Try Direct Path|Direct Play|Direct Stream|Force Transcode" default="0" />
        <setting id="transcoderVideoQualities" type="enum" label="30160" values="720x480, 1.5Mbps|1024x768, 2Mbps|720p, 3Mbps|720p, 4Mbps|1080p, 8Mbps|1080p, 10Mbps|1080p, 12Mbps|1080p, 20Mbps|1080p, 40Mbps|4K, 35Mbps|4K, 50Mbps" default="10" /><!-- Video Quality if Transcoding necessary -->
        <setting id="auto_adjust_transcode_quality" label="30161" type="bool" default="false" /><!-- Auto-adjust transcoding quality (deactivate for Chromecast) -->
        <setting id="maxVideoQualities" type="enum" label="30143" values="320kbps|720kbps|1.5Mbps|2Mbps|3Mbps|4Mbps|8Mbps|10Mbps|12Mbps|20Mbps|40Mbps|deactivated" default="11" /><!-- Always transcode if video bitrate is above -->
        <setting id="transcodeH265" type="enum" label="30522" default="0" values="Disabled (default)|480p (and higher)|720p (and higher)|1080p (and higher)|4K" /><!-- Force transcode h265/HEVC -->
        <setting id="transcodeHi10P" type="bool" label="39063" default="false"/>
        <setting id="audioBoost" type="slider" label="39001" default="0" range="0,10,100" option="int"/>
        <setting id="subtitleSize" label="39002" type="slider" option="int" range="0,30,300" default="100" />
        <setting id="force_transcode_pix" type="bool" label="30545" default="false" />
        <setting id="bestQuality" type="bool" label="30541" default="false" /><!-- Transcoding: Auto-pick audio and subtitle stream using Plex defaults -->
        <setting id="bestTrailer" type="bool" label="30542" default="true" />
        <setting type="sep" />
        <setting id="offerDelete" type="bool" label="30114" default="false" visible="false"/>
        <setting id="deleteTV" type="bool" label="30115" visible="eq(-1,true)" default="false" subsetting="true" />
        <setting id="deleteMovies" type="bool" label="30116" visible="eq(-2,true)" default="false" subsetting="true" />
        <setting id="skipContextMenu" type="bool" label="30520" default="false"/>
        <setting id="kodi_video_cache" type="number" visible="false" default="20971520" />
        <setting id="warned_setting_videoplayer.autoplaynextitem" type="bool" visible="false" default="false" />
        <setting id="failedCount" type="number" visible="false" default="0" />
	</category>

	<category label="30544"><!-- artwork -->
        <setting id="usePlexArtwork" label="30502"  type="bool" default="true" /> <!-- Sync Plex artwork from the PMS -->   
		<setting id="enableTextureCache" label="30512"  type="bool" default="true" visible="eq(-1,true)"/> <!-- Cache all artwork for a smooth Kodi experience -->
        <setting id="FanartTV" label="30539" type="bool" default="false" visible="eq(-2,true)"/><!-- Download additional art from FanArtTV -->
        <setting id="PreferKodiCollectionArt" label="30543" type="bool" default="true" visible="eq(-1,true) + eq(-3,true)" subsetting="true" /><!-- Prefer Kodi artwork for collections -->
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39222][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=fanart)" option="close" visible="eq(-2,true) + eq(-4,true)" subsetting="true" /> <!-- Look for missing fanart on FanartTV now -->
        <setting id="imageSyncNotifications" label="30008" type="bool" default="true" visible="eq(-5,true)"/><!-- Enable notifications for image caching -->
        <setting id="imageSyncDuringPlayback" label="30009" type="bool" default="true" visible="eq(-6,true)"/><!-- Enable image caching during Kodi playback (restart Kodi!) -->
		<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39020][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=texturecache)" option="close" visible="eq(-7,true)"/> <!-- Cache all images to Kodi texture cache now -->
        <setting type="lsep" label="$LOCALIZE[126]" visible="eq(-8,true)"/><!-- Status -->
        <setting id="plex_status_fanarttv_lookup" label="30019" type="text" default="" enable="false" visible="eq(-9,true)"/><!-- FanartTV lookup completed -->
        <setting id="plex_status_image_caching" label="30028" type="text" default="" enable="false" visible="eq(-10,true)"/><!-- Image caching completed -->
	</category>
	<!--
	<category label="30235" visible="false">
	    <setting id="enableCoverArt" type="bool" label="30157" default="true" visible="false"/>
		<setting id="additionalUsers" type="text" label="30528" default="" visible="false"/>
		<setting type="lsep" label="30534" visible="false" />
        <setting id="newContent" type="bool" label="30531" default="false" visible="false" />
	    <setting id="newvideotime" type="number" label="30532" visible="false" default="5" option="int" subsetting="true" />
        <setting id="newmusictime" type="number" label="30533" visible="false" default="2" option="int" subsetting="true" />
	</category>
	-->

	<category label="39073"><!-- Appearance Tweaks -->
        <setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39085][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=refreshplaylist)" option="close" /><!-- Reload Kodi node files to apply all the settings below -->
        <setting id="widgetLimit" type="slider" label="39077" default="30" range="10,10,100" option="int" /><!-- Maximum number of videos to show in widgets -->
        <setting type="lsep" />
		<setting id="fetch_pms_item_number" label="39077" type="number" default="50" option="int" visible="false" />
        <setting type="lsep" label="39074" /><!-- TV Shows -->
        <setting id="OnDeckTvAppendShow" type="bool" label="39047" default="false" /><!--On Deck view: Append show title to episode-->
        <setting id="OnDeckTvAppendSeason" type="bool" label="39048" default="false" /><!--On Deck view: Append season number to episode-->
        <setting id="TVShowWatched" type="bool" label="39064" default="true" /><!--Recently Added: Also show already watched episodes-->
        <setting id="RecentTvAppendShow" type="bool" label="39059" default="false" /><!--Recently added: Append show title to episode-->
        <setting id="RecentTvAppendSeason" type="bool" label="39060" default="false" /><!--Recently Added: Append season- and episode-number SxxExx-->
        <setting type="sep" />
        <setting type="lsep" label="30302" /><!-- Movies -->
        <setting id="MovieShowWatched" type="bool" label="39066" default="true" /><!--Recently Added: Also show already watched episodes-->
        <setting type="sep" />
        <setting type="lsep" label="30022" /><!-- Advanced -->
        <setting id="forceReloadSkinOnPlaybackStop" type="bool" label="39065" default="false" /><!-- Force-refresh Kodi skin on stopping playback -->
	</category>

	<category label="30022"><!-- Advanced -->
		<setting id="startupDelay" type="number" label="30529" default="0" option="int" />
		<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 39018][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=repair)" option="close" /> <!-- Repair the Kodi database (force update all content) -->
		<setting label="[COLOR yellow]$ADDON[plugin.video.plexkodiconnect 30535][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect?mode=deviceid)" /><!-- Generate a new unique Plex device Id (e.g. to clone Kodi) -->
		<setting type="sep" />
        <setting type="lsep" label="39049" /><!-- Nothing works? Try a full reset -->
		<setting label="[COLOR red]$ADDON[plugin.video.plexkodiconnect 39019][/COLOR]" type="action" action="RunPlugin(plugin://plugin.video.plexkodiconnect/?mode=reset)" option="close" /> <!-- Reset the Kodi database and optionally reset PlexKodiConnect -->
	</category>
</settings>
