public void SaveMovieEpisode(SubMovieItem movie) { if (movie == null) { throw new ArgumentNullException("SubMovieItem"); } _repoMovie.Update(movie); }
public void InsertMovieEpisode(SubMovieItem movie) { if (movie == null) { throw new ArgumentNullException("InsertMovieEpisode"); } _repoMovie.Insert(movie); }
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); }
private async Task <string> ParseGoogleUrl(SubMovieItem episode) { return("http://clips.vorwaerts-gmbh.de/VfE_html5.mp4"); // sample video :D }