From 710e7e3887eb94fc616a2ce50733d61143991367 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Sun, 1 Apr 2018 23:03:16 +0200 Subject: [PATCH 01/90] first changes that make audio working again (also via streamer-upload) --- view/include/audio.php | 6 ++- view/mini-upload-form/upload.php | 81 +++++++++++++++++--------------- 2 files changed, 49 insertions(+), 38 deletions(-) diff --git a/view/include/audio.php b/view/include/audio.php index aee8d8a9fe36..f8e8afc0c64b 100644 --- a/view/include/audio.php +++ b/view/include/audio.php @@ -3,9 +3,13 @@
diff --git a/view/mini-upload-form/upload.php b/view/mini-upload-form/upload.php index fa2fc9f97bcb..65051179da1a 100644 --- a/view/mini-upload-form/upload.php +++ b/view/mini-upload-form/upload.php @@ -14,52 +14,59 @@ } header('Content-Type: application/json'); // A list of permitted file extensions -$allowed = array('mp4'); +$allowed = array('mp4','ogg','mp3'); if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) { $extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION); if (!in_array(strtolower($extension), $allowed)) { $obj->msg = "File extension error [{$_FILES['upl']['name']}], we allow only (" . implode(",", $allowed) . ")"; die(json_encode($obj)); } - //var_dump($extension, $type);exit; - require_once $global['systemRootPath'] . 'objects/video.php'; - $duration = Video::getDurationFromFile($_FILES['upl']['tmp_name']); - $path_parts = pathinfo($_FILES['upl']['name']); - $mainName = preg_replace("/[^A-Za-z0-9]/", "", cleanString($path_parts['filename'])); - $filename = uniqid($mainName . "_", true); - $video = new Video(substr(preg_replace("/_+/", " ", $_FILES['upl']['name']), 0, -4), $filename, @$_FILES['upl']['videoId']); - $video->setDuration($duration); - $video->setType("video"); - $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced"); - if (empty($advancedCustom->makeVideosInactiveAfterEncode)) { - // set active - $video->setStatus('a'); - } else { - $video->setStatus('i'); - } - $id = $video->save(); - - /** - * This is when is using in a non uploaded movie - */ - $aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3'); - $tmp_name = $_FILES['upl']['tmp_name']; - $filenameMP4 = $filename . ".mp4"; - decideMoveUploadedToVideos($tmp_name, $filenameMP4); + // if($extension=="mp4"){ + //var_dump($extension, $type);exit; + require_once $global['systemRootPath'] . 'objects/video.php'; + $duration = Video::getDurationFromFile($_FILES['upl']['tmp_name']); + $path_parts = pathinfo($_FILES['upl']['name']); + $mainName = preg_replace("/[^A-Za-z0-9]/", "", cleanString($path_parts['filename'])); + $filename = uniqid($mainName . "_", true); + $video = new Video(substr(preg_replace("/_+/", " ", $_FILES['upl']['name']), 0, -4), $filename, @$_FILES['upl']['videoId']); + $video->setDuration($duration); + if($extension=="mp4"){ + $video->setType("video"); + } else if (($extension=="mp3")||($extension=="ogg")){ + $video->setType("audio"); + } + $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced"); + if (empty($advancedCustom->makeVideosInactiveAfterEncode)) { + // set active + $video->setStatus('a'); + } else { + $video->setStatus('i'); + } + $id = $video->save(); + /** + * This is when is using in a non uploaded movie + */ + $aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3'); + $tmp_name = $_FILES['upl']['tmp_name']; + $filenameMP4 = $filename . ".".$extension; + decideMoveUploadedToVideos($tmp_name, $filenameMP4); - if (YouPHPTubePlugin::isEnabled("996c9afb-b90e-40ca-90cb-934856180bb9")) { - require_once $global['systemRootPath'] . 'plugin/MP4ThumbsAndGif/MP4ThumbsAndGif.php'; - $videoFileName = $video->getFilename(); - MP4ThumbsAndGif::getImage($videoFileName, 'jpg'); - MP4ThumbsAndGif::getImage($videoFileName, 'gif'); - } else if(YouPHPTubePlugin::isEnabled("916c9afb-css90e-26fa-97fd-864856180cc9")) { - require_once $global['systemRootPath'] . 'plugin/MP4ThumbsAndGifLocal/MP4ThumbsAndGifLocal.php'; - $videoFileName = $video->getFilename(); - MP4ThumbsAndGifLocal::getImage($videoFileName, 'jpg'); - MP4ThumbsAndGifLocal::getImage($videoFileName, 'gif'); - } + /* if (YouPHPTubePlugin::isEnabled("996c9afb-b90e-40ca-90cb-934856180bb9")) { + require_once $global['systemRootPath'] . 'plugin/MP4ThumbsAndGif/MP4ThumbsAndGif.php'; + $videoFileName = $video->getFilename(); + MP4ThumbsAndGif::getImage($videoFileName, 'jpg'); + MP4ThumbsAndGif::getImage($videoFileName, 'gif'); + } else if((YouPHPTubePlugin::isEnabled("916c9afb-css90e-26fa-97fd-864856180cc9"))&&($extension=="mp4")) { + require_once $global['systemRootPath'] . 'plugin/MP4ThumbsAndGifLocal/MP4ThumbsAndGifLocal.php'; + $videoFileName = $video->getFilename(); + MP4ThumbsAndGifLocal::getImage($videoFileName, 'jpg'); + MP4ThumbsAndGifLocal::getImage($videoFileName, 'gif'); + }*/ +// } else if(($extension=="mp3")||($extension=="ogg")){ + + // } $obj->error = false; $obj->filename = $filename; From 010c8548146e0f2fb3ba519db3f78de4a9543145 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Sun, 1 Apr 2018 23:04:26 +0200 Subject: [PATCH 02/90] protect thumb-plugin from being used in audio's --- view/mini-upload-form/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/mini-upload-form/upload.php b/view/mini-upload-form/upload.php index 65051179da1a..e71c6ff9a2cc 100644 --- a/view/mini-upload-form/upload.php +++ b/view/mini-upload-form/upload.php @@ -53,7 +53,7 @@ decideMoveUploadedToVideos($tmp_name, $filenameMP4); - /* if (YouPHPTubePlugin::isEnabled("996c9afb-b90e-40ca-90cb-934856180bb9")) { + if ((YouPHPTubePlugin::isEnabled("996c9afb-b90e-40ca-90cb-934856180bb9"))&&($extension=="mp4")) { require_once $global['systemRootPath'] . 'plugin/MP4ThumbsAndGif/MP4ThumbsAndGif.php'; $videoFileName = $video->getFilename(); MP4ThumbsAndGif::getImage($videoFileName, 'jpg'); @@ -63,7 +63,7 @@ $videoFileName = $video->getFilename(); MP4ThumbsAndGifLocal::getImage($videoFileName, 'jpg'); MP4ThumbsAndGifLocal::getImage($videoFileName, 'gif'); - }*/ + } // } else if(($extension=="mp3")||($extension=="ogg")){ // } From e45edb7e0f9ea7278953bbd98cb2177c68234e83 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Sun, 1 Apr 2018 23:41:51 +0200 Subject: [PATCH 03/90] add youphpflix to audio- and videoonly-url --- plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php b/plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php index d18f36ebc8da..e383a506420e 100644 --- a/plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php +++ b/plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php @@ -25,7 +25,7 @@ public function getEmptyDataObject() { public function getFirstPage(){ global $global; $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; - if(("http://".$url===$global['webSiteRootURL'])||("https://".$url===$global['webSiteRootURL'])){ + if(("http://".$url===$global['webSiteRootURL'])||("https://".$url===$global['webSiteRootURL'])||("http://".$url===$global['webSiteRootURL']."audioOnly")||("https://".$url===$global['webSiteRootURL']."audioOnly")||("http://".$url===$global['webSiteRootURL']."videoOnly")||("https://".$url===$global['webSiteRootURL']."videoOnly")){ return $global['systemRootPath'].'plugin/YouPHPFlix/view/firstPage.php'; } else { From 6030a799676fe62ba94e6f66c48f40299df0490b Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Mon, 2 Apr 2018 02:17:06 +0200 Subject: [PATCH 04/90] make youphpflix respecting audioOnly/videoOnly, a own optional audio-gallery, and using youphpflix a bit more in my hybrid-plugin --- plugin/YouPHPFlix/YouPHPFlix.php | 1 + plugin/YouPHPFlix/view/firstPage.php | 90 ++++++++++++++++++-- plugin/YouPHPFlixHybrid/YouPHPFlixHybrid.php | 2 +- 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/plugin/YouPHPFlix/YouPHPFlix.php b/plugin/YouPHPFlix/YouPHPFlix.php index fe70894792b1..36e7ac21ea12 100644 --- a/plugin/YouPHPFlix/YouPHPFlix.php +++ b/plugin/YouPHPFlix/YouPHPFlix.php @@ -31,6 +31,7 @@ public function getEmptyDataObject() { $obj->DateAdded = true; $obj->LiteDesignGenericNrOfRows = 10; $obj->SortByName = false; + $obj->separateAudio = false; return $obj; } diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index 4733d0b42328..d82671e05a37 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -9,7 +9,15 @@ require_once '../videos/configuration.php'; require_once $global['systemRootPath'] . 'objects/video.php'; require_once $global['systemRootPath'] . 'objects/category.php'; - +$url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; +$isAudioOnly = false; +if(("http://".$url===$global['webSiteRootURL']."audioOnly")||("https://".$url===$global['webSiteRootURL']."audioOnly")){ + $isAudioOnly = true; +} +$isVideoOnly = false; +if(("http://".$url===$global['webSiteRootURL']."videoOnly")||("https://".$url===$global['webSiteRootURL']."videoOnly")){ + $isVideoOnly = true; +} $category = Category::getAllCategories(); $o = YouPHPTubePlugin::getObjectData("YouPHPFlix"); ?> @@ -48,6 +56,7 @@ $_POST['rowCount'] = 20; $videos = Video::getAllVideos(); foreach ($videos as $value) { + if((($o->separateAudio==false)&&($isAudioOnly==false)&&($isVideoOnly==false))||(($isAudioOnly)&&($value['type']=="audio"))||(($isVideoOnly)&&($value['type']=="video"))||(($o->separateAudio)&&($isAudioOnly==false)&&($isVideoOnly==false)&&($value['type']=="video"))){ $images = Video::getImageFromFilename($value['filename'], $value['type']); $imgGif = $images->thumbsGif; @@ -81,7 +90,7 @@ + separateAudio)&&($isAudioOnly==false)&&($isVideoOnly==false)) { ?> +
+

