Skip to content

Commit

Permalink
Add x265 Movies and TV categories
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Oct 31, 2018
1 parent a227e9f commit edd80df
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
29 changes: 29 additions & 0 deletions Blacklight/Categorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ public function isTV(): bool
case $this->isHDTV():
case $this->isSDTV():
case $this->isOtherTV2():
case $this->isTVx265():
return true;
default:
$this->tmpCat = self::TV_OTHER;
Expand Down Expand Up @@ -808,6 +809,20 @@ public function isOtherTV2(): bool
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.

/**
Expand Down Expand Up @@ -972,6 +987,20 @@ public function isMovieWEBDL(): bool
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.

/**
Expand Down
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions app/Models/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -139,6 +141,7 @@ class Category extends Model
self::MOVIE_BLURAY,
self::MOVIE_DVD,
self::MOVIE_WEBDL,
self::MOVIE_X265,
];

public const TV_GROUP =
Expand All @@ -153,6 +156,7 @@ class Category extends Model
self::TV_DOCU,
self::TV_SPORT,
self::TV_WEBDL,
self::TV_X265,
];

/**
Expand Down
4 changes: 2 additions & 2 deletions build/nntmux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</last>
</scripts>
<sql>
<db>356</db>
<file>356</file>
<db>357</db>
<file>357</file>
</sql>
</versions>
</nntmux>
6 changes: 4 additions & 2 deletions docs/newznab_api_specification.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
newznab Usenet Searching Web API

v0.6-NNTmux
2017-01-17
v1.0-NNTmux
2018-10-31

Authors:
ensi [email protected]
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions resources/db/patches/0357~categories.sql
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit edd80df

Please sign in to comment.