public SmartPlaylistApi(ISessionContext sessionContext
                                )
        {
            _sessionContext = sessionContext;

            _messageBus             = Plugin.Instance.MessageBus;
            _smartPlaylistStore     = Plugin.Instance.SmartPlaylistStore;
            _smartPlaylistValidator = Plugin.Instance.SmartPlaylistValidator;
        }
Ejemplo n.º 2
0
 public UpdateSmartPlaylistCommandHandler(
     IUserItemsProvider userItemsProvider, ISmartPlaylistProvider smartPlaylistProvider,
     IPlaylistRepository playlistRepository, IPlaylistItemsUpdater playlistItemsUpdater,
     ISmartPlaylistStore smartPlaylistStore)
 {
     _userItemsProvider     = userItemsProvider;
     _smartPlaylistProvider = smartPlaylistProvider;
     _playlistRepository    = playlistRepository;
     _playlistItemsUpdater  = playlistItemsUpdater;
     _smartPlaylistStore    = smartPlaylistStore;
 }
Ejemplo n.º 3
0
        public RefreshAllPlaylists(
            IFileSystem fileSystem,
            IJsonSerializer jsonSerializer,
            ILibraryManager libraryManager,
            ILogger <Plugin> logger,
            IPlaylistManager playlistManager,
            IProviderManager providerManager,
            IServerApplicationPaths serverApplicationPaths,
            IUserManager userManager
            )
        {
            _fileSystem      = fileSystem;
            _libraryManager  = libraryManager;
            _logger          = logger;
            _playlistManager = playlistManager;
            _providerManager = providerManager;
            _userManager     = userManager;

            _plFileSystem = new SmartPlaylistFileSystem(serverApplicationPaths);
            _plStore      = new SmartPlaylistStore(jsonSerializer, _plFileSystem);

            _logger.LogInformation("Constructed Refresher ");
        }
 public SmartPlaylistProvider(ISmartPlaylistStore smartPlaylistStore)
 {
     _smartPlaylistStore = smartPlaylistStore;
 }
 public CacheableSmartPlaylistStore(ISmartPlaylistStore decorated)
 {
     _decorated = decorated;
     _memCache  = new MemCache();
 }
Ejemplo n.º 6
0
 public CleanupOldCriteriaDecorator(ISmartPlaylistStore decorated)
 {
     _decorated = decorated;
 }
        private void SubscribeMessageHandlers(ISmartPlaylistProvider smartPlaylistProvider,
                                              IUserItemsProvider userItemsProvider, IPlaylistRepository playlistRepository,
                                              IPlaylistItemsUpdater playlistItemsUpdater, ISmartPlaylistStore smartPlaylistStore)
        {
            var updateSmartPlaylistCommandHandler =
                new UpdateSmartPlaylistCommandHandler(userItemsProvider, smartPlaylistProvider,
                                                      playlistRepository, playlistItemsUpdater, smartPlaylistStore);
            var updateAllSmartPlaylistsWithItemsCommandHandler =
                new UpdateAllSmartPlaylistsCommandHandler(MessageBus, smartPlaylistProvider,
                                                          playlistRepository, playlistItemsUpdater);

            MessageBus.Subscribe(Decorate(updateSmartPlaylistCommandHandler));
            MessageBus.Subscribe(Decorate(updateAllSmartPlaylistsWithItemsCommandHandler));
        }
 public SmartPlaylistStorePerfLoggerDecorator(ISmartPlaylistStore decorated)
 {
     _decorated = decorated;
 }