Habe mal nach ein paar laut.fm-API's geschaut. Diese Listen haben ich gefunden. Vielleicht kann einer der Programmierer damit etwas anfangen, falls in dieser Richtung etwas gemacht werden sollte!
Teil 1:
Code
- API-SAMMLUNG HTTPS-KOMPATIBEL
- Stand: 19.2.17 das EURESTATION muss jeweils mit dem Sendernamen ersetzt wrden Zuerst Folgendes in den <head> bereich eurer seite Einfügen : <meta content="text/html;charset=utf-8" http-equiv="content-type"> <script type="text/javascript" src="https://api.laut.fm/js_tools/lautfm_js_tools.0.9.1.js" ></script> ---EINFACHE TITELANZEIGE---- <div id="song"></div>
- <script type="text/html" id="song_template" charset="utf-8">
- <%= this.artist.name %> - <%= this.title %>
- </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION') .info({container:'station', template:'station_template'}) .current_song({container:'song', template:'song_template'}, true); </script> ---
- FüR EINE ANZEIGE MIT (FALLS VERFüGBAR) BILD VOM ARTIST--- <div id="song"></div> <script type="text/html" id="song_template" charset="utf-8">
- <img src="<%= this.artist.image %>" alt="" width="292px" height="209px"/> </div><br> <%= this.artist.name %> - <%= this.title %> </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION') .info({container:'station', template:'station_template'}) .current_song({container:'song', template:'song_template'}, true); </script> ---ANZEIGE DER LETZTEN 10 TITEL----- <div id="songs"> </div> <script type="text/html" id="songs_template" charset="utf-8"> <% this.forEach(function(song){ %>
- <img src="<%= song.artist.image %>" width="auto" height="50px" alt="" /></div> Um <%= song.started_at.humanTimeShort() %> lief<br> <%= song.artist.name %> - <%= song.title %> </div> <% }); %> </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION').last_songs({container:'songs', template:'songs_template'}, true); </script> ----SENDEPLAN---- <script type="text/javascript" src="https://api.laut.fm/js_tools/lautfm_js_tools.0.9.0.js" ></script>
- <section id="sendeplan">
- <div class="container">
- <div class="row">
- <div id="containerSchedule" ></div>
- <script> var songStartTime = new Date(); var containerSchedule = document.getElementById('containerSchedule'); var show_schedule = function(schedule){ var bufferSchedule = []; var bufferScheduleHour = []; var endTime=0; var i = 0; var isShowSchedule=false; var Wochentag = new Array("sun", "mon", "tue", "wed", "thu", "fri", "sat"); var addToTD = ''; bufferSchedule.push('<h1><a name="Sendeplan"></a></h1><br /><table border="0" style="font-size:12px;" width="100%"><tr><th>Uhr</th><th>Montag</th><th>Dienstag</th><th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag</th><th>Sonntag</th></tr>'); schedule.forEach(function(playlist){ endTime=playlist['end_time']; if(endTime<=playlist['hour']) endTime=endTime+24; for (i = playlist['hour']; i < endTime; i++){ if(playlist['name']!='undefined'){ addToTD='style="font-size: 1.3em;"'; if(bufferScheduleHour[i % 24]){ }else{ bufferScheduleHour[i % 24]=''; } if(Wochentag[songStartTime.getDay()]==playlist['day'] && songStartTime.getHours()==(i % 24)){ document.getElementById('containerScheduleNow').innerHTML='<h1>'+playlist['name']+' (bis ca. '+ playlist['end_time'] +' Uhr)</h1>'; addToTD='style="font-size: 2em;border:5px solid blue;"'; } if((i % 24)==playlist['hour']||(i % 24)==0){ if(playlist['color']){ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td bgcolor="'+playlist['color']+'" '+addToTD+'>'+playlist['name']+'</td>'; }else{ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td '+addToTD+'>'+playlist['name']+'</td>'; } }else{ if(playlist['color']){ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td '+addToTD+' bgcolor="'+playlist['color']+'"'+">''</td>"; }else{ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+"<td '+addToTD+'>''</td>"; } } } } }) for (attr in bufferScheduleHour) { isShowSchedule=true; bufferSchedule.push('<tr align="center"><td>'+attr+'</td>'+bufferScheduleHour[attr]+'</tr>'); } bufferSchedule.push('</table>'); if(isShowSchedule){ containerSchedule.innerHTML = bufferSchedule.join(''); } }; laut.fm.station('EURESTATION').schedule(show_schedule); </script>
- </div>
- </div> <div id="containerScheduleNow" style="font-size:0px;"></div>
Teil 2:
__________
RAW Paste Data:
Code
- API-SAMMLUNG HTTPS-KOMPATIBEL
- Stand: 19.2.17
- das EURESTATION muss jeweils mit dem Sendernamen ersetzt wrden Zuerst Folgendes in den <head> bereich eurer seite Einfügen : <meta content="text/html;charset=utf-8" http-equiv="content-type"> <script type="text/javascript" src="https://api.laut.fm/js_tools/lautfm_js_tools.0.9.1.js" ></script> ---EINFACHE TITELANZEIGE---- <div id="song"></div>
- <script type="text/html" id="song_template" charset="utf-8">
- <%= this.artist.name %> - <%= this.title %>
- </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION') .info({container:'station', template:'station_template'}) .current_song({container:'song', template:'song_template'}, true); </script>
- --- FüR EINE ANZEIGE MIT (FALLS VERFüGBAR) BILD VOM ARTIST--- <div id="song"></div> <script type="text/html" id="song_template" charset="utf-8">
- <img src="<%= this.artist.image %>" alt="" width="292px" height="209px"/> </div><br> <%= this.artist.name %> - <%= this.title %> </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION') .info({container:'station', template:'station_template'}) .current_song({container:'song', template:'song_template'}, true); </script> ---ANZEIGE DER LETZTEN 10 TITEL----- <div id="songs"> </div> <script type="text/html" id="songs_template" charset="utf-8"> <% this.forEach(function(song){ %>
- <img src="<%= song.artist.image %>" width="auto" height="50px" alt="" /></div> Um <%= song.started_at.humanTimeShort() %> lief<br> <%= song.artist.name %> - <%= song.title %> </div> <% }); %> </script> <script type="text/javascript" charset="utf-8"> laut.fm.station('EURESTATION').last_songs({container:'songs', template:'songs_template'}, true); </script> ----SENDEPLAN----
- <script type="text/javascript" src="https://api.laut.fm/js_tools/lautfm_js_tools.0.9.0.js" ></script>
- <section id="sendeplan">
- <div class="container">
- <div class="row">
- <div id="containerSchedule" ></div>
- <script> var songStartTime = new Date(); var containerSchedule = document.getElementById('containerSchedule'); var show_schedule = function(schedule){ var bufferSchedule = []; var bufferScheduleHour = []; var endTime=0; var i = 0; var isShowSchedule=false; var Wochentag = new Array("sun", "mon", "tue", "wed", "thu", "fri", "sat"); var addToTD = ''; bufferSchedule.push('<h1><a name="Sendeplan"></a></h1><br /><table border="0" style="font-size:12px;" width="100%"><tr><th>Uhr</th><th>Montag</th><th>Dienstag</th><th>Mittwoch</th><th>Donnerstag</th><th>Freitag</th><th>Samstag</th><th>Sonntag</th></tr>'); schedule.forEach(function(playlist){ endTime=playlist['end_time']; if(endTime<=playlist['hour']) endTime=endTime+24; for (i = playlist['hour']; i < endTime; i++){ if(playlist['name']!='undefined'){ addToTD='style="font-size: 1.3em;"'; if(bufferScheduleHour[i % 24]){ }else{ bufferScheduleHour[i % 24]=''; } if(Wochentag[songStartTime.getDay()]==playlist['day'] && songStartTime.getHours()==(i % 24)){ document.getElementById('containerScheduleNow').innerHTML='<h1>'+playlist['name']+' (bis ca. '+ playlist['end_time'] +' Uhr)</h1>'; addToTD='style="font-size: 2em;border:5px solid blue;"'; } if((i % 24)==playlist['hour']||(i % 24)==0){ if(playlist['color']){ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td bgcolor="'+playlist['color']+'" '+addToTD+'>'+playlist['name']+'</td>'; }else{ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td '+addToTD+'>'+playlist['name']+'</td>'; } }else{ if(playlist['color']){ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+'<td '+addToTD+' bgcolor="'+playlist['color']+'"'+">''</td>"; }else{ bufferScheduleHour[i % 24]=bufferScheduleHour[i % 24]+"<td '+addToTD+'>''</td>"; } } } } }) for (attr in bufferScheduleHour) { isShowSchedule=true; bufferSchedule.push('<tr align="center"><td>'+attr+'</td>'+bufferScheduleHour[attr]+'</tr>'); } bufferSchedule.push('</table>'); if(isShowSchedule){ containerSchedule.innerHTML = bufferSchedule.join(''); } }; laut.fm.station('EURESTATION').schedule(show_schedule); </script>
- </div>
- </div> <div id="containerScheduleNow" style="font-size:0px;"></div>