Browse Source

Need to not display video if there is none.

pull/25/head
Zed A. Shaw 1 month ago
parent
commit
946ed01d9c
4 changed files with 8 additions and 4 deletions
  1. +1
    -1
      generator.js
  2. +5
    -1
      src/routes/modules/[slug]/[exercise].svelte
  3. +1
    -1
      static/feed.atom
  4. +1
    -1
      static/feed.rss

+ 1
- 1
generator.js View File

@@ -137,7 +137,7 @@ const need_torrents = build.rule('video needs torrent', {
for(let t of targets) {
t.target = `protected/media/torrents/${t.tail_no_ext}.torrent`;
build.mkdir(t.target);
let out = build.exec(`mktorrent -v -o "${t.target}" -w "${secrets.base_host}/media/videos/${t.tail}" -p -l 15 "${t.path}"`, {
let out = build.exec(`mktorrent -v -o "${t.target}" -a wss://tracker.btorrent.xyz -a wss://tracker.openwebtorrent.com -a wss://tracker.fastcast.nz -w "${secrets.base_host}/media/videos/${t.tail}" -p -l 15 "${t.path}"`, {
stdio: 'pipe'
});
}

+ 5
- 1
src/routes/modules/[slug]/[exercise].svelte View File

@@ -99,7 +99,11 @@

<div class="columns">
<div class="column" id="video">
<Video media={metadata.video} />
{#if metadata.video }
<Video media={metadata.video} />
{:else}
<h4>No video for this exercise.</h4>
{/if}
</div>
</div>
<div class="divider text-center"></div>

+ 1
- 1
static/feed.atom View File

@@ -2,7 +2,7 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://learnjsthehardway.com/</id>
<title>Learn JavaScript the Hard Way</title>
<updated>2020-04-27T23:16:16.519Z</updated>
<updated>2020-04-28T00:45:40.157Z</updated>
<generator>LJSTHW Custom Generator</generator>
<author>
<name>Zed A. Shaw</name>

+ 1
- 1
static/feed.rss View File

@@ -4,7 +4,7 @@
<title>Learn JavaScript the Hard Way</title>
<link>https://learnjsthehardway.com/</link>
<description>The blog for the Learn JavaScript the Hard Way course.</description>
<lastBuildDate>Mon, 27 Apr 2020 23:16:16 GMT</lastBuildDate>
<lastBuildDate>Tue, 28 Apr 2020 00:45:40 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>LJSTHW Custom Generator</generator>
<language>en</language>

Loading…
Cancel
Save