You are going to download - -{$video->title}. -
-{if isset($video->thumbnail)} --{if isset($video->formats)} - - + {else} + + Download
+ {/if} +
+{/foreach}
From 03cf5061328e4714f7c640250bb45685f08da4a2 Mon Sep 17 00:00:00 2001
From: Uli Koeth You are going to download
-
-{$video->title}.
- You are going to download
- You are going to download
+
From 2051ee410c82a6fb9816dc22f6d1e479baabf120 Mon Sep 17 00:00:00 2001
From: Pierre Rudloff Videos extracted from the
+
+{$video->title} playlist:
+ You are going to download
-
- {$video->title}.
- Videos extracted from the
+ Videos extracted from the {if isset($video->title)}
-{$video->title} playlist:
+{$video->title}{/if} playlist:
-{/if}
-{if isset($video->description)}
-
-{/if}
-{if isset($video->upload_date)}
-
-{/if}
-
-{if isset($video->formats)}
-
-
+ {else}
+
+ Download
+ {/if}
+
+{/foreach}
');
- window.__onGCastApiAvailable = loadCastApi;
+ var intro = document.getElementsByClassName('download_intro'), i;
+ for (i = 0; i < intro.length; i++) {
+ intro[i].insertAdjacentHTML('beforeend', '
');
}
+ window.__onGCastApiAvailable = loadCastApi;
}
};
}());
diff --git a/templates/video.tpl b/templates/video.tpl
index 8ee0c5f..1c3b73d 100644
--- a/templates/video.tpl
+++ b/templates/video.tpl
@@ -4,8 +4,9 @@
');
+ var intro = document.getElementById('download_intro');
+ if (intro) {
+ intro.insertAdjacentHTML('beforeend', '
');
+ window.__onGCastApiAvailable = loadCastApi;
}
- window.__onGCastApiAvailable = loadCastApi;
}
};
}());
diff --git a/templates/playlist.tpl b/templates/playlist.tpl
new file mode 100644
index 0000000..c62ec59
--- /dev/null
+++ b/templates/playlist.tpl
@@ -0,0 +1,19 @@
+{include file="inc/head.tpl"}
+
- {/if}
- {if isset($video->description)}
-
- {/if}
- {if isset($video->upload_date)}
-
- {/if}
-
- {if isset($video->formats)}
-
-
-
-
- {/if}
-
-{/foreach}
+ {else}
+ {for $foo=1 to 10}
+
+ {/for}
+ {/if}
+ {if isset($format->filesize)}
+ {($format->filesize/1000000)|round:2} MB
+ {for $foo=1 to (7 - (($format->filesize/1000000)|round:2|strlen))}
+
+ {/for}
+ {else}
+ {for $foo=1 to 10}
+
+ {/for}
+ {/if}
+ {if isset($format->format_note)}
+ {$format->format_note}
+ {/if}
+ ({$format->format_id})
+
+ {/strip}
+ {/if}
+ {/foreach}
+
+
+
+
+{else}
+
+ Download
+{/if}
-
{$video->title}
+ {$video->title}
webpage_url}">Download
- webpage_url}">More options
+ {if count($video->formats) > 1}
+ webpage_url}">More options
+ {/if}