From de2ac4dce190f3204285e484fec4d6b0d222bab2 Mon Sep 17 00:00:00 2001 From: Darko Date: Fri, 13 Feb 2015 15:45:22 +0100 Subject: [PATCH] Add XXX SD Clips and XXX HD Clips categories. Will need some more refinement. --- lib/DB/patches/110~category.sql | 3 +++ lib/copy_this/www/lib/Categorize.php | 19 +++++++++++++++++++ lib/copy_this/www/lib/XXX.php | 2 +- lib/copy_this/www/lib/category.php | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 lib/DB/patches/110~category.sql diff --git a/lib/DB/patches/110~category.sql b/lib/DB/patches/110~category.sql new file mode 100644 index 000000000..72d6068d0 --- /dev/null +++ b/lib/DB/patches/110~category.sql @@ -0,0 +1,3 @@ +INSERT INTO category (ID, title, parentID) VALUES (6041, 'HD Clips', 6000); +INSERT INTO category (ID, title, parentID) VALUES (6042, 'SD Clips', 6000); +UPDATE `tmux` SET `value` = '110' WHERE `setting` = 'sqlpatch'; \ No newline at end of file diff --git a/lib/copy_this/www/lib/Categorize.php b/lib/copy_this/www/lib/Categorize.php index 6a0c65e48..ce928853f 100644 --- a/lib/copy_this/www/lib/Categorize.php +++ b/lib/copy_this/www/lib/Categorize.php @@ -790,6 +790,8 @@ class Categorize extends Category case !preg_match('/\bXXX\b|(a\.b\.erotica|ClubSeventeen|Cum(ming|shot)|Err?oticax?|Porn(o|lation)?|Imageset|PICTURESET|JAV Uncensored|lesb(ians?|os?)|mastur(bation|e?bate)|My_Stepfather_Made_Me|nympho?|OLDER ANGELS|pictures\.erotica\.anime|sexontv|slut|Squirt|SWE6RUS|Transsexual|whore)/i', $this->releaseName): return false; case $this->isXxxPack(): + case $this->IsXxxClipHD(): + case $this->isXxxClipSD(): case $this->isXxx264(): case $this->isXxxXvid(): case $this->isXxxImageset(): @@ -813,6 +815,15 @@ class Categorize extends Category return false; } + public function isXxxClipHD() + { + if (preg_match('/MP4\-(KTR|GUSH|SEXORS|hUSHhUSH)/i', $this->releaseName) && !preg_match('/WEBRIP/i', $this->releaseName) && !preg_match('/\bwmv\b/i', $this->releaseName)) { + $this->tmpCat = \Category::CAT_XXX_CLIPHD; + return true; + } + return false; + } + public function isXxxWMV() { if (preg_match('/(\d{2}\.\d{2}\.\d{2})|([ex]\d{2,})|[^a-z0-9](f4v|flv|isom|(issue\.\d{2,})|mov|mp(4|eg)|multiformat|pack-|realmedia|uhq|wmv)[^a-z0-9]/i', $this->releaseName) && !preg_match('/SDX264XXX/i', $this->releaseName)) { @@ -868,6 +879,14 @@ class Categorize extends Category return false; } + public function isXxxClipSD() + { + if (preg_match('/(\d{2}\.\d{2}\.\d{2})/i', $this->releaseName) && !preg_match('/IMAGESET|PICTURESET|ABPEA/i', $this->releaseName) && !preg_match('/\bwmv\b/i', $this->releaseName)) { + $this->tmpCat = \Category::CAT_XXX_CLIPSD; + return true; + } + return false; + } public function isXxxSD() { if (preg_match('/SDX264XXX|XXX\.HR\./i', $this->releaseName)) { diff --git a/lib/copy_this/www/lib/XXX.php b/lib/copy_this/www/lib/XXX.php index 09befdd46..7d7c32b4c 100644 --- a/lib/copy_this/www/lib/XXX.php +++ b/lib/copy_this/www/lib/XXX.php @@ -557,7 +557,7 @@ class XXX FROM releases r WHERE r.nzbstatus = 1 AND r.xxxinfo_id = 0 - AND r.categoryID IN (6010, 6020, 6030, 6040, 6080) + AND r.categoryID IN (6010, 6020, 6030, 6040, 6041, 6042, 6080) LIMIT %d", $this->movieqty ) diff --git a/lib/copy_this/www/lib/category.php b/lib/copy_this/www/lib/category.php index 7d96c2fa6..5ff0101af 100644 --- a/lib/copy_this/www/lib/category.php +++ b/lib/copy_this/www/lib/category.php @@ -54,6 +54,8 @@ class Category const CAT_XXX_WMV = 6020; const CAT_XXX_XVID = 6030; const CAT_XXX_X264 = 6040; + const CAT_XXX_CLIPHD = 6041; + const CAT_XXX_CLIPSD = 6042; const CAT_XXX_PACK = 6050; const CAT_XXX_IMAGESET = 6060; const CAT_XXX_OTHER = 6070;