+ +

+ + +
+ MostWatched) { ?>

@@ -115,6 +192,7 @@ $_POST['sort']['views_count'] = "DESC"; $videos = Video::getAllVideos(); foreach ($videos as $value) { + if((($o->separateAudio==false)&&($isAudioOnly==false)&&($isVideoOnly==false))||(($isAudioOnly)&&($value['type']=="audio"))||(($isVideoOnly)&&($value['type']=="video"))||(($o->separateAudio)&&($isAudioOnly==false)&&($isVideoOnly==false)&&($value['type']=="video"))){ $images = Video::getImageFromFilename($value['filename'], $value['type']); $imgGif = $images->thumbsGif; @@ -148,7 +226,7 @@

- +
+ - CategoryDescription)&&(!empty($_GET['catName']))) { ?> + +
+ + CategoryDescription)&&(!empty($_GET['catName']))) { ?>

-
- + + SubCategorys)&&(!empty($_GET['catName']))) { + $category = Category::getAllCategories(); + $currentCat; + foreach($category as $cat){ + if($cat['clean_name']==$_GET['catName']){ + $currentCat=$cat['id']; + } + } + $category = Category::getChildCategories($currentCat); + + ?> +
+ + + + + + + + + + + + + + + + + + + BigVideo) { ?> -
+
LiteDesignGenericNrOfRows = 10; $obj->SortByName = false; $obj->separateAudio = false; + $obj->SubCategorys = false; return $obj; } diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index 5b59563df18f..28ff792657dd 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -43,8 +43,116 @@ ?> "; + + ?> + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + DateAdded) { ?>

