Esempio n. 1
0
        public SettingsViewModel(IConfigurationService configurationService)
        {
            ThemeConfiguration = configurationService.Theme;
            MetadataConfiguration = configurationService.Metadata;

            ThemeConfiguration.PropertyChanged += Configuration_PropertyChanged;
            MetadataConfiguration.PropertyChanged += Configuration_PropertyChanged;
        }
        public MediaMetadataService(LastFmConfig lastFmConfig, IConfigurationService configurationService, ILocalLyricsService localLyricsService)
        {
            _metadataConfiguration = configurationService.Metadata;
            _lastfm = new LastfmClient(lastFmConfig.ApiKey, null);
            _geciMe = new GeciMeClient();
            _moeAtHome = new MoeAtHomeClient();
            _localLyricsService = localLyricsService;

            var packageVersion = Windows.ApplicationModel.Package.Current.Id.Version;
            _lastfm.HttpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("TomatoMusic",
                $"{packageVersion.Major}.{packageVersion.Minor}"));
        }
Esempio n. 3
0
 public LyricsCache()
 {
     _metadataConfiguration = IoC.Get<IConfigurationService>().Metadata;
 }
Esempio n. 4
0
 public AlbumCoverCache()
 {
     _metadataConfiguration = IoC.Get<IConfigurationService>().Metadata;
 }