Esempio n. 1
0
 public SettingsViewModel(ISubsonicService subsonicService, IToastNotificationService notificationService,
     IStorageService storageService, ICustomFrameAdapter navigationService)
 {
     _subsonicService = subsonicService;
     _notificationService = notificationService;
     _storageService = storageService;
     _navigationService = navigationService;
 }
Esempio n. 2
0
 public SettingsViewModel(ISubsonicService subsonicService, IToastNotificationService notificationService,
                          IStorageService storageService, ICustomFrameAdapter navigationService)
 {
     _subsonicService     = subsonicService;
     _notificationService = notificationService;
     _storageService      = storageService;
     _navigationService   = navigationService;
 }
Esempio n. 3
0
 public SubsonicController(ISubsonicService subsonicService, ITrackService trackService, IReleaseService releaseService, IPlayActivityService playActivityService, ILoggerFactory logger, ICacheManager cacheManager, IConfiguration configuration, UserManager <ApplicationUser> userManager)
     : base(cacheManager, configuration, userManager)
 {
     this.Logger              = logger.CreateLogger("RoadieApi.Controllers.SubsonicController");
     this.SubsonicService     = subsonicService;
     this.TrackService        = trackService;
     this.ReleaseService      = releaseService;
     this.PlayActivityService = playActivityService;
 }
Esempio n. 4
0
 public SubsonicController(ISubsonicService subsonicService, ITrackService trackService,
                           IReleaseService releaseService,
                           IPlayActivityService playActivityService, ILogger <SubsonicController> logger, ICacheManager cacheManager,
                           UserManager <Library.Identity.User> userManager, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     Logger              = logger;
     SubsonicService     = subsonicService;
     TrackService        = trackService;
     ReleaseService      = releaseService;
     PlayActivityService = playActivityService;
 }
Esempio n. 5
0
        public ShellViewModel(IEventAggregator eventAggregator, ISubsonicService subsonicService, ICustomFrameAdapter navigationService,
                              IToastNotificationService notificationService, IDialogNotificationService dialogNotificationService, IStorageService storageService, IWinRTWrappersService winRTWrappersService)
        {
            _eventAggregator          = eventAggregator;
            SubsonicService           = subsonicService;
            NavigationService         = navigationService;
            NotificationService       = notificationService;
            DialogNotificationService = dialogNotificationService;
            StorageService            = storageService;
            WinRTWrappersService      = winRTWrappersService;

            eventAggregator.Subscribe(this);
        }
Esempio n. 6
0
 public void InitializeFromSong(Song result, ISubsonicService subsonicService)
 {
     Artist = result.Artist;
     Title  = result.Title;
     Uri    = result.Type == SubsonicModelTypeEnum.Video
               ? subsonicService.GetUriForVideoWithId(result.Id)
               : subsonicService.GetUriForFileWithId(result.Id);
     CoverArtUrl  = subsonicService.GetCoverArtForId(result.CoverArt);
     PlayingState = PlaylistItemState.NotPlaying;
     Duration     = result.Duration;
     Type         = result.Type == SubsonicModelTypeEnum.Video
                ? PlaylistItemTypeEnum.Video
                : PlaylistItemTypeEnum.Audio;
 }
        public static PlaylistItem AsPlaylistItem(this ISongModel songModel, ISubsonicService subsonicService)
        {
            var playlistItem = new PlaylistItem
                                   {
                                       Artist = songModel.Artist, 
                                       Title = songModel.Name, 
                                       Duration = songModel.Duration, 
                                       Uri =
                                           songModel.Type == SubsonicModelTypeEnum.Video
                                               ? subsonicService.GetUriForVideoWithId(songModel.Id)
                                               : subsonicService.GetUriForFileWithId(songModel.Id), 
                                       CoverArtUrl = subsonicService.GetCoverArtForId(songModel.CoverArt), 
                                       Type =
                                           songModel.Type == SubsonicModelTypeEnum.Video
                                               ? PlaylistItemTypeEnum.Video
                                               : PlaylistItemTypeEnum.Audio
                                   };

            return playlistItem;
        }
Esempio n. 8
0
        public static PlaylistItem AsPlaylistItem(this ISongModel songModel, ISubsonicService subsonicService)
        {
            var playlistItem = new PlaylistItem
            {
                Artist   = songModel.Artist,
                Title    = songModel.Name,
                Duration = songModel.Duration,
                Uri      =
                    songModel.Type == SubsonicModelTypeEnum.Video
                                               ? subsonicService.GetUriForVideoWithId(songModel.Id)
                                               : subsonicService.GetUriForFileWithId(songModel.Id),
                CoverArtUrl = subsonicService.GetCoverArtForId(songModel.CoverArt),
                Type        =
                    songModel.Type == SubsonicModelTypeEnum.Video
                                               ? PlaylistItemTypeEnum.Video
                                               : PlaylistItemTypeEnum.Audio
            };

            return(playlistItem);
        }
Esempio n. 9
0
 public void InitializeFromSong(Song result, ISubsonicService subsonicService)
 {
     Artist = result.Artist;
     Title = result.Title;
     Uri = result.Type == SubsonicModelTypeEnum.Video
               ? subsonicService.GetUriForVideoWithId(result.Id)
               : subsonicService.GetUriForFileWithId(result.Id);
     CoverArtUrl = subsonicService.GetCoverArtForId(result.CoverArt);
     PlayingState = PlaylistItemState.NotPlaying;
     Duration = result.Duration;
     Type = result.Type == SubsonicModelTypeEnum.Video
                ? PlaylistItemTypeEnum.Video
                : PlaylistItemTypeEnum.Audio;
 }
Esempio n. 10
0
        private static PlaylistItem CreatePlaylistItemFromSong(ISongModel result, ISubsonicService subsonicService)
        {
            var playlistItem = result.AsPlaylistItem(subsonicService);

            return(playlistItem);
        }
Esempio n. 11
0
 public Subsonic(ISubsonicService subsonicService, Logger logger)
 {
     _subsonicService = subsonicService;
     _logger          = logger;
 }
Esempio n. 12
0
        public ShellViewModel(IEventAggregator eventAggregator, ISubsonicService subsonicService, ICustomFrameAdapter navigationService,
            IToastNotificationService notificationService, IDialogNotificationService dialogNotificationService, IStorageService storageService, IWinRTWrappersService winRTWrappersService)
        {
            _eventAggregator = eventAggregator;
            SubsonicService = subsonicService;
            NavigationService = navigationService;
            NotificationService = notificationService;
            DialogNotificationService = dialogNotificationService;
            StorageService = storageService;
            WinRTWrappersService = winRTWrappersService;

            eventAggregator.Subscribe(this);
        }