PageRenderTime 149ms CodeModel.GetById 83ms app.highlight 55ms RepoModel.GetById 1ms app.codeStats 0ms

/Common/Settings/Preferences.vb

#
Visual Basic | 2712 lines | 2619 code | 66 blank | 27 comment | 0 complexity | 003d5408bb2373a1000ff0c9c0cc15f8 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1Imports System.IO
   2Imports System.Xml
   3Imports System.Threading
   4Imports System.ComponentModel
   5'Imports MediaInfoNET
   6Imports System.Data.SQLite
   7Imports System.Data
   8Imports XBMC.JsonRpc
   9
  10Module Ext
  11    <System.Runtime.CompilerServices.Extension()> _
  12    Public Sub AppendChild(root As XmlElement, doc As XmlDocument, name As String, value As String)
  13
  14        Dim child As XmlElement = doc.CreateElement(name)
  15
  16        child.InnerText = value
  17        root.AppendChild(child)
  18    End Sub
  19
  20    <System.Runtime.CompilerServices.Extension()> _
  21    Public Sub AppendChildList(root As XmlElement, doc As XmlDocument, name As String, value() As String, Optional separator As String="|")
  22
  23        Dim child As XmlElement = doc.CreateElement(name)
  24
  25        child.InnerText = If(value.Count>0, String.Join(separator,value), "")
  26        root.AppendChild(child)
  27    End Sub
  28
  29End Module
  30
  31
  32Public Class Pref 
  33
  34    'Shared Event PropertyChanged_MkvMergeGuiPath
  35
  36    Public Const SetDefaults = True
  37    Public Const datePattern As String = "yyyyMMddHHmmss"
  38    Public Const nfoDatePattern As String = "yyyy-MM-dd"
  39    Public Const tv_EpRegexDate As String = "([0-9]{4})[.\-_]([0-9]{2})[.\-_]([0-9]{2})"
  40    
  41    'Not saved items
  42    Public Shared fixnfoid As Boolean
  43    Public Shared tv_RegexScraper As New List(Of String)
  44    Public Shared tv_RegexRename As New List(Of String)
  45    Public Shared profiles As New List(Of ListOfProfiles)
  46    Public Shared workingProfile As New ListOfProfiles
  47    Public Shared commandlist As New List(Of str_ListOfCommands)
  48    Public Shared configpath As String
  49    Public Shared DoneAMov As Boolean = False
  50    Public Shared MusicVidScrape As Boolean = False
  51    Public Shared MusicVidConcertScrape As Boolean = False
  52    Public Shared DlMissingEpData As Boolean = False
  53    Public Shared googlecount As Integer = 0
  54    Public Shared engineno As Integer = 0
  55    Public Shared enginefront As New List(Of String)
  56    Public Shared engineend As New List(Of String)
  57    Public Shared proxysettings As New List(Of String)
  58    Public Shared applicationDatapath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\Media Companion\"
  59    'Public Shared XbmcTmdbHDTrailer As String = "No"
  60    Public Shared MovieChangeKeepExistingArt As Boolean = True
  61    Public Shared MovieChangeMovie As Boolean = False
  62    Public Shared MovieDeleteNfoArtwork As Boolean = False
  63    
  64    Public Shared TvChgShowDlPoster As Boolean = False
  65    Public Shared TvChgShowDlFanart As Boolean = False
  66    Public Shared TvChgShowDlSeasonthumbs As Boolean = False
  67    Public Shared TvChgShowDlFanartTvArt As Boolean = False
  68    Public Shared TvChgShowOverwriteImgs As Boolean = False
  69
  70    Public Shared ReadOnly Property EdenEnabled As Boolean
  71        Get
  72            Return Pref.XBMC_version<>2    '0=Eden only, 1=Both, 2=Frodo only
  73        End Get
  74    End Property
  75
  76    Public Shared ReadOnly Property FrodoEnabled As Boolean
  77        Get
  78            Return Pref.XBMC_version<>0    '0=Eden only, 1=Both, 2=Frodo only
  79        End Get
  80    End Property
  81
  82    Public Shared Property applicationPath As String
  83        Get
  84            Return Utilities.applicationPath
  85        End Get
  86        Set(ByVal value As String)
  87            Utilities.applicationPath = value
  88        End Set
  89    End Property
  90    Public Shared Property tvScraperLog As String
  91        Get
  92            Return Utilities.tvScraperLog
  93        End Get
  94        Set(ByVal value As String)
  95            Utilities.tvScraperLog = value
  96        End Set
  97    End Property
  98
  99    'Saved Folder Prefs
 100    Public Shared tvFolders         As New List(Of String)
 101    Public Shared tvRootFolders     As New List(Of str_RootPaths)
 102    Public Shared movieFolders      As New List(Of str_RootPaths)
 103    Public Shared custtvFolders     As New List(Of String)
 104    Public Shared offlinefolders    As New List(Of String)
 105    Public Shared stubfolder        As String
 106    Public Shared stubmessage       As String = "Insert Media to Continue"
 107    Public Shared homemoviefolders  As New List(Of str_RootPaths)
 108    Public Shared ExcludeFolders    As New Excludes("Folders")
 109    Public Shared MVidFolders       As New List(Of str_RootPaths)
 110    Public Shared MVConcertFolders  As New List(Of str_RootPaths)
 111
 112    'Saved Form Prefs
 113    Public Shared backgroundcolour As String
 114    Public Shared forgroundcolour As String
 115    Public Shared remembersize As Boolean
 116    Public Shared locx As Integer
 117    Public Shared locy As Integer
 118    Public Shared formheight As Integer
 119    Public Shared formwidth As Integer
 120    Public Shared splt1 As Integer
 121    Public Shared splt2 As Integer
 122    Public Shared splt3 As Integer
 123    Public Shared splt4 As Integer
 124    Public Shared splt5 As Integer
 125    Public Shared splt6 As Integer  'Tv Banner Split distance  -  To be superceeded by tvbannersplit
 126    Public Shared tvbannersplit As Double  ' Banner as Percentage
 127    Public Shared maximised As Boolean
 128    Public Shared startuptab As Byte
 129    Public Shared logview As Integer
 130    Public Shared LogScrapeTimes As Boolean = False
 131    Public Shared ScrapeTimingsLogThreshold As Integer = 100
 132    Public Shared lastpath As String
 133    Public Shared maximumthumbs As Integer
 134    Public Shared preferredscreen As Integer
 135
 136    'Saved General Prefs
 137    Public Shared startupCache As Boolean
 138    Public Shared renamenfofiles As Boolean
 139    Public Shared actorseasy As Boolean
 140    Public Shared overwritethumbs As Boolean
 141    Public Shared LocalActorImage As Boolean = True
 142    Public Shared videomode As Integer
 143    Public Shared selectedvideoplayer As String
 144    Public Shared externalbrowser As Boolean
 145    Public Shared selectedBrowser As String
 146    Public Shared altnfoeditor As String
 147    Public Shared ignorearticle As Boolean
 148    Public Shared ignoreAarticle As Boolean
 149    Public Shared ignoreAn As Boolean 
 150    Public Shared sorttitleignorearticle As Boolean
 151    Public Shared MovSetTitleIgnArticle As Boolean
 152    Public Shared MovPosterTabTMDBSelect As Boolean = False
 153    Public Shared intruntime As Boolean
 154    Public Shared XBMC_version As Byte
 155    Public Shared ShowMovieGridToolTip As Boolean = False
 156    Public Shared ShowLogOnError As Boolean = True
 157    Public Shared AutoHideStatusBar As Boolean
 158    Public Shared DisplayRatingOverlay As Boolean
 159    Public Shared DisplayMediainfoOverlay As Boolean
 160    Public Shared DisplayMediaInfoFolderSize As Boolean
 161    Public Shared EnableFolderSize As Boolean
 162    Public Shared font As String
 163    Public Shared MultiMonitoEnabled As Boolean
 164    Public Shared ShowAllAudioTracks As Boolean
 165    Public Shared DisplayDefaultSubtitleLang As Boolean
 166    Public Shared DisplayAllSubtitleLang As Boolean
 167    'Private Shared _MkvMergeGuiPath As String
 168    Public Shared MkvMergeGuiPath As String
 169
 170    'Shared Property MkvMergeGuiPath As String
 171    '    Get
 172    '        Return _MkvMergeGuiPath
 173    '    End Get
 174    '    Set (ByVal value As String)
 175    '        If IO.File.Exists(value) Then
 176    '            _MkvMergeGuiPath = value
 177    '            RaiseEvent PropertyChanged_MkvMergeGuiPath
 178    '        End If
 179    '    End Set
 180    'End Property
 181
 182    'Saved General Proxy Prefs
 183    Public Shared prxyEnabled As String
 184    Public Shared prxyIp As String
 185    Public Shared prxyPort As String
 186    Public Shared prxyUsername As String
 187    Public Shared prxyPassword As String
 188    
 189    'Saved Movie Prefs
 190    Public Shared DownloadTrailerDuringScrape As Boolean
 191    Public Shared NoAltTitle As Boolean
 192    Public Shared XtraFrodoUrls As Boolean
 193    Public Shared gettrailer As Boolean
 194    Public Shared ignoretrailers As Boolean
 195    Public Shared moviePreferredTrailerResolution As String
 196    Public Shared moviescraper As Integer
 197    Public Shared nfoposterscraper As Integer
 198    Public Shared ignoreactorthumbs As Boolean
 199    Public Shared maxactors As Integer
 200    Public Shared MovTagBlacklist As String
 201    Public Shared maxmoviegenre As Integer
 202    Public Shared enablehdtags As Boolean
 203    Public Shared MovDurationAsRuntine As Boolean
 204    Public Shared MovRuntimeAsDuration As Boolean
 205    Public Shared movieRuntimeDisplay As String
 206    Public Shared movieRuntimeFallbackToFile As Boolean = False
 207    Public Shared disablelogfiles As Boolean
 208    Public Shared incmissingmovies As Boolean
 209    Public Shared fanartnotstacked As Boolean
 210    Public Shared posternotstacked As Boolean
 211    Public Shared scrapemovieposters As Boolean
 212    Public Shared movrootfoldercheck As Boolean
 213    Public Shared posterjpg As Boolean
 214    Public Shared usefanart As Boolean
 215    Public Shared dontdisplayposter As Boolean
 216    Public Shared usefoldernames As Boolean
 217    Public Shared movxtrathumb As Boolean
 218    Public Shared movxtrafanart As Boolean
 219    Public Shared movxtrafanartqty As Integer
 220    Public Shared dlxtrafanart As Boolean
 221    Public Shared dlMovSetArtwork As Boolean
 222    Public Shared MovCustFolderjpgNoDelete As Boolean
 223    Public Shared MovCustPosterjpgNoDelete As Boolean
 224    Public Shared MovSetArtSetFolder As Boolean
 225    Public Shared MovSetArtCentralFolder As String
 226    Public Shared allfolders As Boolean
 227    Public Shared actorsave As Boolean
 228    Public Shared actorsavepath As String
 229    Public Shared actorsavealpha As Boolean
 230    Public Shared actornetworkpath As String
 231    Public Shared imdbmirror As String
 232    Public Shared createfolderjpg As Boolean
 233    Public Shared createfanartjpg As Boolean    'Use to create fanart.jpg if in a folder
 234    Public Shared basicsavemode As Boolean
 235    Public Shared namemode As String
 236    Public Shared usetransparency As Boolean
 237    Public Shared transparencyvalue As Integer
 238    Public Shared savefanart As Boolean
 239    Public Shared MovFanartTvscrape As Boolean   'cbMovFanartTvScrape
 240    Public Shared MovFanartNaming As Boolean     'cbMovFanartNaming
 241    Public Shared MovFanartTvDlClearArt As Boolean
 242    Public Shared MovFanartTvDlClearLogo As Boolean
 243    Public Shared MovFanartTvDlPoster As Boolean
 244    Public Shared MovFanartTvDlFanart As Boolean
 245    Public Shared MovFanartTvDlDisc As Boolean
 246    Public Shared MovFanartTvDlBanner As Boolean
 247    Public Shared MovFanartTvDlLandscape As Boolean
 248    Public Shared fanartjpg As Boolean      'Used to create fanart.jpg instead of movie-fanart.jpg
 249    Public Shared roundminutes As Boolean
 250    Public Shared moviedefaultlist As Byte
 251    Public Shared movies_useXBMC_Scraper As Boolean
 252    Public Shared TmdbActorsImdbScrape As Boolean
 253    Public Shared ImdbPrimaryPlot As Boolean
 254    Public Shared MovImdbFirstRunTime As Boolean
 255    Public Shared MovImdbAspectRatio As Boolean
 256    Public Shared XBMC_Scraper As String = "tmdb"   'Locked TMDb as XBMC Scraper.
 257    Public Shared XbmcTmdbRenameMovie As Boolean
 258    Public Shared XbmcTmdbMissingFromImdb As Boolean
 259    Public Shared XbmcTmdbTop250FromImdb As Boolean
 260    Public Shared XbmcTmdbVotesFromImdb As Boolean
 261    Public Shared XbmcTmdbCertFromImdb As Boolean
 262    Public Shared XbmcTmdbStarsFromImdb As Boolean
 263    Public Shared XbmcTmdbAkasFromImdb As Boolean
 264    Public Shared XbmcTmdbAspectFromImdb As Boolean
 265    Public Shared XbmcTmdbMetascoreFromImdb As Boolean
 266    Public Shared XbmcTmdbActorDL As Boolean
 267    Public Shared XbmcTmdbActorFromImdb As Boolean
 268    Public Shared XbmcTmdbGenreFromImdb As Boolean
 269    Public Shared scrapefullcert As Boolean
 270    Public Shared MovCertRemovePhrase As Boolean
 271    Public Shared OfflineDVDTitle As String
 272    Public Shared MovieManualRename As Boolean
 273    Public Shared MovieRenameEnable As Boolean
 274    Public Shared MovieRenameTemplate As String
 275    Public Shared MovFolderRename As Boolean
 276    Public Shared MovFolderRenameTemplate As String
 277    Public Shared MovNewFolderInRootFolder As String
 278    Public Shared MovRenameSpaceCharacter As Boolean
 279    Public Shared MovSetIgnArticle As Boolean
 280    Public Shared MovSortIgnArticle As Boolean
 281    Public Shared MovTitleIgnArticle As Boolean
 282    Public Shared MovTitleCase As Boolean
 283    Public Shared ExcludeMpaaRated As Boolean
 284    Public Shared IncludeMpaaRated As Boolean
 285    Public Shared MovThousSeparator As Boolean
 286    Public Shared MovieImdbGenreRegEx As String
 287    Public Shared showsortdate As Boolean
 288    Public Shared TMDbSelectedLanguageName As String = "English - US"
 289    Public Shared TMDbUseCustomLanguage As Boolean = False
 290    Public Shared TMDbCustomLanguageValue As String = ""
 291    Public Shared GetMovieSetFromTMDb As Boolean = True
 292    Public Shared ActorResolutionSI As Integer = 2     ' Height  768           SI = Selected Index
 293    Public Shared PosterResolutionSI As Integer = 9     ' Height  1080  
 294    Public Shared BackDropResolutionSI As Integer = 15     ' Full HD 1920x1080
 295
 296    Public Shared ActorsFilterMinFilms          As Integer =   1
 297    Public Shared MaxActorsInFilter             As Integer = 500
 298    Public Shared MovieFilters_Actors_Order     As Integer =   0        ' 0=Number of films desc 1=A-Z
 299
 300    Public Shared DirectorsFilterMinFilms       As Integer =   1
 301    Public Shared MaxDirectorsInFilter          As Integer = 500
 302    Public Shared MovieFilters_Directors_Order  As Integer =   0        ' 0=Number of films desc 1=A-Z
 303
 304    Public Shared SetsFilterMinFilms            As Integer =   1             
 305    Public Shared MaxSetsInFilter               As Integer = 500
 306    Public Shared MovieFilters_Sets_Order       As Integer =   0        ' 0=Number of films desc 1=A-Z
 307
 308    Public Shared MinTagsInFilter               As Integer =   1             
 309    Public Shared MaxTagsInFilter               As Integer = 500
 310    Public Shared MovFiltersTagsOrder           As Integer =   0        ' 0=Number of films desc 1=A-Z
 311
 312
 313    Public Shared DateFormat As String = "YYYY-MM-DD"   'Valid tokens: YYYY MM DD HH MIN SS Used in Movie list
 314    Public Shared DateFormat2 As String = "yyyy-MM-dd HH:mm:ss"   'Valid tokens: YYYY MM DD HH MIN SS Used in Movie list
 315    Public Shared MovieList_ShowColPlot As Boolean = False
 316    Public Shared DisableNotMatchingRenamePattern As Boolean = True
 317    Public Shared MovieList_ShowColWatched As Boolean = False
 318    Public Shared MovieScraper_MaxStudios As Integer = 3     ' 9 = Max
 319    Public Shared moviesortorder As Integer
 320    Public Shared movieinvertorder As Boolean
 321    Public Shared moviesets As New List(Of String)
 322    Public Shared movietags As New List(Of String)
 323    Public Shared moviethumbpriority As New List(Of String)
 324    Public Shared certificatepriority() As String
 325    Public Shared releaseformat() As String
 326    Public Shared tableview As New List(Of String)
 327    Public Shared tablesortorder As String
 328    Public Shared MovSepLst As New List(Of String)
 329    Public Shared ThreeDKeyWords As New List(Of String)
 330    Public Shared MovFiltLastSize As Integer
 331    Public Shared RenameSpaceCharacter As String
 332
 333    Public Shared Original_Title     As Boolean=False
 334    Public Shared UseMultipleThreads As Boolean=False
 335    Public Shared XbmcTmdbScraperFanart As String = Nothing
 336    Public Shared XbmcTmdbScraperTrailerQ As String = Nothing
 337    Public Shared XbmcTmdbScraperTrailerQLB As New List(Of String)
 338    Public Shared XbmcTmdbScraperLanguage As String = Nothing
 339    Public Shared XbmcTmdbScraperLanguageLB As New List(Of String)
 340    Public Shared XbmcTmdbScraperRatings As String = Nothing
 341    Public Shared XbmcTmdbScraperCertCountry As String = Nothing
 342    Public Shared XbmcTmdbScraperCertCountryLB As New List(Of String)
 343
 344    Public Shared movie_filters As MovieFilters = New MovieFilters
 345
 346    Public Shared CheckForNewVersion As Boolean=False
 347    Public Shared CloseMCForDLNewVersion As Boolean = True
 348    Public Shared AllowUserTags As Boolean
 349    Public Shared keywordasTag As Boolean
 350    Public Shared keywordlimit As Integer
 351    Public Shared TagRes As Boolean
 352    Public Shared GenreCustomBefore As Boolean
 353    Public Shared CustomTmdbApiKey As String = ""
 354    Public Shared MovNfoWatchTag As Boolean
 355
 356    Public Shared Property movieignorepart As Boolean
 357        Get
 358            Return Utilities.ignoreParts
 359        End Get
 360        Set(value As Boolean)
 361            Utilities.ignoreParts = value
 362        End Set
 363    End Property
 364    Public Shared Property moviecleanTags As String
 365        Get
 366            Return Utilities.userCleanTags
 367        End Get
 368        Set(value As String)
 369            Utilities.userCleanTags = value
 370        End Set
 371    End Property
 372    Public Shared Property rarsize As Integer
 373        Get
 374            Return Utilities.RARsize
 375        End Get
 376        Set(value As Integer)
 377            Utilities.RARsize = value
 378        End Set
 379    End Property
 380    Public Shared ReadOnly Property MovFanartTvDlAll As Boolean
 381        Get
 382            Return MovFanartTvDlBanner AndAlso MovFanartTvDlClearArt AndAlso MovFanartTvDlClearLogo AndAlso MovFanartTvDlDisc AndAlso MovFanartTvDlFanart AndAlso MovFanartTvDlLandscape AndAlso MovFanartTvDlPoster 
 383        End Get
 384    End Property
 385
 386    'Saved TV Prefs
 387    Public Shared tvshowautoquick As Boolean
 388    Public Shared copytvactorthumbs As Boolean = False
 389    Public Shared tvdbIMDbRating As Boolean = False
 390    Public Shared displayMissingEpisodes As Boolean = False
 391    Public Shared ignoreMissingSpecials As Boolean = False
 392    Public Shared TvMissingEpOffset As Boolean = False
 393    Public Shared sortorder As String
 394    Public Shared tvdlposter As Boolean
 395    Public Shared tvdlfanart As Boolean
 396    Public Shared tvdlseasonthumbs As Boolean
 397    Public Shared TvDlFanartTvArt As Boolean
 398    Public Shared TvFanartTvFirst As Boolean
 399    Public Shared dlTVxtrafanart As Boolean
 400    Public Shared TvXtraFanartQty As Integer
 401    Public Shared tvfolderjpg As Boolean
 402    Public Shared seasonfolderjpg As Boolean
 403    Public Shared enabletvhdtags As Boolean
 404    Public Shared disabletvlogs As Boolean
 405    Public Shared postertype As String
 406    Public Shared TvdbActorScrape As Integer
 407    Public Shared seasonall As String
 408    Public Shared tvrename As Integer
 409    Public Shared ScrShtDelay As Integer
 410    Public Shared tvshowrefreshlog As Boolean
 411    Public Shared autoepisodescreenshot As Boolean
 412    Public Shared tvscrnshtTVDBResize As Boolean
 413    Public Shared tvshow_useXBMC_Scraper As Boolean
 414    Public Shared autorenameepisodes As Boolean
 415    Public Shared eprenamelowercase As Boolean
 416    Public Shared TvRenameReplaceSpace As Boolean
 417    Public Shared TvRenameReplaceSpaceDot As Boolean
 418    Public Shared TvdbLanguage As String = "English"
 419    Public Shared TvdbLanguageCode As String = "en"
 420    Public Shared lastrefreshmissingdate As String
 421    Public Shared excludefromshowfoldername As String
 422    Public Shared TvMaxGenres As Integer
 423    'XBMC TVDB Scraper Options
 424    Public Shared XBMCTVDbDvdOrder As Boolean
 425    Public Shared XBMCTVDbAbsoluteNumber As Boolean
 426    Public Shared XBMCTVDbFanart As Boolean
 427    Public Shared XBMCTVDbPoster As Boolean
 428    Public Shared XBMCTVDbLanguage As String
 429    Public Shared XBMCTVDbLanguageLB As New List(Of String)
 430    Public Shared XBMCTVDbRatings As String = "IMDb"            'Assign a default to prevent frmPreferences crashing here: cbXBMCTvdbRatingImdb            .Checked    = If(Pref.XBMCTVDbRatings.ToLower = "imdb", True, False)
 431    Public Shared XBMCTVDbfallback As Boolean
 432
 433    'Saved Home Movie Prefs
 434    Public Shared HmFanartScrnShot As Boolean
 435    Public Shared HmFanartTime As Integer
 436    Public Shared HmPosterTime As Integer
 437
 438    'Saved Music Video Prefs
 439    Public Shared MVScraper As String
 440    Public Shared MVsortorder As Integer
 441    Public Shared MVdefaultlist As Integer
 442    Public Shared MVPrefScrnSht As Integer
 443    Public Shared MVPrefShowLog As Boolean
 444
 445    '(Unsure)
 446    Public Shared maximagecount As Integer
 447    Public Shared episodeacrorsource As String
 448    Public Shared alwaysuseimdbid As Boolean
 449    
 450    'XBMC Sync
 451    Public Shared XBMC_Active As Boolean = False
 452    Public Shared XBMC_Link                   As Boolean = False
 453    Public Shared XBMC_Address                As String = "127.0.0.1"
 454    Public Shared XBMC_Port                   As String = "8080"
 455    Public Shared XBMC_Username               As String = ""
 456    Public Shared XBMC_Password               As String = ""
 457    Public Shared XBMC_UserdataFolder         As String = ""
 458    Public Shared XBMC_TexturesDb             As String = "Database\Textures13.db"
 459    Public Shared XBMC_ThumbnailsFolder       As String = "Thumbnails"
 460    Public Shared XBMC_MC_MovieFolderMappings As New XBMC_MC_FolderMappings("Movie")
 461    Public Shared XBMC_MC_CompareFields       As New XBMC_MC_CompareFields ("Movie")
 462    Public Shared XBMC_Link_Use_Forward_Slash As Boolean = False    'This property does not get persisted, it's assigned in XbmcController at runtime
 463    Public Shared XBMC_Delete_Cached_Images   As Boolean = True
 464    
 465    Public Shared ShowExtraMovieFilters       As Boolean = False
 466    Public Shared ExportXBMCPath              As String = ""
 467    
 468    ReadOnly Shared Property AppPath As String
 469        Get 
 470            Return My.Application.Info.DirectoryPath
 471         End Get
 472    End Property 
 473    
 474    ReadOnly Shared Property XBMC_TestsPassed As Boolean
 475        Get 
 476            'Non-db tests...
 477            Dim result As Boolean = XBMC_Active AndAlso XBMC_MC_MovieFolderMappings.Initialised AndAlso FrodoEnabled AndAlso XBMC_CanPing AndAlso XBMC_CanConnect 
 478            If Not result Then Return False
 479
 480            'Db tests...
 481            If XBMC_Delete_Cached_Images Then
 482                result = XBMC_UserdataFolder_Valid     AndAlso XBMC_TexturesDbFile_Valid   AndAlso XBMC_TexturesDb_Conn_Valid  AndAlso 
 483                         XBMC_TexturesDb_Version_Valid AndAlso XBMC_ThumbnailsFolder_Valid  
 484            End If
 485            Return result 
 486         End Get
 487    End Property  
 488    
 489    ReadOnly Shared Property XBMC_CanConnect As Boolean
 490        Get
 491            Dim xbmc As XbmcJsonRpcConnection
 492            Try
 493                xbmc = new XbmcJsonRpcConnection(XBMC_Address, XBMC_Port, XBMC_Username, XBMC_Password)
 494                xbmc.Open
 495                Dim result As Boolean = xbmc.IsAlive
 496                xbmc.Close
 497                Return result
 498            Catch
 499            End Try
 500            Return False
 501        End Get
 502    End Property
 503
 504    ReadOnly Shared Property XBMC_CanPing As Boolean
 505        Get
 506            Dim result As Boolean = False
 507            Try
 508                result = My.Computer.Network.Ping(XBMC_Address,1000)
 509            Catch
 510            End Try
 511            Return result
 512        End Get
 513    End Property
 514
 515    ReadOnly Shared Property XBMC_TexturesDb_Version_Valid As Boolean
 516        Get
 517            Return TexturesDbVersion = 13
 518        End Get
 519    End Property
 520
 521    Public Shared Function TexturesDbVersion As Integer
 522        Try
 523            Dim conn As SQLiteConnection = new SQLiteConnection(XBMC_TexturesDb_ReadOnly_ConnectionStr)
 524            conn.Open
 525            Dim dt As DataTable = DbUtils.ExecuteReader(conn, "Select idVersion from version" )
 526            conn.Close
 527            Return dt.Rows(0)("idVersion").ToString
 528        Catch ex As Exception
 529            Return -1
 530        End Try
 531    End Function
 532
 533    ReadOnly Shared Property XBMC_TexturesDb_Conn_Valid As Boolean
 534        Get
 535            Try
 536                Dim conn As SQLiteConnection = new SQLiteConnection(XBMC_TexturesDb_ReadOnly_ConnectionStr)
 537                conn.Open
 538                Dim dt As DataTable = DbUtils.ExecuteReader(conn, "Select idVersion from version" )
 539                conn.Close
 540                Return True
 541            Catch ex As Exception
 542                Return False
 543            End Try
 544        End Get
 545    End Property
 546
 547    ReadOnly Shared Property XBMC_ThumbnailsFolder_Valid As Boolean
 548        Get
 549            Return Directory.Exists(XBMC_Thumbnails_Path)
 550        End Get
 551    End Property
 552
 553    ReadOnly Shared Property XBMC_UserdataFolder_Valid As Boolean
 554        Get
 555            Return Directory.Exists(XBMC_UserdataFolder)
 556        End Get
 557    End Property
 558
 559    ReadOnly Shared Property XBMC_TexturesDbFile_Valid As Boolean
 560        Get
 561            Return IO.File.Exists(XBMC_TexturesDb_Path)
 562        End Get
 563    End Property
 564
 565    ReadOnly Shared Property XBMC_TexturesDb_ReadOnly_ConnectionStr As String
 566        Get
 567            Return XBMC_TexturesDb_ConnectionStr & "Read Only=True;"
 568        End Get
 569    End Property
 570
 571    ReadOnly Shared Property XBMC_TexturesDb_ConnectionStr As String
 572        Get
 573            Return "Data Source=" + Pref.XBMC_TexturesDb_Path + ";Version=3;New=False;Compress=True;FailIfMissing=True;"
 574        End Get
 575    End Property
 576
 577    ReadOnly Shared Property XBMC_Thumbnails_Path As String
 578        Get
 579            Return Path.Combine(XBMC_UserdataFolder,XBMC_ThumbnailsFolder)
 580        End Get
 581    End Property
 582
 583    ReadOnly Shared Property XBMC_TexturesDb_Path As String
 584        Get
 585            Return Path.Combine(XBMC_UserdataFolder,XBMC_TexturesDb)
 586        End Get
 587    End Property
 588
 589    ReadOnly Shared Property XbmcLinkReady As Boolean
 590        Get
 591            Return XBMC_Link And XBMC_TestsPassed
 592        End Get
 593    End Property
 594
 595    Public Shared Sub SetUpPreferences()
 596        'General
 597        ignorearticle = False
 598        ignoreAarticle = False
 599        ignoreAn = False
 600        sorttitleignorearticle = False
 601        MovSetTitleIgnArticle = False
 602        MovPosterTabTMDBSelect = False
 603        externalbrowser = False
 604        selectedBrowser = ""
 605        altnfoeditor = ""
 606        backgroundcolour = "Silver"
 607        forgroundcolour = "#D3D9DC"
 608        formheight = "600"
 609        formwidth = "800"
 610        disablelogfiles = False
 611        AutoHideStatusBar = True
 612        DisplayRatingOverlay = True
 613        DisplayMediainfoOverlay = True
 614        DisplayMediaInfoFolderSize = False
 615        EnableFolderSize = False
 616        ShowAllAudioTracks = False
 617        DisplayDefaultSubtitleLang = True
 618        DisplayAllSubtitleLang = False
 619        incmissingmovies = False
 620        startupCache = True
 621        rarsize = 8
 622        renamenfofiles = True
 623        scrapemovieposters = True
 624        movrootfoldercheck = True
 625        posterjpg = False
 626        dontdisplayposter = False
 627        usetransparency = False 'not used in gen2
 628        transparencyvalue = 255 'not used in gen2
 629        lastpath = applicationPath ' Application.StartupPath
 630        videomode = 1
 631        locx = 0
 632        locy = 0
 633        formheight = 725
 634        formwidth = 1060
 635        splt5 = 0
 636        splt6 = 230
 637        tvbannersplit = 0
 638        showsortdate = False
 639        MultiMonitoEnabled = False
 640        XBMC_version = 2
 641        'Proxy settings
 642        prxyEnabled = "false"
 643        prxyIp = "127.0.0.1"
 644        prxyPort = "8099"
 645        prxyUsername = "username"
 646        prxyPassword = "password"
 647
 648        'Movies
 649        movies_useXBMC_Scraper = False
 650        TmdbActorsImdbScrape = False
 651        ImdbPrimaryPlot = False
 652        MovImdbFirstRunTime = False
 653        MovImdbAspectRatio = False
 654        XBMC_Scraper = "tmdb"
 655        XbmcTmdbRenameMovie = False
 656        XbmcTmdbMissingFromImdb = False
 657        XbmcTmdbTop250FromImdb = False
 658        XbmcTmdbVotesFromImdb = False
 659        XbmcTmdbCertFromImdb = False
 660        XbmcTmdbStarsFromImdb = False
 661        XbmcTmdbAkasFromImdb = False
 662        XbmcTmdbAspectFromImdb = False
 663        XbmcTmdbMetascoreFromImdb = False
 664        XbmcTmdbActorDL = False
 665        XbmcTmdbActorFromImdb = False
 666        XbmcTmdbGenreFromImdb = False
 667        scrapefullcert = False
 668        MovCertRemovePhrase = False
 669        moviedefaultlist = 0
 670        moviesortorder = 0
 671        'movieinvertorder = 0
 672        imdbmirror = "http://www.imdb.com/"
 673        usefoldernames = False
 674        movxtrafanart = True
 675        movxtrafanartqty = 0
 676        movxtrathumb = False
 677        dlxtrafanart = False
 678        dlMovSetArtwork = False
 679        MovCustFolderjpgNoDelete = False
 680        MovCustPosterjpgNoDelete = False
 681        MovSetArtSetFolder = False
 682        MovSetArtCentralFolder = ""
 683        allfolders = False
 684        'ReDim moviethumbpriority(3)
 685        maxmoviegenre = 99
 686        moviethumbpriority.Add("themoviedb.org")
 687        moviethumbpriority.Add("IMDB")
 688        'moviethumbpriority.Add("Movie Poster DB")
 689        moviethumbpriority.Add("Internet Movie Poster Awards")
 690        MovSepLst.Add("3DSBS")
 691        MovSepLst.Add("3DTAB")
 692        MovSepLst.Add("3D")
 693        MovSepLst.Add("Directors-Cut")
 694        MovSepLst.Add("Extended-Edition")
 695        MovSepLst.Add("Theatrical-Version")
 696        MovSepLst.Add("Unrated-Version")
 697        ThreeDKeyWords.Clear()
 698        ThreeDKeyWords.Add("HSBS")
 699        ThreeDKeyWords.Add("SBS")
 700        ThreeDKeyWords.Add("TAB")
 701        ThreeDKeyWords.Add("MVC")
 702        movieRuntimeDisplay = "scraper"
 703        moviePreferredTrailerResolution = "720"
 704        MovieManualRename = True
 705        MovieRenameEnable = False
 706        MovieRenameTemplate = "%T (%Y)"
 707        MovFolderRename = False
 708        MovRenameSpaceCharacter = False
 709        MovSetIgnArticle = False
 710        MovSortIgnArticle = False
 711        MovTitleIgnArticle = False
 712        MovTitleCase = False
 713        ExcludeMpaaRated = False
 714        IncludeMpaaRated = False
 715        MovThousSeparator = False
 716        MovFolderRenameTemplate = "%N\%T (%Y)"
 717        MovNewFolderInRootFolder = False
 718        MovieImdbGenreRegEx = "/genre/.*?>(?<genre>.*?)</a>"
 719        MovFiltLastSize = 384
 720        RenameSpaceCharacter = "_"
 721
 722
 723        'TV
 724        tvshow_useXBMC_Scraper = False
 725        autorenameepisodes = False
 726        eprenamelowercase = False
 727        TvRenameReplaceSpace = False
 728        TvRenameReplaceSpaceDot = False
 729        autoepisodescreenshot = False
 730        tvscrnshtTVDBResize = False
 731        tvshowautoquick = False
 732        copytvactorthumbs = True
 733        tvdbIMDbRating = False
 734        enabletvhdtags = True
 735        tvshowrefreshlog = False
 736        seasonall = "none"
 737        tvrename = 0
 738        
 739        tvdlfanart = True
 740        tvdlposter = True
 741        tvdlseasonthumbs = True
 742        TvDlFanartTvArt = False
 743        TvFanartTvFirst = False
 744        dlTVxtrafanart = False
 745        TvXtraFanartQty = 5
 746        tvfolderjpg = False
 747        seasonfolderjpg = False
 748        postertype = "poster"
 749        TvdbLanguage = "English"
 750        TvdbLanguageCode = "en"
 751        lastrefreshmissingdate = ""   'DateTime.Now.ToString("yyyy-MM-dd")
 752        sortorder = "default"
 753        TvdbActorScrape = 0
 754        OfflineDVDTitle = "Please Load '%T' Media To Play..."
 755        fixnfoid = False
 756        logview = "0"  'first entry in combobox is 'Full' (log view)
 757        displayMissingEpisodes = False
 758        ignoreMissingSpecials = False
 759        TvMissingEpOffset = False
 760        ScrShtDelay = 10
 761        excludefromshowfoldername = "[ended]"
 762        TvMaxGenres = 99
 763
 764        'Home Movie
 765        HmFanartScrnShot = True
 766        HmFanartTime = 10
 767        HmPosterTime = 10
 768
 769        'Music Video
 770        MVScraper = "wiki"
 771        MVsortorder = 0
 772        MVdefaultlist = 0
 773        MVPrefScrnSht = 10
 774        MVPrefShowLog = True
 775
 776        'Unknown - need to be sorted/named better
 777        GenreCustomBefore = False
 778        CustomTmdbApiKey = ""
 779        MovNfoWatchTag = False
 780        intruntime = False
 781        actorseasy = True
 782        startuptab = 0
 783        font = "Microsoft Sans Serif, 9pt"
 784        fanartnotstacked = False
 785        posternotstacked = False
 786        ignoreactorthumbs = False
 787        actorsave = False
 788        actorsavepath = ""
 789        actorsavealpha = False
 790        actornetworkpath = ""
 791        usefanart = True
 792        ignoretrailers = False
 793        enablehdtags = True
 794        MovDurationAsRuntine = False
 795        MovRuntimeAsDuration = False
 796        savefanart = True
 797        MovFanartTvscrape = False
 798        MovFanartNaming = False
 799        MovFanartTvDlClearArt = True
 800        MovFanartTvDlClearLogo = True
 801        MovFanartTvDlPoster = True
 802        MovFanartTvDlFanart = True
 803        MovFanartTvDldisc = True
 804        MovFanartTvDlBanner = True
 805        MovFanartTvDlLandscape = True
 806        fanartjpg = False
 807        overwritethumbs = False
 808        LocalActorImage = True
 809        maxactors = 9999
 810        AllowUserTags = True
 811        keywordasTag = False
 812        keywordlimit = 5
 813        TagRes = False
 814        MovTagBlacklist = ""
 815        createfolderjpg = False
 816        createfanartjpg = False
 817        basicsavemode = False               'movie.nfo, movie.tbn, fanart.jpg
 818        namemode = "1"
 819        maximumthumbs = 6
 820        preferredscreen = 0
 821        gettrailer = False
 822        DownloadTrailerDuringScrape = False
 823        NoAltTitle = False
 824        XtraFrodoUrls = True
 825        ExportXBMCPath = ""
 826
 827        ReDim certificatepriority(33)
 828        certificatepriority(0) = "MPAA"
 829        certificatepriority(1) = "UK"
 830        certificatepriority(2) = "USA"
 831        certificatepriority(3) = "Ireland"
 832        certificatepriority(4) = "Australia"
 833        certificatepriority(5) = "New Zealand"
 834        certificatepriority(6) = "Norway"
 835        certificatepriority(7) = "Singapore"
 836        certificatepriority(8) = "South Korea"
 837        certificatepriority(9) = "Philippines"
 838        certificatepriority(10) = "Brazil"
 839        certificatepriority(11) = "Netherlands"
 840        certificatepriority(12) = "Malaysia"
 841        certificatepriority(13) = "Argentina"
 842        certificatepriority(14) = "Iceland"
 843        certificatepriority(15) = "Canada (Quebec)"
 844        certificatepriority(16) = "Canada (British Columbia/Ontario)"
 845        certificatepriority(17) = "Canada (Alberta/Manitoba/Nova Scotia)"
 846        certificatepriority(18) = "Peru"
 847        certificatepriority(19) = "Sweden"
 848        certificatepriority(20) = "Portugal"
 849        certificatepriority(21) = "South Africa"
 850        certificatepriority(22) = "Denmark"
 851        certificatepriority(23) = "Hong Kong"
 852        certificatepriority(24) = "Finland"
 853        certificatepriority(25) = "India"
 854        certificatepriority(26) = "Mexico"
 855        certificatepriority(27) = "France"
 856        certificatepriority(28) = "Italy"
 857        certificatepriority(29) = "Switzerland (canton of Vaud)"
 858        certificatepriority(30) = "Switzerland (canton of Geneva)"
 859        certificatepriority(31) = "Germany"
 860        certificatepriority(32) = "Greece"
 861        certificatepriority(33) = "Austria"
 862        maximagecount = 10
 863        ReDim releaseformat(14)
 864        releaseformat(0) = "Cam"
 865        releaseformat(1) = "Telesync"
 866        releaseformat(2) = "Workprint"
 867        releaseformat(3) = "Telecine"
 868        releaseformat(4) = "Pay-Per-View Rip"
 869        releaseformat(5) = "Screener"
 870        releaseformat(6) = "R5"
 871        releaseformat(7) = "DVD-Rip"
 872        releaseformat(8) = "DVD-R"
 873        releaseformat(9) = "HDTV"
 874        releaseformat(10) = "VODRip"
 875        releaseformat(11) = "BRRip"
 876        releaseformat(12) = "BDRip"
 877        releaseformat(13) = "Bluray"
 878        releaseformat(14) = "DVD"
 879
 880        movieFolders        .Clear()
 881        tvRootFolders       .Clear()
 882        tvFolders           .Clear()
 883        MVidFolders         .Clear()
 884        MVConcertFolders    .Clear()
 885        custtvFolders       .Clear()
 886
 887    End Sub
 888
 889    Public Shared Sub resetmovthumblist
 890        moviethumbpriority.Clear()
 891        moviethumbpriority.Add("themoviedb.org")
 892        moviethumbpriority.Add("IMDB")
 893        'moviethumbpriority.Add("Movie Poster DB")
 894        moviethumbpriority.Add("Internet Movie Poster Awards")
 895    End Sub
 896
 897    Public Shared Sub ResetMovSepLst
 898        MovSepLst.Clear()
 899        MovSepLst.Add("3DSBS")
 900        MovSepLst.Add("3DTAB")
 901        MovSepLst.Add("3D")
 902        MovSepLst.Add("Directors-Cut")
 903        MovSepLst.Add("Extended-Edition")
 904        MovSepLst.Add("Theatrical-Version")
 905        MovSepLst.Add("Unrated-Version")
 906        MovSepLst.Add("DVD")
 907        MovSepLst.Add("Bluray")
 908    End Sub
 909
 910    Public Shared Sub Proxyreload()
 911        proxysettings.Clear()
 912        proxysettings.Add(prxyEnabled)
 913        proxysettings.Add(prxyIp)
 914        proxysettings.Add(prxyPort)
 915        proxysettings.Add(prxyUsername)
 916        proxysettings.Add(prxyPassword)
 917        Utilities.MCProxy = proxysettings
 918    End Sub
 919
 920    Public Shared Sub engineupdate
 921        enginefront.Clear()
 922        engineend.Clear()
 923        enginefront.Add("http://www.google.co.uk/search?hl=en-US&as_q=")
 924        engineend.Add("&as_sitesearch=www.imdb.com")
 925        enginefront.Add("https://duckduckgo.com/lite/?q=")
 926        engineend.Add("+site%3Aimdb.com&kp=-1&kaf=1&k1=-1&kac=-1&ia=web")
 927        'enginefront.Add("http://www.bing.com/search?q=")
 928        'engineend.Add("+movie+site%3Aimdb.com")
 929        'enginefront.Add("http://www.ask.com/web?qsrc=1&o=0&l=dir&q=")
 930        'engineend.Add("&qo=serpSearchTopBox")
 931    End Sub
 932    Public Shared Sub ConfigSave()
 933        
 934        Dim tempstring As String = String.Empty
 935        Dim doc As New XmlDocument
 936        Dim xmlproc As XmlDeclaration
 937
 938        xmlproc = doc.CreateXmlDeclaration("1.0", "UTF-8", "yes")
 939        doc.AppendChild(xmlproc)
 940        Dim root As XmlElement
 941        Dim child As XmlElement
 942        root = doc.CreateElement("xbmc_media_companion_config_v1.0")
 943
 944
 945        'Folders In Use ------------------------------------------------------
 946        For Each path In tvFolders
 947            root.AppendChild(doc, "tvfolder", path)
 948        Next
 949
 950        For Each path In tvRootFolders
 951            Dim t As String = path.rpath & "|" & path.selected 
 952            root.AppendChild(doc, "tvrootfolder", t)
 953        Next
 954
 955        For Each path In movieFolders
 956            Dim t As String = path.rpath & "|" & path.selected 
 957            root.AppendChild(doc, "nfofolder", t)
 958        Next
 959        root.AppendChild(doc, "stubfolder", stubfolder)
 960        root.AppendChild(doc, "stubmessage", stubmessage)
 961        For Each path In offlinefolders
 962            root.AppendChild(doc, "offlinefolder", path)
 963        Next
 964
 965        For Each path In homemoviefolders
 966            Dim t As String = path.rpath & "|" & path.selected
 967            root.AppendChild(doc, "homemoviefolder", t)
 968        Next
 969
 970        For Each path In MVidFolders
 971            Dim t As String = path.rpath & "|" & path.selected
 972            root.AppendChild(doc, "MVidFolders", t)
 973        Next
 974
 975        For Each path In MVConcertFolders
 976            Dim t As String = path.rpath & "|" & path.selected
 977            root.AppendChild(doc, "MVConcertFolders", t)
 978        Next
 979
 980        For each path In custtvFolders
 981            root.AppendChild(doc, "custtvFolder", path)
 982        Next
 983
 984        root.AppendChild(ExcludeFolders.GetChild(doc))
 985        
 986        'Form Settings ------------------------------------------------------------
 987        root.AppendChild(doc, "backgroundcolour",           backgroundcolour)
 988        root.AppendChild(doc, "forgroundcolour",            forgroundcolour)
 989        root.AppendChild(doc, "remembersize",               remembersize)
 990        root.AppendChild(doc, "locx",                       locx)
 991        root.AppendChild(doc, "locy",                       locy)
 992        root.AppendChild(doc, "formheight",                 formheight)
 993        root.AppendChild(doc, "formwidth",                  formwidth)
 994        root.AppendChild(doc, "splitcontainer1",            splt1)
 995        root.AppendChild(doc, "splitcontainer2",            splt2)
 996        root.AppendChild(doc, "splitcontainer3",            splt3)
 997        root.AppendChild(doc, "splitcontainer4",            splt4)
 998        root.AppendChild(doc, "splitcontainer5",            splt5)
 999        root.AppendChild(doc, "splitcontainer6",            splt6)
