public LibGenMovieRepository( SourceRepository sourceRepository, MediaItemRepository mediaItemRepository, LibGenFactory libGenFactory ) { this.SourceRepository = sourceRepository; this.MediaItemRepository = mediaItemRepository; this.LibGenFactory = libGenFactory; }
public MovieRepository( LibGenMovieRepository libGenMovieRepository, MediaItemRepository mediaItemRepository, UserRepository userRepository, Utility utility ) : base() { this.LibGenMovieRepository = libGenMovieRepository; this.Utility = utility; this.TableName = "Movies"; this.AllColumnNames = new[] { //actual columns "id", "folderPath", "videoPath", "title", "sortTitle", "shortSummary", "summary", "rating", "releaseYear", "runtimeSeconds", "tmdbId", "sourceId", "completionSeconds", "posterCount", "backdropCount", //derived columns "resumeSeconds", "progressPercentage", "posterUrls", "backdropUrls" }; this.AlwaysIncludedColumnNames = new[] { "id", "videoPath" }; this.Aliases.Add("posterUrls", "posterCount"); this.Aliases.Add("backdropUrls", "backdropCount"); this.PostQueryProcessors.Add(new PostQueryProcessor <Movie>(new[] { "resumeSeconds", "progressPercentage" }, new[] { "runtimeSeconds" }, async(models) => { await mediaItemRepository.FetchProgressSeconds(userRepository.CurrentProfileId, models); return(models); })); }
public LibGenTvShowRepository( MediaItemRepository MediaItemRepository ) { this.MediaItemRepository = MediaItemRepository; }