diff --git a/.gitignore b/.gitignore
index 93f74dc..dce5c1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ videos
bin/cronTask.sh
option.php
pagecache
+*~
diff --git a/bin/cronTask.sh.sample b/bin/cronTask.sh.sample
index 3b59ccf..6fa8c48 100644
--- a/bin/cronTask.sh.sample
+++ b/bin/cronTask.sh.sample
@@ -19,7 +19,7 @@ do
then
while read urlHash url destination
do
- youtube-dl -R 0 -c --write-thumbnail --write-info-json --recode-video webm --no-check-certificate -f 45/46/37/45/22/44/35/34/5 -o "$urlHash.%(ext)s" "$url"
+ /usr/local/bin/youtube-dl -R 0 -c --write-thumbnail --write-info-json --recode-video webm --no-check-certificate -f 45/46/37/45/22/44/35/34/5 -o "$urlHash.%(ext)s" "$url"
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
sleep 10
if [ ! -f $urlHash.*.part ]
@@ -30,6 +30,6 @@ do
fi
done < $file
fi
+ rm $pageCache*.html
done
-rm $pageCache*.html
# -rc_lookahead 16 -g 360 -threads 3
diff --git a/images/IconsSources~ b/images/IconsSources~
deleted file mode 100644
index e69de29..0000000
diff --git a/images/playlist.svg b/images/playlist.svg
new file mode 100644
index 0000000..aaf123e
--- /dev/null
+++ b/images/playlist.svg
@@ -0,0 +1,744 @@
+
+
+
+
diff --git a/images/rss.svg b/images/rss.svg
new file mode 100644
index 0000000..f4a097b
--- /dev/null
+++ b/images/rss.svg
@@ -0,0 +1,338 @@
+
+
+
+
diff --git a/inc/content.php b/inc/content.php
index 1c19abd..ab3aba1 100644
--- a/inc/content.php
+++ b/inc/content.php
@@ -139,7 +139,7 @@ if (!empty($breadcrumb)) {
}
echo '';
if (isset($_SESSION['cutFile']) && !empty($_SESSION['cutFile'])) {
- echo '
Via |
';
if (!empty($videoInfo['via'])) {
- echo '', $videoInfo['via'], '';
+ echo '', $videoInfo['via'], '';
} else {
echo '';
}
diff --git a/index.php b/index.php
index c0eb4f3..fbbf67c 100644
--- a/index.php
+++ b/index.php
@@ -276,9 +276,9 @@ function n_print($data, $name = '') {
';
@@ -457,6 +457,50 @@ function listVideo($breadcrumb) {
return glob("*.webm");
}
+function makePLaylist($breadcrumb) {
+ $allFile = glob($GLOBALS['config']['VIDEODIR'].'/'.$breadcrumb."/*.webm");
+ $m3u = '';
+ foreach ($allFile as $value) {
+ $m3u .= 'http://'.$_SERVER['HTTP_HOST'].'/'.$value."\n";
+ }
+ header('Content-type: text/plain');
+ header("Content-Type: application/force-download");
+ header("Content-Disposition: Attachment; filename=playlist.m3u");
+ echo $m3u;
+ exit();
+}
+
+function makeRss($breadcrumb, $fullListFile) {
+ $allFile = glob($GLOBALS['config']['VIDEODIR'].'/'.$breadcrumb."/*.webm");
+ $rss = '
+
+
+ SoViGall
+ Sat, 07 Sep 2002 00:00:01 GMT
+ http://'.$_SERVER['HTTP_HOST'].'';
+ foreach ($allFile as $value) {
+ $oriValues = $value;
+ $hash = substr(str_replace('.webm','',$oriValues),-10, 10);
+ $rss .= '
+ -
+ '.html_entity_decode($fullListFile[$hash]['title'], ENT_QUOTES, "UTF-8").'
+
+ '.html_entity_decode($fullListFile[$hash]['desc'], ENT_QUOTES, "UTF-8").'
+ Origin => '.$fullListFile[$hash]['url'].'
+
+ '.date("D, d M Y H:i:s", strtotime($fullListFile[$hash]['uploadDateSort'])).'
+ http://'.$_SERVER['HTTP_HOST'].'/'.$value.'
+
+
';
+ }
+ $rss .= '
+
+';
+ header('Content-type: application/rss+xml; charset=UTF-8');
+ echo $rss;
+ exit();
+}
+
function parseVideoDescription($file, $fullInfo = false) {
$value = json_decode(file_get_contents($file));
}
@@ -490,9 +534,6 @@ function getVideoInfo($file, $dir, $fullListFile) {
return $info;
}
-function editVideoDescription() {
-}
-
function getThumbnail($path, $value) {
if (file_exists(getcwd().'/'.$value.'/thumb.jpg')) {
return $path.$value.'/thumb.jpg';
@@ -676,6 +717,12 @@ function clearCache() {
}
}
+if (isset($ci['ac']) && !empty($ci['ac']) && $ci['ac'] === 'm3u') {
+ makePLaylist($ci['bc']);
+}
+if (isset($ci['ac']) && !empty($ci['ac']) && $ci['ac'] === 'rss') {
+ makeRss($ci['bc'], $fullListFile);
+}
if (!empty($ci['ac']) && $ci['ac'] === 'login' && !empty($ci['op']) && (int)$ci['op'] === 2) {
verifToken($ci['token']);
if (login($ci) === true) {
diff --git a/style.css b/style.css
index 0cfdc5f..9bf38f9 100644
--- a/style.css
+++ b/style.css
@@ -47,6 +47,11 @@ body {
background-color: #141414;
}
+.topMenu a:hover {
+ background-color: #333;
+ box-shadow: 1px 1px #000;
+}
+
#breadcrumb {
margin: 1.2em 0;
}
@@ -82,9 +87,8 @@ body {
}
.paste {
- height: 2em;
margin: 0;
- padding: 0.2em;
+ padding: 0;
border: 2px solid #dfdfdf;
border-radius: 0.2em;
background-color: #262626;
@@ -93,6 +97,14 @@ body {
.paste a {
text-decoration: none;
+ vertical-align: middle;
+ height: 2em;
+ line-height: 2em;
+}
+
+.paste img {
+ height: 2em;
+ float: left;
}
.dir, .video {
@@ -120,6 +132,34 @@ body {
width: 270px;
}
+#listFile .export, #listFile .export ul {
+ text-align: right;
+ margin: 0;
+ padding: 0;
+}
+
+#listFile .export li {
+ display: inline-block;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+}
+
+#listFile .export a {
+ width: auto;
+ height: 24px;
+ display: inline-block;
+ border: none;
+ border-radius: none;
+ text-decoration: none;
+ text-align: center;
+ position: relative;
+ vertical-align: top;
+ margin: 0;
+ padding: 0;
+}
+
#sort {
padding: 0 0 0 32px;
position: fixed;
|