1000        root.AppendChild(doc, "tvbannersplit",              tvbannersplit)
1001        root.AppendChild(doc, "maximised",                  maximised)
1002        root.AppendChild(doc, "startuptab",                 startuptab)
1003        root.AppendChild(doc, "logview",                    logview)
1004        root.AppendChild(doc, "LogScrapeTimes",             LogScrapeTimes)
1005        root.AppendChild(doc, "ScrapeTimingsLogThreshold",  ScrapeTimingsLogThreshold)
1006        root.AppendChild(doc, "maximumthumbs",              maximumthumbs)
1007        root.AppendChild(doc, "preferredscreen",            preferredscreen)
1008        root.AppendChild(doc, "lastpath",                   lastpath)
1009        root.AppendChild(doc, "MovieImdbGenreRegEx",        MovieImdbGenreRegEx)
1010        root.AppendChild(doc, "moviedefaultlist",           moviedefaultlist)           'RadioButtonFileName,RadioButtonTitleAndYear,RadioButtonFolder
1011        root.AppendChild(doc, "moviesortorder",             moviesortorder)             'cbSort
1012        root.AppendChild(doc, "movieinvertorder",           movieinvertorder)           'btnreverse
1013        root.AppendChild(doc, "displayMissingEpisodes",     displayMissingEpisodes)     'SearchForMissingEpisodesToolStripMenuItem
1014        root.AppendChild(doc, "ignoreMissingSpecials",      ignoreMissingSpecials)      'cbTvMissingSpecials
1015        root.AppendChild(doc, "TvMissingEpOffset",          TvMissingEpOffset)          'cb_TvMissingEpOffset
1016        
1017        'Still to do
1018        child = doc.CreateElement("moviesets")
1019        Dim childchild As XmlElement
1020        For Each movieset In moviesets
1021            If movieset <> "-None-" Then
1022                childchild = doc.CreateElement("set")
1023                childchild.InnerText = movieset
1024                child.AppendChild(childchild)
1025            End If
1026        Next
1027        root.AppendChild(child)
1028
1029        child = doc.CreateElement("movietags")  'preparing new movie tags
1030        Dim childchild3 As XmlElement
1031        For Each movietag In movietags
1032            If movietag <> "" And Not IsNothing(movietag) Then
1033                childchild3 = doc.CreateElement("tag")
1034                childchild3.InnerText = movietag
1035                child.AppendChild(childchild3)
1036            End If
1037        Next
1038        root.AppendChild(child)
1039
1040        child = doc.CreateElement("table")
1041        Dim childchild2 As XmlElement
1042        childchild2 = doc.CreateElement("sort")
1043        childchild2.InnerText = tablesortorder
1044        child.AppendChild(childchild2)
1045        For Each tabs In tableview
1046            childchild2 = doc.CreateElement("tab")
1047            childchild2.InnerText = tabs
1048            child.AppendChild(childchild2)
1049        Next
1050        root.AppendChild(child)
1051        
1052        'General Prefs ------------------------------------------------------------
1053        root.AppendChild(doc, "startupcache"                , startupCache              ) 'chkbx_disablecache
1054        root.AppendChild(doc, "renamenfofiles"              , renamenfofiles            ) 'CheckBoxRenameNFOtoINFO
1055        root.AppendChild(doc, "actorseasy"                  , actorseasy                ) 'CheckBox33
1056        root.AppendChild(doc, "rarsize"                     , rarsize                   ) 'txtbx_minrarsize
1057        root.AppendChild(doc, "overwritethumbs"             , overwritethumbs           )'cbOverwriteArtwork - does not appear to be used?
1058        root.AppendChild(doc, "LocalActorImage"             , LocalActorImage           ) 'cbDisplayLocalActor
1059        root.AppendChild(doc, "videomode"                   , videomode                 ) 'RadioButton36-38
1060        root.AppendChild(doc, "selectedvideoplayer"         , selectedvideoplayer       )'btn_custommediaplayer
1061        root.AppendChild(doc, "externalbrowser"             , externalbrowser           ) 'CheckBox12
1062        root.AppendChild(doc, "selectedBrowser"             , selectedBrowser           ) 'btnFindBrowser
1063        root.AppendChild(doc, "altnfoeditor"                , altnfoeditor              ) 'btnaltnfoeditor
1064        root.AppendChild(doc, "ignorearticle"               , ignorearticle             ) 'cb_IgnoreThe
1065        root.AppendChild(doc, "ignoreAarticle"              , ignoreAarticle            ) 'cb_IgnoreA
1066        root.AppendChild(doc, "ignoreAn"                    , ignoreAn                  ) 'cb_IgnoreAn
1067        root.AppendChild(doc, "sorttitleignorearticle"      , sorttitleignorearticle    ) 'cb_SorttitleIgnoreArticles
1068        root.AppendChild(doc, "MovSetTitleIgnArticle"       , MovSetTitleIgnArticle     ) 'cb_MovSetTitleIgnArticle
1069        root.AppendChild(doc, "MovPosterTabTMDBSelect"      , MovPosterTabTMDBSelect    ) 'cb_MovPosterTabTMDBSelect
1070        root.AppendChild(doc, "intruntime"                  , intruntime                ) 'CheckBox38
1071        root.AppendChild(doc, "xbmcartwork"                 , XBMC_version              ) 'rbXBMCv_pre,rbXBMCv_post,rbXBMCv_both
1072        root.AppendChild(doc, "ShowMovieGridToolTip"        , ShowMovieGridToolTip      ) 'cbShowMovieGridToolTip
1073        root.AppendChild(doc, "ShowLogOnError"              , ShowLogOnError            ) 'cbShowLogOnError
1074        root.AppendChild(doc, "CheckForNewVersion"          , CheckForNewVersion        )
1075        root.AppendChild(doc, "CloseMCForDLNewVersion"      , CloseMCForDLNewVersion    ) 'cbMcCloseMCForDLNewVersion
1076        root.AppendChild(doc, "MkvMergeGuiPath"             , MkvMergeGuiPath           ) 'tbMkvMergeGuiPath
1077        root.AppendChild(doc, "prxyEnabled"                 , prxyEnabled               ) 'ucGenPref_Proxy.cb_prxyEnable
1078        root.AppendChild(doc, "prxyIp"                      , prxyIp                    ) 'ucGenPref_Proxy.tb_prxyIp
1079        root.AppendChild(doc, "prxyPort"                    , prxyPort                  ) 'ucGenPref_Proxy.prxyPort
1080        root.AppendChild(doc, "prxyUsername"                , prxyUsername              ) 'ucGenPref_Proxy.prxyUsername
1081        root.AppendChild(doc, "prxyPassword"                , prxyPassword              ) 'ucGenPref_Proxy.prxyPassword
1082        root.AppendChild(doc, "ShowAllAudioTracks"          , ShowAllAudioTracks        ) 'cbShowAllAudioTracks
1083        root.AppendChild(doc, "DisplayDefaultSubtitleLang"  , DisplayDefaultSubtitleLang) 'cbDisplayDefaultSubtitleLang
1084        root.AppendChild(doc, "DisplayAllSubtitleLang"      , DisplayAllSubtitleLang    ) 'cbDisplayAllSubtitleLang
1085        root.AppendChild(doc, "GenreCustomBefore"           , GenreCustomBefore         ) 'cbGenreCustomBefore
1086        root.AppendChild(doc, "CustomTmdbApiKey"            , CustomTmdbApiKey          ) 'tbTMDbAPI
1087        root.AppendChild(doc, "MovNfoWatchTag"              , MovNfoWatchTag            ) 'cbMovNfoWatchTag
1088        
1089        If Not String.IsNullOrEmpty(font) Then
1090            root.AppendChild(doc, "font", font)                                 'Button96
1091        End If
1092
1093        For Each com In commandlist
1094            If com.command <> "" And com.title <> "" Then
1095                child = doc.CreateElement("comms")
1096                childchild = doc.CreateElement("title")
1097                childchild.InnerText = com.title
1098                child.AppendChild(childchild)
1099                childchild = doc.CreateElement("command")
1100                childchild.InnerText = com.command
1101                child.AppendChild(childchild)
1102                root.AppendChild(child)
1103            End If
1104        Next
1105        
1106        'Movie Prefs ------------------------------------------------------------
1107        root.AppendChild(doc, "DownloadTrailerDuringScrape",        DownloadTrailerDuringScrape)        'cbDlTrailerDuringScrape
1108        root.AppendChild(doc, "gettrailer",                         gettrailer)                         'CheckBox11
1109        root.AppendChild(doc, "ignoretrailers",                     ignoretrailers)                     'set from frmOptions - obsolete
1110        root.AppendChild(doc, "moviescraper",                       moviescraper)                       'set from frmOptions - obsolete
1111        root.AppendChild(doc, "nfoposterscraper",                   nfoposterscraper)                   'IMPA_chk,mpdb_chk,tmdb_chk,imdb_chk
1112        root.AppendChild(doc, "alwaysuseimdbid",                    alwaysuseimdbid)                    'set from frmOptions - obsolete
1113        root.AppendChild(doc, "ignoreactorthumbs",                  ignoreactorthumbs)                  'set from frmOptions - obsolete
1114        root.AppendChild(doc, "maxactors",                          maxactors)                          'ComboBox7
1115        root.AppendChild(doc, "MovTagBlacklist",                    MovTagBlacklist)                    'tb_MovTagBlacklist
1116        root.AppendChild(doc, "maxmoviegenre",                      maxmoviegenre)                      'cmbxMovScraper_MaxGenres
1117        root.AppendChild(doc, "enablehdtags",                       enablehdtags)                       'CheckBox19
1118        root.AppendChild(doc, "MovDurationAsRuntine",               MovDurationAsRuntine)               'cb_MovDurationAsRuntine
1119        root.AppendChild(doc, "MovRuntimeAsDuration",               MovRuntimeAsDuration)               'cb_MovRuntimeAsDuration
1120        root.AppendChild(doc, "movieruntimedisplay",                movieRuntimeDisplay)                'rbRuntimeScraper
1121        root.AppendChild(doc, "movieRuntimeFallbackToFile",         movieRuntimeFallbackToFile)         'cbMovieRuntimeFallbackToFile
1122        root.AppendChild(doc, "fanartnotstacked",                   fanartnotstacked)                   'set fr

Large files files are truncated, but you can click here to view the full file