public ServerDirectory(PlayoutServer server)
     : base()
 {
     Server = server;
     Extensions = new string[MediaDirectory.VideoFileTypes.Length + MediaDirectory.StillFileTypes.Length];
     MediaDirectory.VideoFileTypes.CopyTo(Extensions, 0);
     MediaDirectory.StillFileTypes.CopyTo(Extensions, MediaDirectory.VideoFileTypes.Length);
 }
 internal static void ServerLoadMediaDirectory(AnimationDirectory directory, PlayoutServer server)
 {
     Debug.WriteLine(directory, "ServerLoadMediaDirectory animation started");
     if (Connect())
     {
         MySqlCommand cmd = new MySqlCommand("SELECT * FROM tas.serverMedia WHERE idServer=@idServer and typMedia = @typMedia", connection);
         cmd.Parameters.AddWithValue("@idServer", server.idServer);
         cmd.Parameters.AddWithValue("@typMedia", TMediaType.AnimationFlash);
         try
         {
             lock (connection)
             {
                 using (MySqlDataReader dataReader = cmd.ExecuteReader())
                 {
                     while (dataReader.Read())
                     {
                         ServerMedia nm = new ServerMedia()
                         {
                             idPersistentMedia = dataReader.GetUInt64("idServerMedia"),
                             Directory = directory,
                         };
                         _mediaReadFields(dataReader, nm);
                         if (nm.MediaStatus != TMediaStatus.Available)
                         {
                             nm.MediaStatus = TMediaStatus.Unknown;
                             ThreadPool.QueueUserWorkItem(o => nm.Verify());
                         }
                     }
                     dataReader.Close();
                 }
             }
             Debug.WriteLine(directory, "Directory loaded");
         }
         catch (Exception e)
         {
             Debug.WriteLine(directory, e.Message);
         }
     }
 }
 public AnimationDirectory(PlayoutServer server)
 {
     Server = server;
 }