mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
Update AudioBook categorization
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Blacklight;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\Settings;
|
||||
use App\Models\UsenetGroup;
|
||||
|
||||
/**
|
||||
* Categorizing of releases by name/group.
|
||||
@@ -54,6 +55,11 @@ class Categorize
|
||||
*/
|
||||
public $groupid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $groupName;
|
||||
|
||||
/**
|
||||
* Categorize constructor.
|
||||
*
|
||||
@@ -82,6 +88,7 @@ class Categorize
|
||||
$this->releaseName = $releaseName;
|
||||
$this->groupid = $groupID;
|
||||
$this->poster = $poster;
|
||||
$this->groupName = UsenetGroup::whereId($this->groupid)->value('name');
|
||||
|
||||
switch (true) {
|
||||
case $this->isMisc():
|
||||
@@ -1244,6 +1251,15 @@ class Categorize
|
||||
return true;
|
||||
}
|
||||
|
||||
if (preg_match('/audiobook/', $this->groupName)) {
|
||||
if ($this->categorizeForeign && $this->isMusicForeign()) {
|
||||
return false;
|
||||
}
|
||||
$this->tmpCat = Category::MUSIC_AUDIOBOOK;
|
||||
$this->tmpTag[] = Category::TAG_MUSIC_AUDIOBOOK;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user