/// <summary> /// Ermittelt zu einem VCR.NET Sender den vollen Namen inklusive Anbieter. /// </summary> /// <param name="channel">Ein Sender.</param> /// <returns>Der volle Name des Senders.</returns> private static string GetStationName(VCRNETRestProxy.Source channel) { // None if (null == channel) { return(null); } else { return(channel.nameWithProvider); } }
/// <summary> /// Wählt einen neuen Sender. /// </summary> /// <param name="context">Der zu wählende Sender.</param> /// <returns>Name des neuen Senders inklsuive der gewählten Tonspur /// oder <i>null</i>.</returns> public override string SetStation(object context) { // Stop sending data Accessor.Stop(); // Restart videotext caching from scratch Adaptor.VideoText.Deactivate(true); // Change type var source = (VCRNETRestProxy.Source)context; // Change the program VCRNETRestProxy.TuneSync(m_serverRoot, Profile, source.source); // Remember CurrentSource = source; CurrentService = null; // Store to settings return(Adaptor.RemoteInfo.VCRStation = source.nameWithProvider); }
/// <summary> /// Ermittelt die aktuelle Senderliste. /// </summary> public override void LoadStations() { // Allow restriction on channels Favorites.EnableFavorites(); // Reset all CurrentSource = null; CurrentService = null; Sources.Clear(); // Check free TV mode var free = Adaptor.ChannelInfo.FreeTV; var pay = Adaptor.ChannelInfo.PayTV; // Check service type var radio = Adaptor.ChannelInfo.UseRadio; var tv = Adaptor.ChannelInfo.UseTV; // Get radio and video separatly for (int radioFlag = 2; radioFlag-- > 0;) { foreach (var source in VCRNETRestProxy.ReadSourcesSync(m_serverRoot, Profile, radioFlag == 0, radioFlag == 1)) { // Add anything to map Sources[SourceIdentifier.Parse(source.source)] = source; // Check type if (radioFlag == 1) { // See if radio is allowed if (tv && !radio) { continue; } } else { // See if TV is allowed if (radio && !tv) { continue; } } // Check encryption if (source.encrypted) { // Only if encrypted is allowed if (free && !pay) { continue; } } else { // Only if free is allowed if (pay && !free) { continue; } } // Process Favorites.AddChannel(source.nameWithProvider, source); } } // Finished Favorites.FillChannelList(); }