예제 #1
0
 public void SaveMovieEpisode(SubMovieItem movie)
 {
     if (movie == null)
     {
         throw new ArgumentNullException("SubMovieItem");
     }
     _repoMovie.Update(movie);
 }
예제 #2
0
 public void InsertMovieEpisode(SubMovieItem movie)
 {
     if (movie == null)
     {
         throw new ArgumentNullException("InsertMovieEpisode");
     }
     _repoMovie.Insert(movie);
 }
예제 #3
0
        public static SubMovieItemModel ToModel(this SubMovieItem entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new SubMovieItemModel
            {
                Id        = entity.Id,
                Name      = entity.Name,
                Source    = entity.Source,
                SourceUrl = entity.SourceUrl,
                GoogleUrlGeneratedDate = entity.GoogleUrlGeneratedDate,
                CreatedDate            = entity.CreatedDate,
                GoogleUrl = entity.GoogleUrl,
                Quality   = entity.Quality,
                View      = entity.View,
            };
            var tp = DateTime.Now - entity.GoogleUrlGeneratedDate;

            model.GoogleUrl = tp.TotalMinutes < 170 ? entity.GoogleUrl : "";
            return(model);
        }
예제 #4
0
 private async Task <string> ParseGoogleUrl(SubMovieItem episode)
 {
     return("http://clips.vorwaerts-gmbh.de/VfE_html5.mp4");   // sample  video :D
 }