@@ -431,7 +539,7 @@ - if($o->LiteGallery){ + if(($o->LiteGallery)&&(empty($_GET['catName']))){ ?>
diff --git a/update/updateDb.v5.0.sql b/update/updateDb.v5.0.sql index c80afab1c680..4d15d597077f 100644 --- a/update/updateDb.v5.0.sql +++ b/update/updateDb.v5.0.sql @@ -14,6 +14,8 @@ ADD `description` TEXT NOT NULL AFTER `clean_name`; ALTER TABLE `categories` ADD `nextVideoOrder` INT(2) NOT NULL DEFAULT '0' AFTER `description`; +ALTER TABLE `categories` +ADD `parentId` INT NOT NULL DEFAULT '0' AFTER `nextVideoOrder`; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; diff --git a/view/managerCategories.php b/view/managerCategories.php index 0e57f758c778..8d8dec513cb2 100644 --- a/view/managerCategories.php +++ b/view/managerCategories.php @@ -41,6 +41,7 @@ + @@ -67,8 +68,18 @@ - - +
+ +

thumbsGif; //} $poster = $images->thumbsJpg; - $description = $cat['description']; + /*if($o->LiteGalleryMaxTooltipChars > 4){ if(strlen($description)>$o->LiteGalleryMaxTooltipChars){ $description = substr($description,0,$o->LiteGalleryMaxTooltipChars-3)."..."; @@ -131,8 +131,44 @@
+ +
From 6ea5b464a06f4d77fa89fcc653c6fc65c05fc5b0 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Mon, 2 Apr 2018 06:50:04 +0200 Subject: [PATCH 10/90] do not show meta-cat's when no videos, but sub-cat's are still show in youphpflix --- plugin/YouPHPFlix/view/firstPage.php | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index f2d0c1b23b30..345138efe924 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -10,6 +10,7 @@ require_once $global['systemRootPath'] . 'objects/video.php'; require_once $global['systemRootPath'] . 'objects/category.php'; $url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; +$haveVideos = false; $isAudioOnly = false; if(("http://".$url===$global['webSiteRootURL']."audioOnly")||("https://".$url===$global['webSiteRootURL']."audioOnly")){ $isAudioOnly = true; @@ -43,7 +44,7 @@ include $global['systemRootPath'] . 'view/include/navbar.php'; ?> -
- +
plugin/YouPHPFlix/view/js/flickty/flickity.pkgd.min.js" type="text/javascript"> + + +

@@ -600,6 +598,8 @@ $_POST['sort']['title'] = "ASC"; //$_POST['rowCount'] = 12; foreach ($category as $cat) { + // -1 is only a personal workaround + if(($cat['parentId']=="0")||($cat['parentId']=="-1")){ $_GET['catName'] = $cat['clean_name']; $_GET['limitOnceToOne'] = "1"; $videos = Video::getAllVideos(); @@ -651,7 +651,7 @@

@@ -772,9 +772,9 @@ - + - +
-

- - -

- - getName(); ?> + getName(); ?> +

+ + +

+ Date: Mon, 2 Apr 2018 18:52:28 +0200 Subject: [PATCH 15/90] audio-autoplay should work now --- view/include/audio.php | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/view/include/audio.php b/view/include/audio.php index f8e8afc0c64b..e0f3554cb23b 100644 --- a/view/include/audio.php +++ b/view/include/audio.php @@ -12,6 +12,70 @@
+
\ No newline at end of file From 618ad9f0dc1050b8c1cbdba3f4c27ccad2602dff Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Tue, 3 Apr 2018 00:04:31 +0200 Subject: [PATCH 16/90] add untestet fix by hint from @nbenm --- install/checkConfiguration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/checkConfiguration.php b/install/checkConfiguration.php index 9bcb34998fbc..c86ec8b04a47 100644 --- a/install/checkConfiguration.php +++ b/install/checkConfiguration.php @@ -93,7 +93,7 @@ exit; } -$sql = "INSERT INTO categories (id, name, clean_name, created, modified) VALUES (1, 'Default', 'default', now(), now())"; +$sql = "INSERT INTO categories (id, name, clean_name, description, created, modified) VALUES (1, 'Default', 'default','', now(), now())"; if ($mysqli->query($sql) !== TRUE) { $obj->error = "Error creating category: " . $mysqli->error; echo json_encode($obj); From 7abf080a829b6d8b91ce44e460691ae0287f3817 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Tue, 3 Apr 2018 00:54:34 +0200 Subject: [PATCH 17/90] this should show pictures from subcat, when no picture avaible in parentcat - untestet --- plugin/YouPHPFlix/view/firstPage.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index eca6e1805dc2..9df986ed3d48 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -613,6 +613,20 @@ $_GET['catName'] = $cat['clean_name']; $_GET['limitOnceToOne'] = "1"; $videos = Video::getAllVideos(); + $i = 0; + $subcats + if(empty($videos)){ + $subcats = Category::getChildCategories($cat['parentId']); + foreach($subcats as $sCat){ + $i = $i + 1; + $_GET['catName'] = $sCat['clean_name']; + $_GET['limitOnceToOne'] = "1"; + $videos = Video::getAllVideos(); + if((!empty($videos))||($i>10)){ + break; + } + } + } foreach ($videos as $value) { $name = User::getNameIdentificationById($value['users_id']); // make a row each 6 cols From 81db9c6b8ea1c4094cca12f44eed3de22bfc4318 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Tue, 3 Apr 2018 01:12:54 +0200 Subject: [PATCH 18/90] fix typo and function --- plugin/YouPHPFlix/view/firstPage.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index 9df986ed3d48..5d7ea53669b7 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -92,7 +92,9 @@ $_GET['catName'] = $cat['clean_name']; $description = $cat['description']; - //$_GET['limitOnceToOne'] = "1"; + unset($_POST['sort']); + $_POST['sort']['title'] = "ASC"; + $_GET['limitOnceToOne'] = "1"; $videos = Video::getAllVideos(); // unset($_GET['catName']); @@ -610,15 +612,16 @@ foreach ($category as $cat) { // -1 is only a personal workaround if(($cat['parentId']=="0")||($cat['parentId']=="-1")){ + $_GET['catName'] = $cat['clean_name']; $_GET['limitOnceToOne'] = "1"; $videos = Video::getAllVideos(); $i = 0; - $subcats if(empty($videos)){ $subcats = Category::getChildCategories($cat['parentId']); foreach($subcats as $sCat){ $i = $i + 1; + $_POST['sort']['title'] = "ASC"; $_GET['catName'] = $sCat['clean_name']; $_GET['limitOnceToOne'] = "1"; $videos = Video::getAllVideos(); From 7f5b7509b0390b40c4b812a08e981ce05c8ec111 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 2 Apr 2018 20:48:04 -0300 Subject: [PATCH 19/90] Remove mod rewrite alert --- view/configurations.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/view/configurations.php b/view/configurations.php index e19af309895f..b275bd369edf 100644 --- a/view/configurations.php +++ b/view/configurations.php @@ -178,31 +178,6 @@ } ?> - - -
- - Mod Rewrite module is Present -
- -
- - Mod Rewrite is not enabled -
- In order to use mod_rewrite you can type the following command in the terminal:
-
a2enmod rewrite

- Restart apache2 after
-
/etc/init.d/apache2 restart
-
-
- - From d35ff9ab84a89f626dace1a5f6c1f302ad61686f Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Tue, 3 Apr 2018 02:06:04 +0200 Subject: [PATCH 20/90] fix empty categorys and mvideos and loading-screen --- plugin/YouPHPFlix/view/firstPage.php | 43 ++++++++++++++++++++++++++-- view/managerVideos.php | 2 +- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index 5d7ea53669b7..b5d6da3b19f9 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -598,10 +598,13 @@ if(($o->LiteGallery)&&(empty($_GET['catName']))){ ?> +

- +

10)){ + break; + } + } + $i=0; + // if still empty, take a audio for the same + // this can be done much easier, but it's a good place to make a diffrent between pure audio-cat's and video/mixed and separate them (collect in array), other foreach after = audio-cat-gallery + if(empty($videos)){ + $_POST['sort']['title'] = "ASC"; + $_GET['catName'] = $cat['clean_name']; + $_GET['limitOnceToOne'] = "1"; + $_SESSION['type']="audio"; + $videos = Video::getAllVideos(); + } + + $i=0; + // maybe sub-cat's have audio? eventually i will remove this.. + if(empty($videos)){ + foreach($subcats as $sCat){ + $i = $i + 1; + $_POST['sort']['title'] = "ASC"; + $_GET['catName'] = $sCat['clean_name']; + $_GET['limitOnceToOne'] = "1"; + $_SESSION['type']="audio"; + $videos = Video::getAllVideos(); if((!empty($videos))||($i>10)){ + break; } } + } + } foreach ($videos as $value) { $name = User::getNameIdentificationById($value['users_id']); diff --git a/view/managerVideos.php b/view/managerVideos.php index 579d36e9c5ec..df633850e167 100644 --- a/view/managerVideos.php +++ b/view/managerVideos.php @@ -12,7 +12,7 @@ require_once $global['systemRootPath'] . 'objects/userGroups.php'; $userGroups = UserGroups::getAllUsersGroups(); - +unset($_SESSION['type']); if (!empty($_GET['video_id'])) { if (Video::canEdit($_GET['video_id'])) { $row = Video::getVideo($_GET['video_id']); From fa1fa4c90af6f3dcc49142e9b57f4849ef8b509d Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Tue, 3 Apr 2018 02:40:52 +0200 Subject: [PATCH 21/90] make some stuff more stable and fix around --- objects/category.php | 5 ++++- plugin/Gallery/view/modeGallery.php | 6 +++--- plugin/YouPHPFlix/view/firstPage.php | 8 +++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/objects/category.php b/objects/category.php index 9851b1087a6d..72843e70debd 100644 --- a/objects/category.php +++ b/objects/category.php @@ -156,7 +156,10 @@ static function getChildCategories($parentId) { static function getTotalCategories() { global $global; - $sql = "SELECT id FROM categories WHERE 1=1 "; + $sql = "SELECT id, parentId FROM categories WHERE 1=1 "; + if(!empty($_GET['parentsOnly'])){ + $sql .= "AND parentId = 0 OR parentId = -1 "; + } $sql .= BootGrid::getSqlSearchFromPost(array('name')); $res = $global['mysqli']->query($sql); diff --git a/plugin/Gallery/view/modeGallery.php b/plugin/Gallery/view/modeGallery.php index 2e09d4063ede..c3faa1949e2a 100644 --- a/plugin/Gallery/view/modeGallery.php +++ b/plugin/Gallery/view/modeGallery.php @@ -162,9 +162,9 @@ function createOrderInfo($getName,$mostWord,$lessWord,$orderString){
- getName(); ?> +

@@ -884,7 +884,7 @@ function afterExtraVideos($liveLi){ -

+
diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index b5d6da3b19f9..8d3f1e2f57c4 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -70,9 +70,9 @@
- getName(); ?> + LiteGallery)&&(empty($_GET['catName']))){ + //$catCount = $global['mysqli']->query("SELECT COUNT(name) FROM categories WHERE parentId = 0 OR parentId = -1;"); + $_GET['parentsOnly']="1"; ?> - - - - - - -
- ! . -
- -
- - - - -
- - - - - +sortReverseable) { + if (strpos($_SERVER['REQUEST_URI'], "?") != false) { + $orderString = $_SERVER['REQUEST_URI'] . "&"; + } else { + $orderString = $_SERVER['REQUEST_URI'] . "/?"; + } + + $orderString = str_replace("&&", "&", $orderString); + $orderString = str_replace("//", "/", $orderString); + + function createOrderInfo($getName, $mostWord, $lessWord, $orderString) + { + $upDown = ""; + $mostLess = ""; + $tmpOrderString = $orderString; + if ($_GET[$getName] == "DESC") { + if (strpos($orderString, $getName . "=DESC")) { + $tmpOrderString = substr($orderString, 0, strpos($orderString, $getName . "=DESC")) . $getName . "=ASC" . substr($orderString, strpos($orderString, $getName . "=DESC") + strlen($getName . "=DESC"), strlen($orderString)); + } else { + $tmpOrderString .= $getName . "=ASC"; + } + + $upDown = "" . __("Up") . ""; + $mostLess = $mostWord; + } else { + if (strpos($orderString, $getName . "=ASC")) { + $tmpOrderString = substr($orderString, 0, strpos($orderString, $getName . "=ASC")) . $getName . "=DESC" . substr($orderString, strpos($orderString, $getName . "=ASC") + strlen($getName . "=ASC"), strlen($orderString)); + } else { + $tmpOrderString .= $getName . "=DESC"; + } + + $upDown = "" . __("Down") . ""; + $mostLess = $lessWord; + } + + if (substr($tmpOrderString, strlen($tmpOrderString) - 1, strlen($tmpOrderString)) == "&") { + $tmpOrderString = substr($tmpOrderString, 0, strlen($tmpOrderString) - 1); + } + + return array( + $tmpOrderString, + $upDown, + $mostLess + ); + } +} + +$video = Video::getVideo("", "viewableNotAd", false, false, true); + +if (empty($video)) { + $video = Video::getVideo("", "viewableNotAd"); +} + +if (empty($_GET['page'])) { + $_GET['page'] = 1; +} else { + $_GET['page'] = intval($_GET['page']); +} + +$_POST['rowCount'] = 24; +$_POST['current'] = $_GET['page']; +$_POST['sort']['created'] = 'desc'; +$videos = Video::getAllVideos("viewableNotAd"); + +foreach ($videos as $key => $value) { + $name = empty($value['name']) ? $value['user'] : $value['name']; + $videos[$key]['creator'] = '
' . $name . ' ' . humanTiming(strtotime($value['videoCreation'])) . '
'; +} + +$total = Video::getTotalVideos("viewableNotAd"); +$totalPages = ceil($total / $_POST['rowCount']); +?> + + + +<?php +echo $config->getWebSiteTitle(); +?> + + + + + + + + + +
+ ! . +
+ +
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/plugin/YouPHPFlix/view/firstPage.php b/plugin/YouPHPFlix/view/firstPage.php index 8d3f1e2f57c4..2fa9a291f098 100644 --- a/plugin/YouPHPFlix/view/firstPage.php +++ b/plugin/YouPHPFlix/view/firstPage.php @@ -1,850 +1,1439 @@ - - - - + + - <?php echo $config->getWebSiteTitle(); ?> - - + <?php + echo $config->getWebSiteTitle(); + ?> + + - "; + "; + + ?> -
-
+ +
+
- - + if (($currentCat['parentId'] != "0") && ($currentCat['parentId'] != "-1")) { + $parentCat = Category::getCategory($currentCat['parentId']); + ?> + +

- - -

-
'; - } - $countCols++; + + + +
'; + } + + $countCols ++; ?> -
- + - +
-
- - - - - - - - - - - - - - - - - + DateAdded) { ?> + if ($o->DateAdded) { + ?>
-

- +

+

- +
+ + - \ No newline at end of file + \ No newline at end of file diff --git a/view/modeYoutube.php b/view/modeYoutube.php index aa54b8e32f13..f06bbc6b9807 100644 --- a/view/modeYoutube.php +++ b/view/modeYoutube.php @@ -150,14 +150,9 @@ - <?php -echo $video['title']; ?> - <?php -echo $config->getWebSiteTitle(); ?> + <?php echo $video['title']; ?> - <?php echo $config->getWebSiteTitle(); ?> - + From a9ce4affe2deceb6a28a662bf1809d8ff93e0da8 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 06:55:48 +0200 Subject: [PATCH 60/90] reformat --- view/include/audio.php | 97 ++++++++------------ view/include/video.php | 204 ++++++++++------------------------------- 2 files changed, 88 insertions(+), 213 deletions(-) diff --git a/view/include/audio.php b/view/include/audio.php index 740152e07ce6..517693f6a2e0 100644 --- a/view/include/audio.php +++ b/view/include/audio.php @@ -2,48 +2,45 @@
-
diff --git a/view/include/video.php b/view/include/video.php index 0564766a30e2..be483fd7c096 100644 --- a/view/include/video.php +++ b/view/include/video.php @@ -36,45 +36,18 @@
-
"> -
@@ -171,31 +109,21 @@ class="fa fa-step-forward"> player = videojs('mainVideo'); - player.zoomrotate(); + player.zoomrotate(); player.on('play', function () { - addView(); + addView(); }); player.ready(function () { getAutoplay()) - { +if ($config->getAutoplay()) { echo "setTimeout(function () { if(typeof player === 'undefined'){ player = videojs('mainVideo');}player.play();}, 150);"; - } - else - { -?> +} +else { ?> if (Cookies.get('autoplay') && Cookies.get('autoplay') !== 'false') { setTimeout(function () { if(typeof player === 'undefined'){ player = videojs('mainVideo');} player.play();}, 150); } - - isPlayingAd = true; @@ -206,87 +134,51 @@ class="fa fa-step-forward"> $('#adButton').trigger("click"); } - else if (Cookies.get('autoplay') && Cookies.get('autoplay') !== 'false') { - document.location = ''; - } - - + if (!empty($autoPlayVideo)) { ?> + else if (Cookies.get('autoplay') && Cookies.get('autoplay') !== 'false') { + document.location = ''; + } + }); this.on('timeupdate', function () { var durationLeft = fullDuration - this.currentTime(); $("#adUrl .time").text(secondsToStr(durationLeft + 1, 2)); - + if (isPlayingAd && this.currentTime() >) { $('#adButton').fadeIn(); } - + }); - + this.on('ended', function () { console.log("Finish Video"); - + if (Cookies.get('autoplay') && Cookies.get('autoplay') !== 'false') { document.location = ''; } - + }); - + }); player.persistvolume({ namespace: "YouPHPTube" }); +if (!empty($logId)){ + $sources = getSources($video['filename'], true); ?> $('#adButton').click(function () { isPlayingAd = false; console.log("Change Video"); - fullDuration = strToSeconds(''); - changeVideoSrc(player, ); + fullDuration = strToSeconds(''); + changeVideoSrc(player, ); $(".ad").removeClass("ad"); return false; }); - + }); From 33b67487663208af469463bfd4dea29640caec7b Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 06:59:46 +0200 Subject: [PATCH 61/90] reformat --- view/include/video.php | 69 +++++++++++------------------------------- 1 file changed, 17 insertions(+), 52 deletions(-) diff --git a/view/include/video.php b/view/include/video.php index be483fd7c096..6bc17051ed3f 100644 --- a/view/include/video.php +++ b/view/include/video.php @@ -1,27 +1,21 @@ -
@@ -45,21 +39,16 @@ supports HTML5 video

- + $url = VideoLogoOverlay::getLink(); ?> - + -
getAllow_download()) { ?> .mp4" download="">
-
- - +
- + @@ -98,14 +90,10 @@
- +
From e9d7163af382db8361d871125048fe4e53fc2a20 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 18:27:17 +0200 Subject: [PATCH 72/90] fix html again, ide was showing bad --- plugin/Gallery/view/modeGallery.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugin/Gallery/view/modeGallery.php b/plugin/Gallery/view/modeGallery.php index cf5328026737..b0fa43053a45 100644 --- a/plugin/Gallery/view/modeGallery.php +++ b/plugin/Gallery/view/modeGallery.php @@ -723,12 +723,10 @@ function afterExtraVideos($liveLi){ label === __("Group")) { - ?> + if ($value2->label === __("Group")) { ?> text; ?> - +
@@ -775,7 +773,7 @@ function afterExtraVideos($liveLi){
- + From d01cba5fd53b19a846e8716f8fbf6c72514305d9 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 19:11:21 +0200 Subject: [PATCH 73/90] this should fix hotkey-plugin for audio --- plugin/Hotkeys/Hotkeys.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugin/Hotkeys/Hotkeys.php b/plugin/Hotkeys/Hotkeys.php index 8156c0a716c6..d0ca50c2c829 100644 --- a/plugin/Hotkeys/Hotkeys.php +++ b/plugin/Hotkeys/Hotkeys.php @@ -48,11 +48,13 @@ public function getFooterCode() { preg_match("/cat\/(.*)\/video\/(.*)/", $url, $catUrlResult); if((strpos($url,substr($global['webSiteRootURL'],$httpSpacer)."video/")!==false)||(sizeof($catUrlResult)>0)){ - $tmp = " - '; - - $js .= ''; + if($_SESSION['type']=="audio"){ + $js .= ''; return $js; } } From 1b6ebdd8eccc8f2ab058f8aabea9cae046e33854 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 5 Apr 2018 15:04:47 -0300 Subject: [PATCH 77/90] Add option for S3 Direct Link --- objects/video.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/objects/video.php b/objects/video.php index 988c0e4c97a4..f130113da7e1 100644 --- a/objects/video.php +++ b/objects/video.php @@ -1247,13 +1247,18 @@ static function getSourceFile($filename, $type=".jpg", $includeS3 = false) { } * */ + $aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3'); + $aws_s3_obj = $aws_s3->getDataObject(); + if(!empty($aws_s3_obj->useS3DirectLink)){ + $includeS3 = true; + } + $source = array(); $source['path'] = "{$global['systemRootPath']}videos/{$filename}{$type}"; $source['url'] = "{$global['webSiteRootURL']}videos/{$filename}{$type}"; /* need it because getDurationFromFile*/ if($includeS3 && ($type==".mp4" || $type==".webm")){ if (!file_exists($source['path']) || filesize($source['path']) < 1024) { - $aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3'); if (!empty($aws_s3)) { $source = $aws_s3->getAddress("{$filename}{$type}"); } From 6eb5ca4da686ba0a924ce5aa563daed09b7c30b7 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 20:07:04 +0200 Subject: [PATCH 78/90] this should fix the nextbutton-plugin for audio --- plugin/NextButton/NextButton.php | 8 ++++++-- plugin/NextButton/script.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/NextButton/NextButton.php b/plugin/NextButton/NextButton.php index 54004c6a6a1a..83e236b6d6eb 100644 --- a/plugin/NextButton/NextButton.php +++ b/plugin/NextButton/NextButton.php @@ -19,8 +19,12 @@ public function getUUID() { public function getFooterCode() { global $global, $autoPlayVideo; - if (!empty($autoPlayVideo['url'])) { - $js = ''; + if (!empty($autoPlayVideo['url'])) { + $tmp = "mainVideo"; + if($_SESSION['type']=="audio"){ + $tmp = "mainAudio"; + } + $js = ''; $js .= ''; return $js; diff --git a/plugin/NextButton/script.js b/plugin/NextButton/script.js index 6b977fdac427..ed0fbe9a8667 100644 --- a/plugin/NextButton/script.js +++ b/plugin/NextButton/script.js @@ -1,5 +1,5 @@ // Extend default -if(typeof player == 'undefined'){player = videojs('mainVideo');} +if(typeof player == 'undefined'){player = videojs(videoJsId);} var Button = videojs.getComponent('Button'); var nextButton = videojs.extend(Button, { //constructor: function(player, options) { From a9626cba0e182dcd559031fda3e13a603606cdca Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 20:21:27 +0200 Subject: [PATCH 79/90] this should fix theaterButton --- plugin/TheaterButton/TheaterButton.php | 6 +++++- plugin/TheaterButton/addButton.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/TheaterButton/TheaterButton.php b/plugin/TheaterButton/TheaterButton.php index e79e34e6dde6..95b9ab39fdfb 100644 --- a/plugin/TheaterButton/TheaterButton.php +++ b/plugin/TheaterButton/TheaterButton.php @@ -42,7 +42,11 @@ public function getFooterCode() { } $obj = $this->getDataObject(); $js = ''; - + $tmp = "mainVideo"; + if($_SESSION['type']=="audio"){ + $tmp = "mainAudio"; + } + $js .= ''; if(!empty($obj->show_switch_button)){ $js .= ''; }else{ diff --git a/plugin/TheaterButton/addButton.js b/plugin/TheaterButton/addButton.js index 98a5fdd677a3..481a698fdfef 100644 --- a/plugin/TheaterButton/addButton.js +++ b/plugin/TheaterButton/addButton.js @@ -1,7 +1,7 @@ $(document).ready(function () { // Extend default if (typeof player == 'undefined') { - player = videojs('mainVideo'); + player = videojs(videoJsId); } // Extend default var Button = videojs.getComponent('Button'); From 8cc71c90074ee006b30330e8bbab8e7769299441 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 5 Apr 2018 20:43:53 +0200 Subject: [PATCH 80/90] make theater-button working for audio. it's buggy when used, but at least the second click make it ok again --- view/include/audio.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/view/include/audio.php b/view/include/audio.php index 517693f6a2e0..50142c0115d5 100644 --- a/view/include/audio.php +++ b/view/include/audio.php @@ -1,6 +1,6 @@ -
-
-
+
+
+
Date: Thu, 5 Apr 2018 22:42:59 +0200 Subject: [PATCH 81/90] seems i've merged something wrong, corrected.. also add download-buttons to gallery-plugin (when enabled) --- plugin/Gallery/view/modeGallery.php | 55 ++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/plugin/Gallery/view/modeGallery.php b/plugin/Gallery/view/modeGallery.php index b0fa43053a45..b4058492c077 100644 --- a/plugin/Gallery/view/modeGallery.php +++ b/plugin/Gallery/view/modeGallery.php @@ -302,7 +302,7 @@ class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding"> $poster = $images->poster; ?>
- <?php echo $video['title']; ?> + <?php echo $video['title']; ?> @@ -410,7 +410,7 @@ function afterExtraVideos($liveLi){ $poster = $images->thumbsJpg; ?>
- <?php echo $value['title']; ?> + <?php echo $value['title']; ?> @@ -459,6 +459,18 @@ function afterExtraVideos($liveLi){
+ + getAllow_download()) { + $ext = ".mp4"; + if($value['type']=="audio"){ + if(file_exists($global['systemRootPath']."videos/".$value['filename'].".ogg")){ + $ext = ".ogg"; + } else if(file_exists($global['systemRootPath']."videos/".$value['filename'].".mp3")){ + $ext = ".mp3"; + } + } ?> + +
@@ -510,7 +522,7 @@ function afterExtraVideos($liveLi){ $poster = $images->thumbsJpg; ?>
- <?php echo $value['title']; ?> + <?php echo $value['title']; ?> img src="img/loading-gif.png" data-src="" style="position: absolute; top: 0; display: none;" alt="" id="thumbsGIF" class="thumbsGIF img-responsive rotate" height="130" /> @@ -556,6 +568,17 @@ function afterExtraVideos($liveLi){
+ getAllow_download()) { + $ext = ".mp4"; + if($value['type']=="audio"){ + if(file_exists($global['systemRootPath']."videos/".$value['filename'].".ogg")){ + $ext = ".ogg"; + } else if(file_exists($global['systemRootPath']."videos/".$value['filename'].".mp3")){ + $ext = ".mp3"; + } + } ?> + +
@@ -607,7 +630,7 @@ function afterExtraVideos($liveLi){ $poster = $images->thumbsJpg; ?>
- <?php echo $value['title']; ?> + <?php echo $value['title']; ?> @@ -658,6 +681,17 @@ function afterExtraVideos($liveLi){
+ getAllow_download()) { + $ext = ".mp4"; + if($value['type']=="audio"){ + if(file_exists($global['systemRootPath']."videos/".$value['filename'].".ogg")){ + $ext = ".ogg"; + } else if(file_exists($global['systemRootPath']."videos/".$value['filename'].".mp3")){ + $ext = ".mp3"; + } + } ?> + +
@@ -707,7 +741,7 @@ function afterExtraVideos($liveLi){ $poster = $images->thumbsJpg; ?>
- <?php echo $value['title']; ?> + <?php echo $value['title']; ?> @@ -752,6 +786,17 @@ function afterExtraVideos($liveLi){
+ getAllow_download()) { + $ext = ".mp4"; + if($value['type']=="audio"){ + if(file_exists($global['systemRootPath']."videos/".$value['filename'].".ogg")){ + $ext = ".ogg"; + } else if(file_exists($global['systemRootPath']."videos/".$value['filename'].".mp3")){ + $ext = ".mp3"; + } + } ?> + + From a33c460ad11bf5feac1ccf46b59b0428bf0e94be Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 5 Apr 2018 18:35:28 -0300 Subject: [PATCH 82/90] Fix bug --- objects/video.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/objects/video.php b/objects/video.php index f130113da7e1..1085900fcdf3 100644 --- a/objects/video.php +++ b/objects/video.php @@ -1248,11 +1248,12 @@ static function getSourceFile($filename, $type=".jpg", $includeS3 = false) { * */ $aws_s3 = YouPHPTubePlugin::loadPluginIfEnabled('AWS_S3'); - $aws_s3_obj = $aws_s3->getDataObject(); - if(!empty($aws_s3_obj->useS3DirectLink)){ - $includeS3 = true; + if(!empty($aws_s3)){ + $aws_s3_obj = $aws_s3->getDataObject(); + if(!empty($aws_s3_obj->useS3DirectLink)){ + $includeS3 = true; + } } - $source = array(); $source['path'] = "{$global['systemRootPath']}videos/{$filename}{$type}"; $source['url'] = "{$global['webSiteRootURL']}videos/{$filename}{$type}"; @@ -1476,6 +1477,21 @@ static function getTotalVideosThumbsUpFromUser($users_id, $startDate, $endDate) return $r; } + + static function deleteThumbs($filename){ + if(empty($filename)){ + return false; + } + global $global; + $filePath = "{$global['systemRootPath']}videos/{$filename}"; + // Streamlined for less coding space. + $files = glob("{$filePath}_thumbs*.jpg"); + foreach ($files as $file) { + if (file_exists($file)) { + @unlink($file); + } + } + } } From 52cd226d34278741f338b47671e8191ddf3ade66 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 5 Apr 2018 18:56:23 -0300 Subject: [PATCH 83/90] Fix upload image --- objects/uploadPoster.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/objects/uploadPoster.php b/objects/uploadPoster.php index ad18c6fb711f..1ddf30e9e9b6 100644 --- a/objects/uploadPoster.php +++ b/objects/uploadPoster.php @@ -7,8 +7,8 @@ require_once $global['systemRootPath'] . 'objects/video.php'; $obj = new stdClass(); $obj->error = true; -if (!User::canUpload()) { - $obj->msg = 'Only logged users can file_dataoad'; +if (!Video::canEdit($_GET['video_id'])) { + $obj->msg = 'You cant edit this file'; die(json_encode($obj)); } header('Content-Type: application/json'); @@ -32,6 +32,9 @@ if (!move_uploaded_file($_FILES['file_data']['tmp_name'], "{$global['systemRootPath']}videos/" . $video->getFilename().".{$_GET['type']}")) { $obj->msg = "Error on move_file_dataoaded_file(" . $_FILES['file_data']['tmp_name'] . ", " . "{$global['systemRootPath']}videos/" . $filename.".{$_GET['type']})"; die(json_encode($obj)); + }else{ + // delete thumbs from poster + Video::deleteThumbs($video->getFilename()); } $obj->error = false; echo "{}"; From ddedd8d6a7f4453bbe9470ddbc74537fa23fe8ab Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Fri, 6 Apr 2018 00:42:02 +0200 Subject: [PATCH 84/90] a lot of fixes and improvments --- plugin/Gallery/view/modeGallery.php | 126 +++++++++++++++++++--------- 1 file changed, 87 insertions(+), 39 deletions(-) diff --git a/plugin/Gallery/view/modeGallery.php b/plugin/Gallery/view/modeGallery.php index b4058492c077..2abfb56034e2 100644 --- a/plugin/Gallery/view/modeGallery.php +++ b/plugin/Gallery/view/modeGallery.php @@ -103,7 +103,6 @@ function createOrderInfo($getName, $mostWord, $lessWord, $orderString)