Пример #1
0
        public HttpResponseMessage Post(PlayInput data)
        {
            var account = base.SuperplayerRequestContext.Account;
            var now = DateTime.Now.EnsureAsUtc().ClearSeconds().ClearMilliSeconds();

            var geolocation = base.GeoCoordenate;
            try
            {
                var result = new TrackProjectionWrapper
                {
                    Tracks = GetTracks(data.PlaylistsId, account, now, geolocation),
                };
                return Request.CreateResponse(HttpStatusCode.OK, result);
            }
            finally
            {
                SavePlayedPlaylists(data.PlaylistsId, account, geolocation);
            }
        }
Пример #2
0
        public HttpResponseMessage Post(PlayInput data)
        {
            var account = base.SuperplayerRequestContext.Account;
            var now     = DateTime.Now.EnsureAsUtc().ClearSeconds().ClearMilliSeconds();

            var geolocation = base.GeoCoordenate;

            try
            {
                var result = new TrackProjectionWrapper
                {
                    Tracks = GetTracks(data.PlaylistsId, account, now, geolocation),
                };
                return(Request.CreateResponse(HttpStatusCode.OK, result));
            }
            finally
            {
                SavePlayedPlaylists(data.PlaylistsId, account, geolocation);
            }
        }