private void LoadProperties() { InitDefaults(); if (mpi_file == null) { return; } if (mpi_file.HasGroup(StorageGroup)) { if (mpi_file.HasKey(StorageGroup, "FolderDepth")) { FolderDepth = mpi_file.GetInteger(StorageGroup, "FolderDepth"); } if (mpi_file.HasKey(StorageGroup, "PlaylistPath")) { PlaylistPaths = mpi_file.GetStringList(StorageGroup, "PlaylistPath"); } if (mpi_file.HasKey(StorageGroup, "AudioFolders")) { AudioFolders = mpi_file.GetStringList(StorageGroup, "AudioFolders"); } } if (mpi_file.HasGroup(MediaGroup)) { if (mpi_file.HasKey(MediaGroup, "InputFormats")) { InputFormats = mpi_file.GetStringList(MediaGroup, "InputFormats"); } if (mpi_file.HasKey(MediaGroup, "OutputFormats")) { OutputFormats = mpi_file.GetStringList(MediaGroup, "OutputFormats"); } } if (mpi_file.HasGroup(PlaylistGroup)) { if (mpi_file.HasKey(PlaylistGroup, "Formats")) { PlaylistFormats = mpi_file.GetStringList(PlaylistGroup, "Formats") ?? new string [] {}; } if (mpi_file.HasKey(PlaylistGroup, "FolderSeparator")) { string folder_separator = mpi_file.GetString(PlaylistGroup, "FolderSeparator"); if (folder_separator == "DOS") { FolderSeparator = Paths.Folder.DosSeparator; } } } if (mpi_file.HasGroup(DeviceGroup) && mpi_file.HasKey(DeviceGroup, "AccessProtocols")) { AccessProtocols = mpi_file.GetStringList(DeviceGroup, "AccessProtocols") ?? new string [] {}; } }