Пример #1
0
 public HomeController(IArtistService artistService, ISongService songService, IUserService userService, IRoleService roleService)
 {
     this._userService = userService;
     this._artistService = artistService;
     this._songService = songService;
     this._roleService = roleService;
 }
Пример #2
0
        public ReleaseModule(IAlbumService albumService,
                             IArtistService artistService,
                             IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IParsingService parsingService,
                             IDownloadService downloadService,
                             ICacheManager cacheManager,
                             Logger logger)
        {
            _albumService               = albumService;
            _artistService              = artistService;
            _rssFetcherAndParser        = rssFetcherAndParser;
            _nzbSearchService           = nzbSearchService;
            _downloadDecisionMaker      = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _parsingService             = parsingService;
            _downloadService            = downloadService;
            _logger = logger;

            GetResourceAll = GetReleases;
            Post("/", x => DownloadRelease(ReadResourceFromRequest()));

            PostValidator.RuleFor(s => s.IndexerId).ValidId();
            PostValidator.RuleFor(s => s.Guid).NotEmpty();

            _remoteAlbumCache = cacheManager.GetCache <RemoteAlbum>(GetType(), "remoteAlbums");
        }
Пример #3
0
        public ArtistsListQueryHandler(IArtistService artistService, IMapper mapper, ILogger <ArtistsListQueryHandler> log)
        {
            _artistService = artistService;
            _mapper        = mapper;

            _log = log;
        }
Пример #4
0
        public async Task GetTopArtists_PaginationTest_ReturnsLessOrEqualAmountOfItems(int page, int itemsPerPage) {
            IArtistService artistService = GetArtistService();

            var artists = await artistService.GetTopArtists(page, itemsPerPage);

            Assert.False(artists.Count > itemsPerPage, "collection size is greater than expected");
        }
Пример #5
0
        public async Task GetSimilarArtists_ResponseTest_ReturnsNotEmptyCollection(string name) {
            IArtistService artistService = GetArtistService();

            var artists = await artistService.GetSimilarArtists(name);

            Assert.NotEmpty(artists);
        }
Пример #6
0
 public RefreshAlbumService(IAlbumService albumService,
                            IArtistService artistService,
                            IAddArtistService addArtistService,
                            IArtistMetadataService artistMetadataService,
                            IReleaseService releaseService,
                            IProvideAlbumInfo albumInfo,
                            IRefreshAlbumReleaseService refreshAlbumReleaseService,
                            IMediaFileService mediaFileService,
                            IHistoryService historyService,
                            IEventAggregator eventAggregator,
                            ICheckIfAlbumShouldBeRefreshed checkIfAlbumShouldBeRefreshed,
                            IMapCoversToLocal mediaCoverService,
                            Logger logger)
     : base(logger, artistMetadataService)
 {
     _albumService                  = albumService;
     _artistService                 = artistService;
     _addArtistService              = addArtistService;
     _releaseService                = releaseService;
     _albumInfo                     = albumInfo;
     _refreshAlbumReleaseService    = refreshAlbumReleaseService;
     _mediaFileService              = mediaFileService;
     _historyService                = historyService;
     _eventAggregator               = eventAggregator;
     _checkIfAlbumShouldBeRefreshed = checkIfAlbumShouldBeRefreshed;
     _mediaCoverService             = mediaCoverService;
     _logger = logger;
 }
Пример #7
0
 public AlbumStudioModule(IArtistService artistService, IAlbumMonitoredService albumMonitoredService)
     : base("/albumstudio")
 {
     _artistService         = artistService;
     _albumMonitoredService = albumMonitoredService;
     Post("/", artist => UpdateAll());
 }
Пример #8
0
 public AlbumFacade(IAlbumService albumService, IArtistService artistService, IAlbumReviewService albumReviewService, ISongService songService)
 {
     this.albumService       = albumService;
     this.artistService      = artistService;
     this.albumReviewService = albumReviewService;
     this.songService        = songService;
 }
