Compare commits
4 commits
ec2ad40744
...
31852d50fc
Author | SHA1 | Date | |
---|---|---|---|
31852d50fc | |||
21a781bc83 | |||
2c97ed940c | |||
eebe2524a5 |
4 changed files with 4 additions and 6 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()
|
||||
episode['date'] = parsedate_to_datetime(date).isoformat() + "-08:00"
|
||||
if child.tag == "title":
|
||||
episode['title'] = child.text
|
||||
if child.tag == "description":
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -35,7 +35,6 @@
|
|||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
function GetJson(url) {
|
||||
var httpreq = new XMLHttpRequest();
|
||||
httpreq.open("GET", url, false);
|
||||
|
@ -49,7 +48,8 @@
|
|||
let closestEpisode = {};
|
||||
|
||||
episodes.forEach(function (episode, index) {
|
||||
let difference = Math.abs(Date.parse(episode.date) - target);
|
||||
let epDate = Date.parse(episode.date);
|
||||
let difference = Math.abs(epDate - target);
|
||||
if ( difference < minDifference ) {
|
||||
minDifference = difference;
|
||||
closestEpisode = episode;
|
||||
|
@ -57,7 +57,6 @@
|
|||
});
|
||||
|
||||
return closestEpisode;
|
||||
|
||||
}
|
||||
|
||||
var jsonobj = GetJson("episodes.json");
|
||||
|
@ -81,7 +80,6 @@
|
|||
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~
BIN
logo_1024.jpg~
Binary file not shown.
Before Width: | Height: | Size: 136 KiB |
Loading…
Reference in a new issue