Esempio n. 1
0
            public bool AddSong(WebServer server, HttpListenerContext context, string type, string link, string requester, string title)
            {
                type      = context.Request.Url.Segments[4];
                link      = context.Request.Url.Segments[5];
                requester = context.Request.Url.Segments[6];
                title     = context.Request.Url.Segments[7];
                try
                {
                    switch (type)
                    {
                    case "AAC":
                        return(Instance.AddEqueue(Instance.SongType.AAC, link, requester, title));

                    case "MP3":
                        return(Instance.AddEqueue(Instance.SongType.MP3, link, requester, title));

                    default:
                        return(false);
                    }
                }
                catch (Exception ex)
                {
                    return(context.JsonExceptionResponse(ex));
                }
            }