Ejemplo n.º 1
0
        public AdminService(IRoadieSettings configuration,
                            IHttpEncoder httpEncoder,
                            IHttpContext httpContext,
                            data.IRoadieDbContext context,
                            ICacheManager cacheManager,
                            ILogger <ArtistService> logger,
                            IHubContext <ScanActivityHub> scanActivityHub
                            )
            : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
        {
            this.ScanActivityHub              = scanActivityHub;
            this.EventMessageLogger           = new EventMessageLogger();
            this.EventMessageLogger.Messages += EventMessageLogger_Messages;

            this.MusicBrainzProvider = new MusicBrainzProvider(configuration, cacheManager, MessageLogger);
            this.LastFmHelper        = new LastFmHelper(configuration, cacheManager, MessageLogger);
            this.FileNameHelper      = new FileNameHelper(configuration, cacheManager, MessageLogger);
            this.ID3TagsHelper       = new ID3TagsHelper(configuration, cacheManager, MessageLogger);

            this.ArtistLookupEngine  = new ArtistLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger);
            this.LabelLookupEngine   = new LabelLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger);
            this.ReleaseLookupEngine = new ReleaseLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.LabelLookupEngine);
            this.ImageFactory        = new ImageFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseLookupEngine);
            this.LabelFactory        = new LabelFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseLookupEngine);
            this.AudioMetaDataHelper = new AudioMetaDataHelper(configuration, httpEncoder, context, this.MusicBrainzProvider, this.LastFmHelper, cacheManager,
                                                               MessageLogger, this.ArtistLookupEngine, this.ImageFactory, this.FileNameHelper, this.ID3TagsHelper);
            this.ReleaseFactory = new ReleaseFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.LabelFactory, this.AudioMetaDataHelper, this.ReleaseLookupEngine);
            this.ArtistFactory  = new ArtistFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseFactory, this.ImageFactory, this.ReleaseLookupEngine, this.AudioMetaDataHelper);
        }
Ejemplo n.º 2
0
 public LastFmHelper(IRoadieSettings configuration, ICacheManager cacheManager, ILogger logger,
                     data.IRoadieDbContext dbContext, IHttpEncoder httpEncoder)
     : base(configuration, cacheManager, logger)
 {
     this._apiKey = configuration.Integrations.ApiKeys.FirstOrDefault(x => x.ApiName == "LastFMApiKey") ?? new ApiKey();
     DbContext    = dbContext;
     HttpEncoder  = httpEncoder;
 }
Ejemplo n.º 3
0
 public GenreService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext dbContext,
                     ICacheManager cacheManager,
                     ILogger <GenreService> logger)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
 }
 public ScrobblerIntegrationBase(IRoadieSettings configuration, ILogger logger, data.IRoadieDbContext dbContext,
                                 ICacheManager cacheManager, IHttpContext httpContext)
 {
     Logger        = logger;
     Configuration = configuration;
     DbContext     = dbContext;
     CacheManager  = cacheManager;
     HttpContext   = httpContext;
 }
Ejemplo n.º 5
0
 public ServiceBase(IRoadieSettings configuration, IHttpEncoder httpEncoder, data.IRoadieDbContext context,
                    ICacheManager cacheManager, ILogger logger, IHttpContext httpContext)
 {
     _configuration = configuration;
     _httpEncoder   = httpEncoder;
     _dbContext     = context;
     _cacheManager  = cacheManager;
     _logger        = logger;
     _httpContext   = httpContext;
 }
Ejemplo n.º 6
0
 public PlayActivityService(IRoadieSettings configuration,
                            IHttpEncoder httpEncoder,
                            IHttpContext httpContext,
                            data.IRoadieDbContext dbContext,
                            ICacheManager cacheManager,
                            ILogger <PlayActivityService> logger,
                            IHubContext <PlayActivityHub> playHubContext)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.PlayActivityHub = playHubContext;
 }
Ejemplo n.º 7
0
 public PlaylistService(IRoadieSettings configuration,
                        IHttpEncoder httpEncoder,
                        IHttpContext httpContext,
                        data.IRoadieDbContext dbContext,
                        ICacheManager cacheManager,
                        ILogger <PlaylistService> logger,
                        IBookmarkService bookmarkService)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
 }
Ejemplo n.º 8
0
 public UserService(IRoadieSettings configuration,
                    IHttpEncoder httpEncoder,
                    IHttpContext httpContext,
                    data.IRoadieDbContext context,
                    ICacheManager cacheManager,
                    ILogger <ArtistService> logger,
                    UserManager <ApplicationUser> userManager)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.UserManager = userManager;
 }
Ejemplo n.º 9
0
 public PlayActivityService(IRoadieSettings configuration,
                            IHttpEncoder httpEncoder,
                            IHttpContext httpContext,
                            data.IRoadieDbContext dbContext,
                            ICacheManager cacheManager,
                            ILogger <PlayActivityService> logger,
                            IScrobbleHandler scrobbleHandler,
                            IHubContext <PlayActivityHub> playActivityHub)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     PlayActivityHub  = playActivityHub;
     ScrobblerHandler = scrobbleHandler;
 }
Ejemplo n.º 10
0
 public TrackService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext dbContext,
                     ICacheManager cacheManager,
                     ILogger <TrackService> logger,
                     IBookmarkService bookmarkService,
                     IAdminService adminService)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
     this.AdminService    = adminService;
 }
Ejemplo n.º 11
0
 public ImageService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <ImageService> logger,
                     IDefaultNotFoundImages defaultNotFoundImages)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.DefaultNotFoundImages = defaultNotFoundImages;
     this.BingSearchEngine      = new BingImageSearchEngine(configuration, logger, this.RequestIp, this.Referrer);
     this.ITunesSearchEngine    = new ITunesSearchEngine(configuration, cacheManager, logger, this.RequestIp, this.Referrer);
 }
Ejemplo n.º 12
0
 public LabelService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <LabelService> logger,
                     ICollectionService collectionService,
                     IPlaylistService playlistService,
                     IBookmarkService bookmarkService)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
 }
Ejemplo n.º 13
0
        public ScrobbleHandler(IRoadieSettings configuration, ILogger <ScrobbleHandler> logger, data.IRoadieDbContext dbContext,
                               ICacheManager cacheManager, IHttpEncoder httpEncoder, IHttpContext httpContext)
        {
            Logger        = logger;
            Configuration = configuration;
            DbContext     = dbContext;
            HttpEncoder   = httpEncoder;
            HttpContext   = httpContext;
            var scrobblers = new List <IScrobblerIntegration>
            {
                new RoadieScrobbler(configuration, logger, dbContext, cacheManager, httpContext)
            };

            if (configuration.Integrations.LastFmProviderEnabled)
            {
                scrobblers.Add(new LastFmHelper(configuration, cacheManager, logger, dbContext, httpEncoder));
            }
            Scrobblers = scrobblers;
        }
Ejemplo n.º 14
0
 public RoadieScrobbler(IRoadieSettings configuration, ILogger logger, data.IRoadieDbContext dbContext,
                        ICacheManager cacheManager, IHttpContext httpContext)
     : base(configuration, logger, dbContext, cacheManager, httpContext)
 {
 }
Ejemplo n.º 15
0
 public LastFMScrobbler(IRoadieSettings configuration, ILogger logger, data.IRoadieDbContext dbContext,
                        ICacheManager cacheManager, ILastFmHelper lastFmHelper, IHttpContext httpContext)
     : base(configuration, logger, dbContext, cacheManager, httpContext)
 {
     LastFmHelper = lastFmHelper;
 }