Пример #9
0
 public RefreshArtistService(IProvideArtistInfo artistInfo,
                             IArtistService artistService,
                             IArtistMetadataService artistMetadataService,
                             IAlbumService albumService,
                             IRefreshAlbumService refreshAlbumService,
                             IEventAggregator eventAggregator,
                             IMediaFileService mediaFileService,
                             IHistoryService historyService,
                             IDiskScanService diskScanService,
                             ICheckIfArtistShouldBeRefreshed checkIfArtistShouldBeRefreshed,
                             IConfigService configService,
                             IImportListExclusionService importListExclusionService,
                             Logger logger)
     : base(logger, artistMetadataService)
 {
     _artistInfo                     = artistInfo;
     _artistService                  = artistService;
     _albumService                   = albumService;
     _refreshAlbumService            = refreshAlbumService;
     _eventAggregator                = eventAggregator;
     _mediaFileService               = mediaFileService;
     _historyService                 = historyService;
     _diskScanService                = diskScanService;
     _checkIfArtistShouldBeRefreshed = checkIfArtistShouldBeRefreshed;
     _configService                  = configService;
     _importListExclusionService     = importListExclusionService;
     _logger = logger;
 }
Пример #10
0
 public ArtistController(
     IArtistService artistService,
     IDtoParseService dtoParseService)
 {
     _artistService   = artistService;
     _dtoParseService = dtoParseService;
 }
Пример #11
0
        public AlbumModule(IArtistService artistService,
                           IAlbumService albumService,
                           IAddAlbumService addAlbumService,
                           IReleaseService releaseService,
                           IArtistStatisticsService artistStatisticsService,
                           IMapCoversToLocal coverMapper,
                           IUpgradableSpecification upgradableSpecification,
                           IBroadcastSignalRMessage signalRBroadcaster,
                           QualityProfileExistsValidator qualityProfileExistsValidator,
                           MetadataProfileExistsValidator metadataProfileExistsValidator)

            : base(albumService, artistStatisticsService, coverMapper, upgradableSpecification, signalRBroadcaster)
        {
            _artistService   = artistService;
            _releaseService  = releaseService;
            _addAlbumService = addAlbumService;

            GetResourceAll = GetAlbums;
            CreateResource = AddAlbum;
            UpdateResource = UpdateAlbum;
            DeleteResource = DeleteAlbum;
            Put("/monitor", x => SetAlbumsMonitored());

            PostValidator.RuleFor(s => s.ForeignAlbumId).NotEmpty();
            PostValidator.RuleFor(s => s.Artist.QualityProfileId).SetValidator(qualityProfileExistsValidator);
            PostValidator.RuleFor(s => s.Artist.MetadataProfileId).SetValidator(metadataProfileExistsValidator);
            PostValidator.RuleFor(s => s.Artist.RootFolderPath).IsValidPath().When(s => s.Artist.Path.IsNullOrWhiteSpace());
            PostValidator.RuleFor(s => s.Artist.ForeignArtistId).NotEmpty();
        }
Пример #12
0
 public SongController(IMapper mapper, ISongService songService, IGenreService genreService, IArtistService artistService)
 {
     _mapper        = mapper;
     _songService   = songService;
     _genreService  = genreService;
     _artistService = artistService;
 }
Пример #13
0
 public ImportApprovedTracks(IUpgradeMediaFiles trackFileUpgrader,
                             IMediaFileService mediaFileService,
                             IAudioTagService audioTagService,
                             ITrackService trackService,
                             IArtistService artistService,
                             IAddArtistService addArtistService,
                             IAlbumService albumService,
                             IRefreshAlbumService refreshAlbumService,
                             IRootFolderService rootFolderService,
                             IRecycleBinProvider recycleBinProvider,
                             IExtraService extraService,
                             IDiskProvider diskProvider,
                             IReleaseService releaseService,
                             IEventAggregator eventAggregator,
                             IManageCommandQueue commandQueueManager,
                             Logger logger)
 {
     _trackFileUpgrader   = trackFileUpgrader;
     _mediaFileService    = mediaFileService;
     _audioTagService     = audioTagService;
     _trackService        = trackService;
     _artistService       = artistService;
     _addArtistService    = addArtistService;
     _albumService        = albumService;
     _refreshAlbumService = refreshAlbumService;
     _rootFolderService   = rootFolderService;
     _recycleBinProvider  = recycleBinProvider;
     _extraService        = extraService;
     _diskProvider        = diskProvider;
     _releaseService      = releaseService;
     _eventAggregator     = eventAggregator;
     _commandQueueManager = commandQueueManager;
     _logger = logger;
 }
