private RemoteMovie GetRemoteMovie(PendingRelease release) { var movie = _movieService.GetMovie(release.MovieId); //Just in case the series was removed, but wasn't cleaned up yet (housekeeper will clean it up) if (movie == null) { return(null); } // var episodes = _parsingService.GetMovie(release.ParsedMovieInfo.MovieTitle); return(new RemoteMovie { Movie = movie, ParsedMovieInfo = release.ParsedMovieInfo, Release = release.Release }); }
private RemoteEpisode GetRemoteEpisode(PendingRelease release) { var series = _seriesService.GetSeries(release.SeriesId); //Just in case the series was removed, but wasn't cleaned up yet (housekeeper will clean it up) if (series == null) { return(null); } var episodes = _parsingService.GetEpisodes(release.ParsedEpisodeInfo, series, true); return(new RemoteEpisode { Series = series, Episodes = episodes, ParsedEpisodeInfo = release.ParsedEpisodeInfo, Release = release.Release }); }
private void Insert(DownloadDecision decision) { var release = new PendingRelease { MovieId = decision.RemoteMovie.Movie.Id, ParsedMovieInfo = decision.RemoteMovie.ParsedMovieInfo, Release = decision.RemoteMovie.Release, Title = decision.RemoteMovie.Release.Title, Added = DateTime.UtcNow }; if (release.ParsedMovieInfo == null) { _logger.Warn("Pending release {0} does not have ParsedMovieInfo, will cause issues.", release.Title); } _repository.Insert(release); _eventAggregator.PublishEvent(new PendingReleasesUpdatedEvent()); }
private int GetQueueId(PendingRelease pendingRelease, Episode episode) { return(HashConverter.GetHashInt31(string.Format("pending-{0}-ep{1}", pendingRelease.Id, episode.Id))); }
private void Delete(PendingRelease pendingRelease) { _repository.Delete(pendingRelease); _eventAggregator.PublishEvent(new PendingReleasesUpdatedEvent()); }
private int GetQueueId(PendingRelease pendingRelease, Album album) { return(HashConverter.GetHashInt31(string.Format("pending-{0}-album{1}", pendingRelease.Id, album.Id))); }
private int GetQueueId(PendingRelease pendingRelease, Movie movie) { return(HashConverter.GetHashInt31(string.Format("pending-{0}-movie{1}", pendingRelease.Id, movie.Id))); }
private int GetQueueId(PendingRelease pendingRelease, Book book) { return(HashConverter.GetHashInt31(string.Format("pending-{0}-book{1}", pendingRelease.Id, book.Id))); }