summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xincludes/inc_files.php14
-rwxr-xr-xincludes/inc_stream.php18
2 files changed, 28 insertions, 4 deletions
diff --git a/includes/inc_files.php b/includes/inc_files.php
index 15ef491..8ddde5a 100755
--- a/includes/inc_files.php
+++ b/includes/inc_files.php
@@ -27,8 +27,18 @@ function mediagetinfostream($stream = "")
}
// Extract a thumbnail
- exec("rm ram/stream-tb.png");
- exec($ffmpegpath ." -y -i \"" .$stream ."\" -an -ss 00:00:05.00 -r 1 -vframes 1 -s 128x72 -f mjpeg ram/stream-tb.png");
+ exec("rm ram/stream-tb.*");
+
+ $path = dirname($stream);
+
+ if (file_exists(substr($stream, 0, -4) .".tbn"))
+ exec("cp " .substr($stream, 0, -4) .".tbn ram/stream-tb.jpg");
+ else if (file_exists($path ."/poster.jpg"))
+ exec("cp " .$path ."/poster.jpg ram/stream-tb.jpg");
+ else if (file_exists($path ."/folder.jpg"))
+ exec("cp " .$path ."/folder.jpg ram/stream-tb.jpg");
+ else
+ exec($ffmpegpath ." -y -i \"" .$stream ."\" -an -ss 00:00:05.00 -r 1 -vframes 1 -s 128x72 -f mjpeg ram/stream-tb.png");
return array($title, $info);
}
diff --git a/includes/inc_stream.php b/includes/inc_stream.php
index b4cb5bd..28a962c 100755
--- a/includes/inc_stream.php
+++ b/includes/inc_stream.php
@@ -23,7 +23,14 @@ if (infostreamexist())
print " <ul class=\"pageitem\">\r\n";
if ($type == 3)
- $logopath = "ram/stream-tb.png";
+ {
+ if (file_exists("ram/stream-tb.png"))
+ $logopath = "ram/stream-tb.png";
+ else if (file_exists("ram/stream-tb.jpg"))
+ $logopath = "ram/stream-tb.jpg";
+ else
+ $logopath = "";
+ }
else
$logopath = "logos/" .$realname .".png";
@@ -111,7 +118,14 @@ else
print " <ul class=\"pageitem\">\r\n";
if ($type == 3)
- $logopath = "ram/stream-tb.png";
+ {
+ if (file_exists("ram/stream-tb.png"))
+ $logopath = "ram/stream-tb.png";
+ else if (file_exists("ram/stream-tb.jpg"))
+ $logopath = "ram/stream-tb.jpg";
+ else
+ $logopath = "";
+ }
else
$logopath = "logos/" .$realname .".png";