85 lines
2.9 KiB
C#
85 lines
2.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace RadioBroadcaster.Server
|
|
{
|
|
public static class Stations
|
|
{
|
|
public static List<SourceStation> sourceStations = new List<SourceStation>();
|
|
public static void LoadStations()
|
|
{
|
|
sourceStations.Add(new SourceStation()
|
|
{
|
|
InternalName = "Sound",
|
|
InternalID = 0,
|
|
URISource = "http://tunein-icecast.mediaworks.nz/sound_128kbps",
|
|
RDS_StationName = "The Sound - Rebroadcast",
|
|
RDS_Buffers = new string[] { "The Sound FM - ", "Rebroadcast" }
|
|
});
|
|
sourceStations.Add(new SourceStation()
|
|
{
|
|
InternalName = "MoreFM",
|
|
InternalID = 0,
|
|
URISource = "http://tunein-icecast.mediaworks.nz/more_128kbps",
|
|
RDS_StationName = "MoreFM - Rebroadcast",
|
|
RDS_Buffers = new string[] { "MoreFM - ", "Rebroadcast" }
|
|
});
|
|
sourceStations.Add(new SourceStation()
|
|
{
|
|
InternalName = "P4",
|
|
InternalID = 0,
|
|
URISource = "http://http-live.sr.se/p4stockholm-aac-96",
|
|
RDS_StationName = "P4 Stockholm",
|
|
RDS_Buffers = new string[] { "P4 Stockholm ", "Rebroadcast" }
|
|
});
|
|
sourceStations.Add(new SourceStation()
|
|
{
|
|
InternalName = "Radio Hauraki",
|
|
InternalID = 0,
|
|
URISource = "https://ais-nzme.streamguys1.com/nz_009/playlist.m3u8",
|
|
RDS_StationName = "Radio Hauraki",
|
|
RDS_Buffers = new string[] { "Radio Hauraki", "Rebroadcast" }
|
|
});
|
|
sourceStations.Add(new SourceStation()
|
|
{
|
|
InternalName = "Rock",
|
|
InternalID = 0,
|
|
URISource = "http://tunein-icecast.mediaworks.nz/rock_128kbps",
|
|
RDS_StationName = "The Rock - Rebroadcast",
|
|
RDS_Buffers = new string[] { "The Rock FM - ", "Rebroadcast" }
|
|
});
|
|
}
|
|
|
|
}
|
|
public class SourceStation : IEquatable<SourceStation>
|
|
{
|
|
public string InternalName { get; set; }
|
|
public int InternalID { get; set; }
|
|
|
|
public string URISource { get; set; }
|
|
|
|
public string RequestedFrequency { get; set; }
|
|
public int BroadcastPower { get; set; }
|
|
public string RDS_StationName { get; set; }
|
|
/// <summary>
|
|
/// RDS Buffer. Cannot exceed 32 chars per segment
|
|
/// </summary>
|
|
public string[] RDS_Buffers { get; set; }
|
|
|
|
public bool Equals(SourceStation otherStation)
|
|
{
|
|
if (this.InternalName != otherStation.InternalName)
|
|
{
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|