From fd43f852405634a1b3a64489e4471c5d3eca1fc7 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Mon, 5 Oct 2020 11:56:14 +0200 Subject: [PATCH] index.json in videos --- .gitignore | 1 - indexify.js | 2 +- src/Twitch.elm | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ebb8f2d..5053d72 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ js/main.js js/main.tmp.js js/main.min.js deploy.sh -index.json diff --git a/indexify.js b/indexify.js index 788f3e7..4fea934 100644 --- a/indexify.js +++ b/indexify.js @@ -24,5 +24,5 @@ for (let dir of fs.readdirSync(VIDEO_DIR)) { info.push(description); } -fs.writeFileSync('index.json', JSON.stringify(info)); +fs.writeFileSync(path.join(VIDEO_DIR, 'index.json'), JSON.stringify(info)); diff --git a/src/Twitch.elm b/src/Twitch.elm index 1f86edd..6f6f2c6 100644 --- a/src/Twitch.elm +++ b/src/Twitch.elm @@ -55,7 +55,7 @@ decodePlaylists = fetchPlaylists : (Result Http.Error (List Playlist) -> msg) -> Cmd msg fetchPlaylists resultToMsg = Http.get - { url = "index.json" + { url = "videos/index.json" , expect = Http.expectJson resultToMsg decodePlaylists }