diff --git a/Blacklight/Categorize.php b/Blacklight/Categorize.php index 34662fde3..d9ae3b416 100755 --- a/Blacklight/Categorize.php +++ b/Blacklight/Categorize.php @@ -618,6 +618,7 @@ class Categorize extends Category case $this->isHDTV(): case $this->isSDTV(): case $this->isOtherTV2(): + case $this->isTVx265(): return true; default: $this->tmpCat = self::TV_OTHER; @@ -808,6 +809,20 @@ class Categorize extends Category return false; } + /** + * @return bool + */ + public function isTVx265(): bool + { + if (! preg_match('/(S\d+).*(x265).*(rmteam|MeGusta|HETeam|PSA|ONLY|H4S5S|TrollHD|ImE)/i', $this->releaseName)) { + $this->tmpCat = self::TV_x265; + + return true; + } + + return false; + } + // Movies. /** @@ -972,6 +987,20 @@ class Categorize extends Category return false; } + /** + * @return bool + */ + public function isMovieX265(): bool + { + if (! preg_match('/(\w+[\.-_\s]+).*(x265).*(Tigole|SESKAPiLE|CHD|IAMABLE|THREESOME|OohLaLa|DEFLATE)/i', $this->releaseName)) { + $this->tmpCat = self::MOVIE_X265; + + return true; + } + + return false; + } + // PC. /** diff --git a/Changelog b/Changelog index d9b920bd4..2ca5f3e9a 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-10-31 DariusIII + * Chg: Add x265 Movies and TV categories * Fix: Fix query in reset_postprocessing script related to misc categories reset * Chg: Update Forking class - remove pdo * Chg: Increase group_concat_max_len in groupfixrelnames script diff --git a/app/Models/Category.php b/app/Models/Category.php index fc662dd12..6c45b731b 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -62,6 +62,7 @@ class Category extends Model public const MOVIE_BLURAY = 2060; public const MOVIE_DVD = 2070; public const MOVIE_WEBDL = 2080; + public const MOVIE_X265 = 2090; public const MUSIC_MP3 = 3010; public const MUSIC_VIDEO = 3020; public const MUSIC_AUDIOBOOK = 3030; @@ -84,6 +85,7 @@ class Category extends Model public const TV_SPORT = 5060; public const TV_ANIME = 5070; public const TV_DOCU = 5080; + public const TV_X265 = 5090; public const XXX_DVD = 6010; public const XXX_WMV = 6020; public const XXX_XVID = 6030; @@ -139,6 +141,7 @@ class Category extends Model self::MOVIE_BLURAY, self::MOVIE_DVD, self::MOVIE_WEBDL, + self::MOVIE_X265, ]; public const TV_GROUP = @@ -153,6 +156,7 @@ class Category extends Model self::TV_DOCU, self::TV_SPORT, self::TV_WEBDL, + self::TV_X265, ]; /** diff --git a/build/nntmux.xml b/build/nntmux.xml index 8c1136da7..4a21633b3 100755 --- a/build/nntmux.xml +++ b/build/nntmux.xml @@ -16,8 +16,8 @@ - 356 - 356 + 357 + 357 diff --git a/docs/newznab_api_specification.txt b/docs/newznab_api_specification.txt index 76b3352dc..86e26863a 100755 --- a/docs/newznab_api_specification.txt +++ b/docs/newznab_api_specification.txt @@ -1,7 +1,7 @@ newznab Usenet Searching Web API - v0.6-NNTmux - 2017-01-17 + v1.0-NNTmux + 2018-10-31 Authors: ensi ensisoft@gmail.com @@ -612,6 +612,7 @@ newznab-tmux https://github.com/NNTmux/newznab-tmux 2060 Movies/BluRay Full BR movies 2070 Movies/DVD Full DVD movies 2080 Movies/WEBDL WEB-DL movies + 2090 Movies/X265 x265 encoded movies 3000 Audio All of audio 3010 Audio/MP3 Mp3 music 3020 Audio/Video Music videos @@ -636,6 +637,7 @@ newznab-tmux https://github.com/NNTmux/newznab-tmux 5060 TV/Sport Sports 5070 TV/Anime Anime 5080 TV/Documentary Documentaries + 5090 TV/X265 x265 encoded TV 6000 XXX All of XXX 6010 XXX/DVD Full DVD's 6020 XXX/WMV WMV rips diff --git a/resources/db/patches/0357~categories.sql b/resources/db/patches/0357~categories.sql new file mode 100644 index 000000000..5322c6fa1 --- /dev/null +++ b/resources/db/patches/0357~categories.sql @@ -0,0 +1,3 @@ +# Add new x265 categories into movies and tv +INSERT IGNORE INTO categories (id, title, parentid) VALUES (2090, 'X265', 2000); +INSERT IGNORE INTO categories (id, title, parentid) VALUES (5090, 'X265', 5000);