Esempio n. 1
0
 /// <summary>
 /// Loads the PlayOn settings from the local computer's registry.
 /// </summary>
 void LoadPlayOnSettings()
 {
     MediaStorageLocation = PlayOnSettings.GetMediaStorageLocation();
     if (MediaStorageLocation == "")
     {
         throw new Exception("Unable to find PlayLater's Media Storage Location");
     }
     MediaFileExt = PlayOnSettings.GetPlayLaterVideoFormat();
 }
Esempio n. 2
0
        /// <summary>
        ///     Initializes the Queue List with custom settings
        /// </summary>
        public void Initialize(string connectionString)
        {
            var parser = new DbConnectionStringBuilder {
                ConnectionString = connectionString
            };

            if (parser.ContainsKey("Data Source"))
            {
                _skipFilePath = parser["Data Source"].ToString();
            }
            else
            {
                var mediaStorageLocation = PlayOnSettings.GetMediaStorageLocation();
                if (mediaStorageLocation == "")
                {
                    throw new Exception("Unable to find PlayLater's Media Storage Location");
                }
                _skipFilePath = mediaStorageLocation;
            }
            if (!Directory.Exists(_skipFilePath))
            {
                throw new Exception(String.Format("Queue List data path does not exists: {0}", _skipFilePath));
            }
        }