Example #1
0
 void Playlist_PlaylistEmpty()
 {
     LogConsole.Break();
     LogConsole.Write("No more Tracks on Playlist: " + this.Id);
     this.Playlist.CurrentTrack = null;
     this.MediaServer.Pause();
     Thread.Sleep(5);
     this.MediaServer.ClearBuffer();
 }
Example #2
0
        public string Execute()
        {
            User newUser = UserManager.CreateUser(this.Parameters[0]);

            LogConsole.WriteLine("// EXECUTED " + this.CommandWord + " " + this.Parameters[0] + " //");
            LogConsole.WriteLine("// NEW USER: UID/GID " + " ::: " + newUser.UserId + " / " + newUser.GoogleId + " //");
            LogConsole.Break();

            return(newUser.UserId);
        }
Example #3
0
        public string Execute()
        {
            string message      = string.Empty;
            string preUpdateGid = UserManager.UpdateUser(this.Parameters[0], this.Parameters[1]);

            LogConsole.WriteLine("// EXECUTED " + this.CommandWord + " " + this.Parameters[0] + " //");
            LogConsole.WriteLine("// CHANGED GOOGLEID ON USER #" + this.Parameters[0] + " ::: " + preUpdateGid + " >>> " + this.Parameters[1] + " //");
            LogConsole.Break();
            return(message);
        }
Example #4
0
 public string Execute()
 {
     if (SessionManager.SessionExists(this.Parameters[1]))
     {
         UserManager.AssignUser(this.Parameters[1], this.Parameters[0], false);
         LogConsole.WriteLine("// EXECUTED " + this.CommandWord + " " + this.Parameters[0] + " " + this.Parameters[1] + " //");
         LogConsole.WriteLine("// ASSIGNED USER #" + this.Parameters[0] + " TO SESSION " + this.Parameters[1] + " //");
         LogConsole.Break();
         return(string.Empty);
     }
     else
     {
         LogConsole.WriteLine("// EXECUTED " + this.CommandWord + " " + this.Parameters[0] + " " + this.Parameters[1] + " //");
         LogConsole.WriteLine("// ERROR ::: SESSION " + this.Parameters[1] + " DOES NOT EXIST //");
         LogConsole.Break();
         return("ERROR");
     }
 }
Example #5
0
        public string Execute()
        {
            LogConsole.Break();
            string  message    = string.Empty;
            Session newSession = new Session();

            if (SessionManager.AddSession(newSession, this.Parameters[0], true) == true)
            {
                LogConsole.Write(newSession.Details());
                message = newSession.Id + "&" + newSession.MediaServer.GetPortNumber().ToString();
            }
            else
            {
                newSession.Stop();
                newSession.Terminate();
                LogConsole.WriteLine("// EXECUTED " + this.CommandWord + " " + this.Parameters[0] + " //");
                LogConsole.WriteLine("// ERROR ::: USER IS ALREADY REGISTERD AS HOST " + " //");
                LogConsole.Break();
                message = "ERROR";
            }
            return(message);
        }