Пример #14
0
 public ManualImportService(IDiskProvider diskProvider,
                            IParsingService parsingService,
                            IDiskScanService diskScanService,
                            IMakeImportDecision importDecisionMaker,
                            IArtistService artistService,
                            IAlbumService albumService,
                            IReleaseService releaseService,
                            ITrackService trackService,
                            IAudioTagService audioTagService,
                            IImportApprovedTracks importApprovedTracks,
                            ITrackedDownloadService trackedDownloadService,
                            IDownloadedTracksImportService downloadedTracksImportService,
                            IEventAggregator eventAggregator,
                            Logger logger)
 {
     _diskProvider                  = diskProvider;
     _parsingService                = parsingService;
     _diskScanService               = diskScanService;
     _importDecisionMaker           = importDecisionMaker;
     _artistService                 = artistService;
     _albumService                  = albumService;
     _releaseService                = releaseService;
     _trackService                  = trackService;
     _audioTagService               = audioTagService;
     _importApprovedTracks          = importApprovedTracks;
     _trackedDownloadService        = trackedDownloadService;
     _downloadedTracksImportService = downloadedTracksImportService;
     _eventAggregator               = eventAggregator;
     _logger = logger;
 }
Пример #15
0
 public AlbumController(IAlbumService albumService, ILogService log, IArtistService artistService, IHubContext <ArtistHub> artistHub)
 {
     _albumService  = albumService;
     _logger        = log;
     _artistService = artistService;
     _artistHub     = artistHub;
 }
Пример #16
0
 public ArtistController(IArtistService artistService, ILogger <ArtistController> logger, ICacheManager cacheManager,
                         UserManager <User> userManager, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     Logger        = logger;
     ArtistService = artistService;
 }
Пример #17
0
        public ArtistServiceTests()
        {
            _musicBrainzServiceMock = new Mock <IMusicBrainzService>();
            _lyricsOvhServiceMock   = new Mock <ILyricsOvhService>();

            _artistService = new ArtistService(_musicBrainzServiceMock.Object, _lyricsOvhServiceMock.Object);
        }
        public ChangeArtistViewModel(IMvxNavigationService navigationService, IUserDialogs userDialogs, IValidator validator, IArtistService artistService, IBottomNavigationViewModelService bottomNavigationViewModelService, ITopNavigationViewModelService topNavigationViewModelService)
        {
            _navigationService                = navigationService;
            _topNavigationViewModelService    = topNavigationViewModelService;
            _bottomNavigationViewModelService = bottomNavigationViewModelService;

            _userDialogs = userDialogs;

            _validationHelper = new ValidationHelper(validator, this, Errors.Value, (propertyName) => { FocusName.Value = propertyName; });

            _artistService = artistService;

            ValidateNameCommand = new MvxCommand(() => _validationHelper.Validate(() => Name));

            InitValidationCommand = new MvxCommand(() => {
                _validationHelper.ResetValidation();
            });

            ChangeCommand = new MvxCommand(() =>
            {
                if (!IsTaskExecutedValueConverter.Convert(ChangeTask.Value))
                {
                    ChangeTask.Value = NotifyTaskCompletion.Create(AttemptChangeAsync);
                }
            });
        }
Пример #19
0
 public ImportListSyncService(IImportListFactory importListFactory,
                              IImportListExclusionService importListExclusionService,
                              IFetchAndParseImportList listFetcherAndParser,
                              ISearchForNewAlbum albumSearchService,
                              ISearchForNewArtist artistSearchService,
                              IArtistService artistService,
                              IAlbumService albumService,
                              IAddArtistService addArtistService,
                              IAddAlbumService addAlbumService,
                              IEventAggregator eventAggregator,
                              IManageCommandQueue commandQueueManager,
                              Logger logger)
 {
     _importListFactory          = importListFactory;
     _importListExclusionService = importListExclusionService;
     _listFetcherAndParser       = listFetcherAndParser;
     _albumSearchService         = albumSearchService;
     _artistSearchService        = artistSearchService;
     _artistService       = artistService;
     _albumService        = albumService;
     _addArtistService    = addArtistService;
     _addAlbumService     = addAlbumService;
     _eventAggregator     = eventAggregator;
     _commandQueueManager = commandQueueManager;
     _logger = logger;
 }
