Exemplo n.º 1
0
 public JsonResult CheckTypeMediaSrcInPlaylist(int id)
 {
     try
     {
         IMediaSrcService mediaSrcService = DependencyUtils.Resolve <IMediaSrcService>();
         var mediaType = mediaSrcService.Get(id).TypeID;
         var mediaURL  = mediaSrcService.Get(id).URL;
         return(Json(new
         {
             mediaURL = mediaURL,
             mediaType = mediaType,
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public JsonResult GetUrlAllMediaSrc()
 {
     try
     {
         IPlaylistItemService playlistItemService = DependencyUtils.Resolve <IPlaylistItemService>();
         var playlistItem = playlistItemService.Get().ToList();
         IMediaSrcService mediaSrcService = DependencyUtils.Resolve <IMediaSrcService>();
         var mediaType = mediaSrcService.Get(playlistItem).TypeID;
         var mediaURL  = mediaSrcService.Get(playlistItem).URL;
         return(Json(new
         {
             mediaURL = mediaURL,
             mediaType = mediaType,
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }