Skip to content

Commit

Permalink
Add stations
Browse files Browse the repository at this point in the history
  • Loading branch information
jbwharris committed Jan 28, 2025
1 parent 1c51bdb commit c3703c1
Show file tree
Hide file tree
Showing 12 changed files with 426 additions and 3 deletions.
Binary file added img/stations/cbcmusic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/stations/spacefm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/stations/xrayfm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion js/main-dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/main-dist.js.map

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,26 @@ class RadioPlayer {

if (!this.stationName) return;

if ([this.stationName] == 'cbcmusic') {



const cbcData = document.querySelector('span.player-radio-name span:last-child')?.textContent.trim() || '';

console.log("cbcData", cbcData);

// Compare the current data response with the previous one
if (this.isDataSameAsPrevious(cbcData)) {
return;
}

// Store the current data response for future comparison
this.previousDataResponse = cbcData;

// Process the new data response
this.processData(cbcData);
}

if (this.isPlaying && !this.shouldReloadStream) {
let stationUrl = this.addCacheBuster(this.currentStationData[this.stationName].apiUrl);

Expand Down
354 changes: 354 additions & 0 deletions js/stations-cbc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,354 @@
const stations = {
absoluteradio: {
stationName: "Absolute Radio",
},
altradio: {
stationName: "AltRadio",
},
amazingradiouk: {
stationName: "Amazing Radio UK",
},
amazingradious: {
stationName: "Amazing Radio US",
},
bagelradio: {
stationName: "BagelRadio",
},
bbcradio6: {
stationName: "BBC6 Music",
},
bfffm: {
stationName: "BFF.fm",
},
birchstreet: {
stationName: "Birch Street Radio",
},
thebridge: {
stationName: "The Bridge 90.9",
},
cbcmusic: {
stationName: "CBC Music",
},
chillfiltr: {
stationName: "CHILLFILTR",
},
chirpradio: {
stationName: "ChirpRadio",
cors: true,
},
chly: {
stationName: "CHLY",
},
chma: {
stationName: "CHMA",
},
civl: {
stationName: "CIVL",
},
cjiq: {
stationName: "CJIQ",
},
cjmp: {
stationName: "CJMP",
},
ckua: {
stationName: "CKUA",
},
ckut: {
stationName: "CKUT",
cors: true,
},
ckuw: {
stationName: "CKUW",
},
coloradosound: {
stationName: "The Colorado Sound",
},
thecurrent: {
stationName: "The Current",
},
d1alt: {
stationName: "D1 Alternative",
},
d2relax: {
stationName: "D2 Relax",
},
demostation: {
stationName: "Demo Station",
cors: true,
},
dkfm: {
stationName: "DKFM",
},
dkfmclassic: {
stationName: "DKFM Classic",
},
easternalt: {
stationName: "Eastern Alternative Radio",
},
eightradio: {
stationName: "8Radio",
},
wyms: {
stationName: "88Nine - Radio Milwaukee",
},
flashAlt: {
stationName: "Flashback Alternatives",
},
funkymoose: {
stationName: "Funky Moose Radio",
},
gorillafm: {
stationName: "Gorilla FM",
},
theindependent: {
stationName: "The Independent",
},
indie1023: {
stationName: "Indie 102.3",
},
indie617: {
stationName: "indie617",
},
indie88: {
stationName: "Indie88",
},
indieblend: {
stationName: "The Indie Blend",
},
indiediscotheque: {
stationName: "Indie Discotheque",
},
indiegoogleplus: {
stationName: "Indie Google+",
cors: true,
},
indiexfm: {
stationName: "Indie X FM",
},
idobianthm: {
stationName: "idobi anthm",
},
inhailer: {
stationName: "Inhailer Radio",
},
kalx: {
stationName: "KALX",
},
kcrw: {
stationName: "KCRW Eclectic 24",
},
kdhx: {
stationName: "KDHX",
},
kexp: {
stationName: "KEXP",
},
kosu: {
stationName: "KOSU - The Spy",
},
kpcr: {
stationName: "KPCR - Pirate Cat Radio",
},
kpiss: {
stationName: "KPISS",
},
krsm: {
stationName: "KRSM",
},
kuom: {
stationName: "KUOM - Radio K",
},
kutx: {
stationName: "KUTX",
},
kxlu: {
stationName: "KXLU",
},
kxt: {
stationName: "KXT",
},
lemellotron: {
stationName: "Le Mellotron",
},
megashuffle: {
stationName: "MegaShuffle",
},
metradio: {
stationName: "Met Radio",
},
midtownradio: {
stationName: "Midtown Radio",
},
tmm1: {
stationName: "The Music Machine 1",
},
tmm2: {
stationName: "The Music Machine 2",
},
newsounds: {
stationName: "New Sounds",
cors: true,
},
plazaone: {
stationName: "Nightwave Plaza",
},
thepoint: {
stationName: "The Point",
},
qcindie: {
stationName: "QCIndie",
},
radiolaurier: {
stationName: "Radio Laurier",
},
radionovanuit: {
stationName: "Radio Nova - La Nuit",
},
radioparadiseglobal: {
stationName: "Radio Paradise Global Mix",
},
radioparadisemain: {
stationName: "Radio Paradise Main Mix",
},
radiosydney: {
stationName: "Radio Sydney",
},
radiowestern: {
stationName: "Radio Western",
cors: true,
},
radiox: {
stationName: "Radio X",
},
sabotage: {
stationName: "Sabotage Radio",
},
socalsound: {
stationName: "The SoCal Sound",
},
soma80sunderground: {
stationName: "SomaFM 80s Underground",
},
somafolkfwd: {
stationName: "SomaFM Folk Forward",
},
somaindiepop: {
stationName: "SomaFM Indie Pop Rocks!",
},
soniccoast: {
stationName: "The Sonic Coast",
},
spacefm: {
stationName: "Space 101.1FM",
},
thesummit: {
stationName: "The Summit",
},
trendradio: {
stationName: "Trend Radio",
},
triplejunearthed: {
stationName: "Triple J Unearthed",
},
uncertainfm: {
stationName: "UncertainFM",
},
wber: {
stationName: "WBER",
},
wbfo: {
stationName: "WBFO - The Bridge",
},
wbor: {
stationName: "WBOR",
},
wbru: {
stationName: "WBRU",
},
wers: {
stationName: "WERS",
},
wext: {
stationName: "WEXT",
tags: [
"AAA", "NPR", "United States", "New York"
],
},
wfmu: {
stationName: "WFMU",
},
wfpk: {
stationName: "WFPK",
},
wfuv: {
stationName: "WFUV",
},
wicb: {
stationName: "WICB",
},
witt: {
stationName: "WITT",
},
wluw: {
stationName: "WLUW",
},
wmfo: {
stationName: "WMFO",
},
wmse: {
stationName: "WMSE Radio",
},
wnmc: {
stationName: "WNMC",
},
wnrn: {
stationName: "WNRN",
},
wnxp: {
stationName: "WNXP",
},
worldwidefm: {
stationName: "Worldwide FM",
},
wpkn: {
stationName: "WPKN",
},
wprb: {
stationName: "WPRB",
},
wrir: {
stationName: "WRIR",
},
wrur: {
stationName: "WRUR - The Route",
},
wtmd: {
stationName: "WTMD",
},
wuky: {
stationName: "WUKY",
},
wyep: {
stationName: "WYEP",
},
wyomingsounds: {
stationName: "Wyoming Sounds",
},
wzbc: {
stationName: "WZBC",
},
xpn: {
stationName: "XPN",
},
xpn2: {
stationName: "XPoNential Radio",
},
xrayfm: {
stationName: "XRAY.FM",
cors: true,
},
ynotradio: {
stationName: "Y-Not Radio",
},
};
2 changes: 1 addition & 1 deletion js/stations-dist.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c3703c1

Please sign in to comment.