Compare commits
No commits in common. "31852d50fcdeb3407ad0257d3f3e742d2f3e437f" and "ec2ad40744d84cfada9f63d131dfc7c07d0f9848" have entirely different histories.
31852d50fc
...
ec2ad40744
4 changed files with 6 additions and 4 deletions
|
@ -22,7 +22,7 @@ def parseXML(xmlfile):
|
|||
episode['download_url'] = child.attrib['url']
|
||||
if child.tag == 'pubDate':
|
||||
date = child.text
|
||||
episode['date'] = parsedate_to_datetime(date).isoformat() + "-08:00"
|
||||
episode['date'] = parsedate_to_datetime(date).isoformat()
|
||||
if child.tag == "title":
|
||||
episode['title'] = child.text
|
||||
if child.tag == "description":
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -35,6 +35,7 @@
|
|||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
function GetJson(url) {
|
||||
var httpreq = new XMLHttpRequest();
|
||||
httpreq.open("GET", url, false);
|
||||
|
@ -48,8 +49,7 @@
|
|||
let closestEpisode = {};
|
||||
|
||||
episodes.forEach(function (episode, index) {
|
||||
let epDate = Date.parse(episode.date);
|
||||
let difference = Math.abs(epDate - target);
|
||||
let difference = Math.abs(Date.parse(episode.date) - target);
|
||||
if ( difference < minDifference ) {
|
||||
minDifference = difference;
|
||||
closestEpisode = episode;
|
||||
|
@ -57,6 +57,7 @@
|
|||
});
|
||||
|
||||
return closestEpisode;
|
||||
|
||||
}
|
||||
|
||||
var jsonobj = GetJson("episodes.json");
|
||||
|
@ -80,6 +81,7 @@
|
|||
document.getElementById("srcID").setAttribute("src", "https://minio.andr3w.net/chompers/media/" + todaysEpisode.filename);
|
||||
|
||||
document.getElementById("player").load();
|
||||
document.getElementById("player").play();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
BIN
logo_1024.jpg~
Normal file
BIN
logo_1024.jpg~
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Loading…
Reference in a new issue