Пример #20
0
 public AlbumMonitoredService(IArtistService artistService, IAlbumService albumService, ITrackService trackService, Logger logger)
 {
     _artistService = artistService;
     _albumService  = albumService;
     _trackService  = trackService;
     _logger        = logger;
 }
Пример #21
0
 public ArtistController(IArtistService artistService, ILoggerFactory logger, ICacheManager cacheManager,
                         UserManager <ApplicationUser> userManager, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     this.Logger        = logger.CreateLogger("RoadieApi.Controllers.ArtistController");
     this.ArtistService = artistService;
 }
Пример #22
0
 public RootFolderCheck(IArtistService artistService, IImportListFactory importListFactory, IDiskProvider diskProvider, IRootFolderService rootFolderService)
 {
     _artistService     = artistService;
     _importListFactory = importListFactory;
     _diskProvider      = diskProvider;
     _rootFolderService = rootFolderService;
 }
 public AuthorsController(ICategoriesService categoriesService,
                          IArtistService artistService, IQuotesService quotesService) : base(categoriesService, artistService)
 {
     this.categoriesService = categoriesService;
     this.artistService     = artistService;
     this.quotesService     = quotesService;
 }
Пример #24
0
 public QualityProfileService(IProfileRepository profileRepository, IArtistService artistService, IImportListFactory importListFactory, Logger logger)
 {
     _profileRepository = profileRepository;
     _artistService     = artistService;
     _importListFactory = importListFactory;
     _logger            = logger;
 }
Пример #25
0
 public ArtistServiceTests()
 {
     _context = InterviewContextFactory.Create();
     _mapper  = AutoMapperFactory.Create();
     _authorizationService = new AuthorizationService();
     _artistService        = new ArtistService(_context, _mapper, _authorizationService);
 }
Пример #26
0
 public SitemapController(ISitemapXml sitemapXml, IPersonService personService, IArtistService artistService, ISongService songService, ISpaRouteService spaRouteService)
 {
     this.sitemapXml      = sitemapXml;
     this.personService   = personService;
     this.artistService   = artistService;
     this.songService     = songService;
     this.spaRouteService = spaRouteService;
 }
Пример #27
0
 public ArtistEditorModule(IArtistService artistService, IManageCommandQueue commandQueueManager)
     : base("/artist/editor")
 {
     _artistService       = artistService;
     _commandQueueManager = commandQueueManager;
     Put("/", artist => SaveAll());
     Delete("/", artist => DeleteArtist());
 }
Пример #28
0
        public ArtistEditViewModel(IMvxNavigationService navigationService, IArtistService artistService, IAlbumService albumSvc)
        {
            _navSvc    = navigationService;
            _artistSvc = artistService;
            _albumSvc  = albumSvc;

            _albums = new MvxObservableCollection <Album>();
        }
Пример #29
0
 public ArtistViewModel(IArtistService artistService, ICategoryService categoryService,
     ICountryService countryService, Artist artist)
 {
     this.artistService = artistService;
     this.categoryService = categoryService;
     this.countryService = countryService;
     this.artist = artist;
 }
Пример #30
0
 internal ArtistViewModel(IViewService viewService, IArtistService artistService, IAlbumService albumService, IAlbumFactory albumFactory, IDialogService dialogService)
 {
     _viewService   = viewService;
     _artistService = artistService;
     _albumService  = albumService;
     _albumFactory  = albumFactory;
     _dialogService = dialogService;
 }
Пример #31
0
        public SongService(DatabaseSettings databaseSettings, IArtistService artistService)
        {
            var client   = new MongoClient(databaseSettings.ConnectionString);
            var database = client.GetDatabase(databaseSettings.DatabaseName);

            _songs         = database.GetCollection <Song>(databaseSettings.SongsCollectionName);
            _artistService = artistService;
        }
Пример #32
0
 public TrackModule(IArtistService artistService,
                    ITrackService trackService,
                    IUpgradableSpecification upgradableSpecification,
                    IBroadcastSignalRMessage signalRBroadcaster)
     : base(trackService, artistService, upgradableSpecification, signalRBroadcaster)
 {
     GetResourceAll = GetTracks;
 }
Пример #33
0
        public ArtistsController(
                IArtistService artistSvc
            )
        {
            if (artistSvc == null)
                throw new ArgumentNullException("artistSvc");

            _artistSvc = artistSvc;
        }
Пример #34
0
        public AlbumsController(
                IGenreService genreSvc,
                IArtistService artistSvc,
                IAlbumService albumSvc
            )
        {
            if (genreSvc == null)
                throw new ArgumentNullException("genreSvc");
            if (artistSvc == null)
                throw new ArgumentNullException("artistSvc");
            if (albumSvc == null)
                throw new ArgumentNullException("albumSvc");

            _genreSvc = genreSvc;
            _artistSvc = artistSvc;
            _albumSvc = albumSvc;
        }
        public ArtistManagementViewModel(IArtistService artistService, ICategoryService categoryService, ICountryService countryService)
        {
            this.artistService = artistService;
            this.categoryService = categoryService;
            this.countryService = countryService;

            Artists = new ObservableCollection<ArtistViewModel>();
            Categories = new ObservableCollection<Category>();
            Countries = new ObservableCollection<Country>();

            NameInput = "";
            EmailInput = "";
            if(Categories.Count > 0) {
                CategoryInput = Categories[0];
            }
            if(Countries.Count > 0) {
                CountryInput = Countries[0];
            }

            UpdateCategories();
            UpdateArtists();
            UpdateCountries();
        }
 public ApiController()
 {
     artistService = new ArtistService();
     Global.SetGlobalUri();
 }
        public PerformanceManagementViewModel(IPerformanceService performanceService, IArtistService artistService, IVenueService venueService)
        {
            this.performanceService = performanceService;
            this.artistService = artistService;
            this.venueService = venueService;

            PerformancesForDay = new ObservableCollection<PerformanceViewModel>();
            Venues = new ObservableCollection<Venue>();
            Artists = new ObservableCollection<Artist>();
            CurrentDay = new DisplayDateTime(DateTime.Now);

            UpdatePerformancesForDay();
            UpdateVenues();
            UpdateArtists();

            DateTime now = DateTime.Now;
            timeInput = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
            if(Venues.Count > 0) {
                VenueInput = Venues[0];
            }
            if(Artists.Count > 0) {
                ArtistInput = Artists[0];
            }

            CurrentDay.PropertyChanged += CurrentDay_PropertyChanged;
        }
Пример #38
0
 public ArtistsV1Controller(IArtistService artistService)
 {
     Guard.NotNull(artistService, nameof(artistService));
     
     _artistService = artistService;
 }
Пример #39
0
 public SongController(ISongService songService, IGenreService genreService, IArtistService artistService)
 {
     this._artistService = artistService;
     this._songService = songService;
     this._genreService = genreService;
 }
        private IArtistService _artistService; //new ArtistManager();

        #endregion Fields

        #region Constructors

        public ArtistServiceClient(IArtistService artistService)
        {
            _artistService = artistService;
        }
Пример #41
0
 public ArtistController(IArtistService artistService, ISongService songService)
 {
     this._artistService = artistService;
     this._songService = songService;
 }
 public ArtistController()
 {
     var db = new MediaSystemContext();
     this.artistService = new ArtistService(new EfGenericRepository<Artist>(db), new EfGenericRepository<Country>(db));
 }
Пример #43
0
 public AlbumController(IAlbumService albumService, IArtistService artistService, IGenreService genreService)
 {
     _albumService = albumService;
     _artistService = artistService;
     _genreService = genreService;
 }
Пример #44
0
 public void Startup()
 {
     catdao = new CategoryDao(db);
     coudao = new CountryDao(db);
     adao = new ArtistDao(db);
     vdao = new VenueDao(db);
     pdao = new PerformanceDao(db);
     aS = ServiceFactory.CreateArtistService(db);
     category = RepresentativeData.GetDefaultCategories()[0];
     country = RepresentativeData.GetDefaultCountries()[0];
     category = catdao.CreateCategory(category.Shortcut, category.Name);
     country = coudao.CreateCountry(country.Name, country.FlagPath);
 }
 public ArtistController(IArtistService artistService)
 {
     _artistService = artistService;
 }
 public ArtistServiceTest()
 {
     service = new ArtistService();
 }
Пример #47
0
 public ArtistController()
 {
     artistService = ServiceFactory.CreateArtistService(DatabaseConnection.GetDatabase());
 }