Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
DariusIII
2020-01-01 23:03:32 +00:00
committed by StyleCI Bot
parent 27c8001435
commit ad1a6673f5
27 changed files with 338 additions and 349 deletions
+21 -21
View File
@@ -77,27 +77,27 @@ class IRCScraper extends IRCClient
$this->_ignoredChannels = unserialize(
config('irc_settings.scrape_irc_source_ignore'),
['allowed_classes' => ['#a.b.cd.image',
'#a.b.console.ps3',
'#a.b.dvd',
'#a.b.erotica',
'#a.b.flac',
'#a.b.foreign',
'#a.b.games.nintendods',
'#a.b.inner-sanctum',
'#a.b.moovee',
'#a.b.movies.divx',
'#a.b.sony.psp',
'#a.b.sounds.mp3.complete_cd',
'#a.b.teevee',
'#a.b.games.wii',
'#a.b.warez',
'#a.b.games.xbox360',
'#pre@corrupt',
'#scnzb',
'#tvnzb',
'srrdb',
],
]
'#a.b.console.ps3',
'#a.b.dvd',
'#a.b.erotica',
'#a.b.flac',
'#a.b.foreign',
'#a.b.games.nintendods',
'#a.b.inner-sanctum',
'#a.b.moovee',
'#a.b.movies.divx',
'#a.b.sony.psp',
'#a.b.sounds.mp3.complete_cd',
'#a.b.teevee',
'#a.b.games.wii',
'#a.b.warez',
'#a.b.games.xbox360',
'#pre@corrupt',
'#scnzb',
'#tvnzb',
'srrdb',
],
]
);
} else {
$this->_ignoredChannels = [
+10 -10
View File
@@ -1309,9 +1309,9 @@ class NameFixer
'multi_match' => [
'query' => $preMatch[1],
'fields' => ['filename', 'title'],
]
]
]
],
],
],
];
$primaryResults = \Elasticsearch::search($search);
@@ -2505,9 +2505,9 @@ class NameFixer
'multi_match' => [
'query' => $this->_fileName,
'fields' => ['filename', 'title'],
]
]
]
],
],
],
];
$primaryResults = \Elasticsearch::search($search);
@@ -2561,9 +2561,9 @@ class NameFixer
'multi_match' => [
'query' => $this->_fileName,
'fields' => ['filename', 'title'],
]
]
]
],
],
],
];
$primaryResults = \Elasticsearch::search($search);
@@ -2582,7 +2582,7 @@ class NameFixer
}
} else {
foreach ($this->sphinx->searchIndexes('predb_rt', $this->_fileName, ['title']) as $match) {
if (!empty($match)) {
if (! empty($match)) {
$this->updateRelease($release, $match['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show, $match['id']);
return true;
+30 -30
View File
@@ -295,18 +295,18 @@ class ReleaseExtra
$ckid = VideoData::query()->where('releases_id', $releaseID)->first(['releases_id']);
if ($ckid === null) {
VideoData::insertOrIgnore([
'releases_id' => $releaseID,
'containerformat' => $containerFormat,
'overallbitrate' => $overallBitRate,
'videoduration' => is_numeric($videoDuration) ? realDuration($videoDuration) : $videoDuration,
'videoformat' => $videoFormat,
'videocodec' => $videoCodec,
'videowidth' => $videoWidth,
'videoheight' => $videoHeight,
'videoaspect' => $videoAspect,
'videoframerate' => $videoFrameRate,
'videolibrary' => $videoLibrary,
]);
'releases_id' => $releaseID,
'containerformat' => $containerFormat,
'overallbitrate' => $overallBitRate,
'videoduration' => is_numeric($videoDuration) ? realDuration($videoDuration) : $videoDuration,
'videoformat' => $videoFormat,
'videocodec' => $videoCodec,
'videowidth' => $videoWidth,
'videoheight' => $videoHeight,
'videoaspect' => $videoAspect,
'videoframerate' => $videoFrameRate,
'videolibrary' => $videoLibrary,
]);
}
}
@@ -328,18 +328,18 @@ class ReleaseExtra
$ckid = AudioData::query()->where('releases_id', $releaseID)->first(['releases_id']);
if ($ckid === null) {
AudioData::insertOrIgnore([
'releases_id' => $releaseID,
'audioid' => $audioID,
'audioformat' => \is_array($audioFormat) ? implode($audioFormat) : $audioFormat,
'audiomode' => \is_array($audioMode) ? implode($audioMode) : $audioMode,
'audiobitratemode' => \is_array($audioBitRateMode) ? implode($audioBitRateMode) : $audioBitRateMode,
'audiobitrate' => \is_array($audioBitRate) ? implode($audioBitRate) : $audioBitRate,
'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels,
'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate,
'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary,
'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage[1] : '',
'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle,
]);
'releases_id' => $releaseID,
'audioid' => $audioID,
'audioformat' => \is_array($audioFormat) ? implode($audioFormat) : $audioFormat,
'audiomode' => \is_array($audioMode) ? implode($audioMode) : $audioMode,
'audiobitratemode' => \is_array($audioBitRateMode) ? implode($audioBitRateMode) : $audioBitRateMode,
'audiobitrate' => \is_array($audioBitRate) ? implode($audioBitRate) : $audioBitRate,
'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels,
'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate,
'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary,
'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage[1] : '',
'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle,
]);
}
}
@@ -375,14 +375,14 @@ class ReleaseExtra
public function addUID($releaseID, $uniqueId): void
{
$dupecheck = ReleaseUnique::query()->where('releases_id', $releaseID)->orWhere([
'releases_id' => $releaseID,
'uniqueid' => $uniqueId,
])->first(['releases_id']);
'releases_id' => $releaseID,
'uniqueid' => $uniqueId,
])->first(['releases_id']);
if ($dupecheck === null) {
ReleaseUnique::insertOrIgnore([
'releases_id' => $releaseID,
'uniqueid' => $uniqueId,
]);
'releases_id' => $releaseID,
'uniqueid' => $uniqueId,
]);
}
}
+4 -4
View File
@@ -1364,10 +1364,10 @@ class ReleaseRemover
str_replace(
['-', '(', ')', '.', '?', 'nl subed|bed|s'],
[
'',
'',
'',
' ', '', 'nlsubs|nlsubbed|nlsubed', ],
'',
'',
'',
' ', '', 'nlsubs|nlsubbed|nlsubed', ],
substr(
$dbRegex,
$forBegin,
+16 -23
View File
@@ -461,7 +461,6 @@ class Releases extends Release
}
}
if ($identifiers['i'] !== false) {
$params = [
'index' => 'releases',
'id' => $identifiers['i'],
@@ -592,8 +591,8 @@ class Releases extends Release
'body' => [
'query' => [
'match' => $searchFields,
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -601,7 +600,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
} else {
$results = $this->sphinxSearch->searchIndexes('releases_rt', '', [], $searchFields);
@@ -710,8 +708,8 @@ class Releases extends Release
'match' => [
'searchname' => $searchName,
],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -719,7 +717,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
} else {
$searchResult = Arr::pluck($this->sphinxSearch->searchIndexes('releases_rt', $searchName, ['searchname']), 'id');
@@ -874,10 +871,10 @@ class Releases extends Release
'body' => [
'query' => [
'match' => [
'searchname' => $name
'searchname' => $name,
],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -885,7 +882,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
if (empty($searchResult)) {
return collect();
@@ -1043,10 +1039,10 @@ class Releases extends Release
'body' => [
'query' => [
'match' => [
'searchname' => $name
'searchname' => $name,
],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -1054,7 +1050,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
if (empty($searchResult)) {
return collect();
@@ -1148,10 +1143,10 @@ class Releases extends Release
'body' => [
'query' => [
'match' => [
'searchname' => $name
'searchname' => $name,
],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -1159,7 +1154,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
if (empty($searchResult)) {
return collect();
@@ -1253,10 +1247,10 @@ class Releases extends Release
'body' => [
'query' => [
'match' => [
'searchname' => $name
'searchname' => $name,
],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -1264,7 +1258,6 @@ class Releases extends Release
$searchResult = [];
foreach ($results['hits']['hits'] as $result) {
$searchResult[] = $result['_source']['id'];
}
if (empty($searchResult)) {
return collect();
+25 -25
View File
@@ -51,10 +51,10 @@ class TMDB extends TV
parent::__construct($options);
$this->token = new ApiToken(config('tmdb.api_key'));
$this->client = new Client($this->token, [
'cache' => [
'enabled' => false,
],
]
'cache' => [
'enabled' => false,
],
]
);
$this->configRepository = new ConfigurationRepository($this->client);
$this->config = $this->configRepository->load();
@@ -372,21 +372,21 @@ class TMDB extends TV
}
return [
'type' => parent::TYPE_TV,
'title' => (string) $show['name'],
'summary' => (string) $show['overview'],
'started' => (string) $show['first_air_date'],
'publisher' => isset($show['network']) ? (string) $show['network'] : '',
'country' => $show['origin_country'][0] ?? '',
'source' => parent::SOURCE_TMDB,
'imdb' => isset($imdb['imdbid']) ? (int) $imdb['imdbid'] : 0,
'tvdb' => isset($show['external_ids']['tvdb_id']) ? (int) $show['external_ids']['tvdb_id'] : 0,
'trakt' => 0,
'tvrage' => isset($show['external_ids']['tvrage_id']) ? (int) $show['external_ids']['tvrage_id'] : 0,
'tvmaze' => 0,
'tmdb' => (int) $show['id'],
'aliases' => ! empty($show['alternative_titles']) ? (array) $show['alternative_titles'] : '',
'localzone' => "''",
'type' => parent::TYPE_TV,
'title' => (string) $show['name'],
'summary' => (string) $show['overview'],
'started' => (string) $show['first_air_date'],
'publisher' => isset($show['network']) ? (string) $show['network'] : '',
'country' => $show['origin_country'][0] ?? '',
'source' => parent::SOURCE_TMDB,
'imdb' => isset($imdb['imdbid']) ? (int) $imdb['imdbid'] : 0,
'tvdb' => isset($show['external_ids']['tvdb_id']) ? (int) $show['external_ids']['tvdb_id'] : 0,
'trakt' => 0,
'tvrage' => isset($show['external_ids']['tvrage_id']) ? (int) $show['external_ids']['tvrage_id'] : 0,
'tvmaze' => 0,
'tmdb' => (int) $show['id'],
'aliases' => ! empty($show['alternative_titles']) ? (array) $show['alternative_titles'] : '',
'localzone' => "''",
];
}
@@ -401,12 +401,12 @@ class TMDB extends TV
protected function formatEpisodeInfo($episode): array
{
return [
'title' => (string) $episode['name'],
'series' => (int) $episode['season_number'],
'episode' => (int) $episode['episode_number'],
'se_complete' => 'S'.sprintf('%02d', $episode['season_number']).'E'.sprintf('%02d', $episode['episode_number']),
'firstaired' => (string) $episode['air_date'],
'summary' => (string) $episode['overview'],
'title' => (string) $episode['name'],
'series' => (int) $episode['season_number'],
'episode' => (int) $episode['episode_number'],
'se_complete' => 'S'.sprintf('%02d', $episode['season_number']).'E'.sprintf('%02d', $episode['episode_number']),
'firstaired' => (string) $episode['air_date'],
'summary' => (string) $episode['overview'],
];
}
}
+17 -17
View File
@@ -236,25 +236,25 @@ abstract class TV extends Videos
if ($title === null) {
// Insert the Show
$videoId = Video::query()->insertGetId([
'type' => $show['type'],
'title' => $show['title'],
'countries_id' => $show['country'] ?? '',
'started' => $show['started'],
'source' => $show['source'],
'tvdb' => $show['tvdb'],
'trakt' => $show['trakt'],
'tvrage' => $show['tvrage'],
'tvmaze' => $show['tvmaze'],
'imdb' => $show['imdb'],
'tmdb' => $show['tmdb'],
]);
'type' => $show['type'],
'title' => $show['title'],
'countries_id' => $show['country'] ?? '',
'started' => $show['started'],
'source' => $show['source'],
'tvdb' => $show['tvdb'],
'trakt' => $show['trakt'],
'tvrage' => $show['tvrage'],
'tvmaze' => $show['tvmaze'],
'imdb' => $show['imdb'],
'tmdb' => $show['tmdb'],
]);
// Insert the supplementary show info
TvInfo::query()->insert([
'videos_id' => $videoId,
'summary' => $show['summary'],
'publisher' => $show['publisher'],
'localzone' => $show['localzone'],
]);
'videos_id' => $videoId,
'summary' => $show['summary'],
'publisher' => $show['publisher'],
'localzone' => $show['localzone'],
]);
// If we have AKAs\aliases, insert those as well
if (! empty($show['aliases'])) {
$this->addAliases($videoId, $show['aliases']);
+25 -25
View File
@@ -56,10 +56,10 @@ class TraktTv extends TV
parent::__construct($options);
$clientId = Settings::settingValue('APIs..trakttvclientkey');
$requestHeaders = [
'Content-Type' => 'application/json',
'trakt-api-version' => 2,
'trakt-api-key' => $clientId,
'Content-Length' => 0,
'Content-Type' => 'application/json',
'trakt-api-version' => 2,
'trakt-api-key' => $clientId,
'Content-Length' => 0,
];
$this->client = new TraktAPI($requestHeaders);
}
@@ -331,21 +331,21 @@ class TraktTv extends TV
$this->localizedTZ = $show['airs']['timezone'];
return [
'type' => parent::TYPE_TV,
'title' => (string) $show['title'],
'summary' => (string) $show['overview'],
'started' => Time::localizeAirdate($show['first_aired'], $this->localizedTZ),
'publisher' => (string) $show['network'],
'country' => (string) $show['country'],
'source' => parent::SOURCE_TRAKT,
'imdb' => $imdb['imdbid'] ?? 0,
'tvdb' => $show['ids']['tvdb'] ?? 0,
'trakt' => (int) $show['ids']['trakt'],
'tvrage' => $show['ids']['tvrage'] ?? 0,
'tvmaze' => 0,
'tmdb' => $show['ids']['tmdb'] ?? 0,
'aliases' => isset($show['aliases']) && ! empty($show['aliases']) ? (array) $show['aliases'] : '',
'localzone' => $this->localizedTZ,
'type' => parent::TYPE_TV,
'title' => (string) $show['title'],
'summary' => (string) $show['overview'],
'started' => Time::localizeAirdate($show['first_aired'], $this->localizedTZ),
'publisher' => (string) $show['network'],
'country' => (string) $show['country'],
'source' => parent::SOURCE_TRAKT,
'imdb' => $imdb['imdbid'] ?? 0,
'tvdb' => $show['ids']['tvdb'] ?? 0,
'trakt' => (int) $show['ids']['trakt'],
'tvrage' => $show['ids']['tvrage'] ?? 0,
'tvmaze' => 0,
'tmdb' => $show['ids']['tmdb'] ?? 0,
'aliases' => isset($show['aliases']) && ! empty($show['aliases']) ? (array) $show['aliases'] : '',
'localzone' => $this->localizedTZ,
];
}
@@ -360,12 +360,12 @@ class TraktTv extends TV
public function formatEpisodeInfo($episode): array
{
return [
'title' => (string) $episode['title'],
'series' => (int) $episode['season'],
'episode' => (int) $episode['epsiode'],
'se_complete' => 'S'.sprintf('%02d', $episode['season']).'E'.sprintf('%02d', $episode['episode']),
'firstaired' => Time::localizeAirdate($episode['first_aired'], $this->localizedTZ),
'summary' => (string) $episode['overview'],
'title' => (string) $episode['title'],
'series' => (int) $episode['season'],
'episode' => (int) $episode['epsiode'],
'se_complete' => 'S'.sprintf('%02d', $episode['season']).'E'.sprintf('%02d', $episode['episode']),
'firstaired' => Time::localizeAirdate($episode['first_aired'], $this->localizedTZ),
'summary' => (string) $episode['overview'],
];
}
}
+9 -9
View File
@@ -11,15 +11,15 @@ class FixturesUp extends Command
* @var array
*/
private static $allowedTables = [
'binaryblacklist',
'root_categories',
'categories',
'category_regexes',
'collection_regexes',
'content',
'usenet_groups',
'release_naming_regexes',
'settings',
'binaryblacklist',
'root_categories',
'categories',
'category_regexes',
'collection_regexes',
'content',
'usenet_groups',
'release_naming_regexes',
'settings',
];
/**
* The name and signature of the console command.
+6 -6
View File
@@ -96,9 +96,9 @@ class NntmuxResetDb extends Command
'body' => [
'settings' => [
'number_of_shards' => 2,
'number_of_replicas' => 0
]
]
'number_of_replicas' => 0,
],
],
];
Elasticsearch::indices()->create($releases_index);
@@ -111,9 +111,9 @@ class NntmuxResetDb extends Command
'body' => [
'settings' => [
'number_of_shards' => 2,
'number_of_replicas' => 0
]
]
'number_of_replicas' => 0,
],
],
];
Elasticsearch::indices()->create($predb_index);
+5 -5
View File
@@ -55,12 +55,12 @@ class Git
$defaults = [
'branches' => [
'stable' => [
'master',
'\d+\.\d+\.\d+(\.\d+)?',
],
'master',
'\d+\.\d+\.\d+(\.\d+)?',
],
'development' => [
'dev',
],
'dev',
],
],
'filepath' => NN_ROOT,
];
@@ -183,7 +183,7 @@ class RegisterController extends Controller
return $this->registered($request, $user) ?: redirect($this->redirectPath())->with('info', 'Your Account has been created. You will receive a separate verification email shortly.');
}
break;
case 'view': {
case 'view':
// See if it is a valid invite.
if (($inviteCode !== null) && ! Invite::isValid($inviteCode)) {
$error = 'Invalid invitation token!';
@@ -192,7 +192,7 @@ class RegisterController extends Controller
$showRegister = 1;
}
break;
}
}
app('smarty.view')->assign(
[
+2 -3
View File
@@ -196,8 +196,8 @@ class Predb extends Model
'body' => [
'query' => [
'match' =>['title' => $search],
]
]
],
],
];
$results = \Elasticsearch::search($search);
@@ -205,7 +205,6 @@ class Predb extends Model
$ids = [];
foreach ($results['hits']['hits'] as $result) {
$ids[] = $result['_source']['id'];
}
} else {
$sphinx = new SphinxSearch();
+8 -8
View File
@@ -117,14 +117,14 @@ class ReleaseFile extends Model
if ($duplicateCheck === null && $releaseCheck !== null) {
try {
$insert = self::insertOrIgnore([
'releases_id' => $id,
'name' => $name,
'size' => $size,
'created_at' => $adjustedCreatedTime,
'updated_at' => now()->timestamp,
'passworded' => $hasPassword,
'crc32' => $crc,
]);
'releases_id' => $id,
'name' => $name,
'size' => $size,
'created_at' => $adjustedCreatedTime,
'updated_at' => now()->timestamp,
'passworded' => $hasPassword,
'crc32' => $crc,
]);
} catch (\PDOException $e) {
Log::alert($e->getMessage());
}
+13 -13
View File
@@ -309,16 +309,16 @@ class UsenetGroup extends Model
$checkOld = UsenetGroup::query()->where('name', trim($group['name']))->first();
if (empty($checkOld)) {
return self::query()->insertGetId([
'name' => trim($group['name']),
'description' => isset($group['description']) ? trim($group['description']) : '',
'backfill_target' => $group['backfill_target'] ?? 1,
'first_record' => $group['first_record'] ?? 0,
'last_record' => $group['last_record'] ?? 0,
'active' => $group['active'] ?? 0,
'backfill' => $group['backfill'] ?? 0,
'minsizetoformrelease' => $group['minsizetoformrelease'] ?? null,
'minfilestoformrelease' => $group['minfilestoformrelease'] ?? null,
]);
'name' => trim($group['name']),
'description' => isset($group['description']) ? trim($group['description']) : '',
'backfill_target' => $group['backfill_target'] ?? 1,
'first_record' => $group['first_record'] ?? 0,
'last_record' => $group['last_record'] ?? 0,
'active' => $group['active'] ?? 0,
'backfill' => $group['backfill'] ?? 0,
'minsizetoformrelease' => $group['minsizetoformrelease'] ?? null,
'minfilestoformrelease' => $group['minfilestoformrelease'] ?? null,
]);
}
return $checkOld->id;
@@ -420,9 +420,9 @@ class UsenetGroup extends Model
foreach ($res as $row) {
$releases->deleteSingle(
[
'g' => $row['guid'],
'i' => $row['id'],
],
'g' => $row['guid'],
'i' => $row['id'],
],
$nzb,
$releaseImage
);
+1 -1
View File
@@ -18,7 +18,7 @@ class TagsTransformer extends TransformerAbstract
'name' => [
'normal' => $tagged->name,
'slug' => $tagged->slug,
],
],
];
}
}
+1 -1
View File
@@ -20,5 +20,5 @@ return [
| The size of each insert chunk columns x rows <= $chunk_size.
|
*/
'chunk_size' => 500,
'chunk_size' => 500,
];
+2 -2
View File
@@ -173,8 +173,8 @@ return [
| Cast the given "real type" to the given "type".
|
*/
'type_overrides' => [
'type_overrides' => [
'integer' => 'int',
'boolean' => 'bool',
],
],
];
+20 -20
View File
@@ -9,56 +9,56 @@ return [
**********************************************************************************************************************/
'username' => env('SCRAPE_IRC_USERNAME', ''),
/***********************************************************************************************************************
/***********************************************************************************************************************
* The IRC server to connect to.
* @note If you have issues connecting=>head to https://www.synirc.net/servers and try another server.
**********************************************************************************************************************/
'scrape_irc_server' => env('SCRAPE_IRC_SERVER', 'irc.synirc.net'),
'scrape_irc_server' => env('SCRAPE_IRC_SERVER', 'irc.synirc.net'),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is the port to the IRC server.
* @note If you want use SSL/TLS=>use a corresponding port (6697 or 7001 for example)=>and set SCRAPE_IRC_TLS to true.
**********************************************************************************************************************/
'scrape_irc_port' => env('SCRAPE_IRC_PORT', 6667),
'scrape_irc_port' => env('SCRAPE_IRC_PORT', 6667),
/***********************************************************************************************************************
/***********************************************************************************************************************
* If you want to use SSL/TLS encryption on the IRC server=>set this to true.
* @note Make sure you use a valid SSL/TLS port in SCRAPE_IRC_PORT.
**********************************************************************************************************************/
'scrape_irc_tls' => env('SCRAPE_IRC_TLS', false),
'scrape_irc_tls' => env('SCRAPE_IRC_TLS', false),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is the nick name visible in IRC channels.
**********************************************************************************************************************/
'scrape_irc_nickname'=> env('SCRAPE_IRC_USERNAME', ''),
'scrape_irc_nickname'=> env('SCRAPE_IRC_USERNAME', ''),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is a name that is visible to others when they type /whois nickname.
**********************************************************************************************************************/
'scrape_irc_realname'=> env('SCRAPE_IRC_USERNAME', ''),
'scrape_irc_realname'=> env('SCRAPE_IRC_USERNAME', ''),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is used as part of your "ident" when connecting to IRC.
* @note This is also the username for ZNC.
**********************************************************************************************************************/
'scrape_irc_username' => env('SCRAPE_IRC_USERNAME', ''),
'scrape_irc_username' => env('SCRAPE_IRC_USERNAME', ''),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is not required by synirc=>but if you use ZNC=>this is required.
* @note Put your password between quotes: 'mypassword'
* @note If you are using ZNC and having issues=>try 'username:password' or 'username/network:<password>'
**********************************************************************************************************************/
'scrape_irc_password' => env('SCRAPE_IRC_PASSWORD', false),
'scrape_irc_password' => env('SCRAPE_IRC_PASSWORD', false),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is an optional field you can use for ignoring categories.
* @note If you do not wish to exclude any categories=>leave it a empty string: ''
* @examples Case sensitive: '/^(XXX|PDA|EBOOK|MP3)$/'
* Case insensitive: '/^(X264|TV)$/i'
**********************************************************************************************************************/
'scrape_irc_category_ignore' => '',
'scrape_irc_category_ignore' => '',
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is an optional field you can use for ignoring PRE titles.
* @note If you do not wish to exclude any PRE titles=>leave it a empty string: ''
* @examples Case insensitive ignore German or XXX in the title: '/\.(German|XXX)\./i'
@@ -66,9 +66,9 @@ return [
* Yanks.14.06.30.Bianca.Travelman.Is.A.Nudist.XXX.MP4-FUNKY
* Blancanieves.Ein.Maerchen.von.Schwarz.und.Weiss.2012.German.1080p.BluRay.x264-CONTRiBUTiON
**********************************************************************************************************************/
'scrape_irc_title_ignore' => '',
'scrape_irc_title_ignore' => '',
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is a list of all the channels we fetch PRE's from.
**********************************************************************************************************************/
@@ -80,7 +80,7 @@ return [
]
),
/***********************************************************************************************************************
/***********************************************************************************************************************
* This is a list of all the sources we fetch PRE's from.
* If you want to ignore a source=>change it from false to true.
**********************************************************************************************************************/
+12 -12
View File
@@ -1,16 +1,16 @@
<?php
return [
'server' => env('NNTP_SERVER', ''),
'alternate_server' => env('NNTP_SERVER_A', ''),
'port' => env('NNTP_PORT', ''),
'alternate_server_port' => env('NNTP_PORT_A', ''),
'username' => env('NNTP_USERNAME', ''),
'alternate_server_username' => env('NNTP_USERNAME_A', ''),
'password' => env('NNTP_PASSWORD', ''),
'alternate_server_password' => env('NNTP_PASSWORD_A', ''),
'ssl' => env('NNTP_SSLENABLED', false),
'alternate_server_ssl' => env('NNTP_SSLENABLED_A', false),
'socket_timeout' => env('NNTP_SOCKET_TIMEOUT', 120),
'alternate_server_socket_timeout' => env('NNTP_SOCKET_TIMEOUT_A', 120),
'server' => env('NNTP_SERVER', ''),
'alternate_server' => env('NNTP_SERVER_A', ''),
'port' => env('NNTP_PORT', ''),
'alternate_server_port' => env('NNTP_PORT_A', ''),
'username' => env('NNTP_USERNAME', ''),
'alternate_server_username' => env('NNTP_USERNAME_A', ''),
'password' => env('NNTP_PASSWORD', ''),
'alternate_server_password' => env('NNTP_PASSWORD_A', ''),
'ssl' => env('NNTP_SSLENABLED', false),
'alternate_server_ssl' => env('NNTP_SSLENABLED_A', false),
'socket_timeout' => env('NNTP_SOCKET_TIMEOUT', 120),
'alternate_server_socket_timeout' => env('NNTP_SOCKET_TIMEOUT_A', 120),
];
+1 -1
View File
@@ -47,6 +47,6 @@ return [
'igdb' => [
'key' => env('IGDB_KEY', ''),
'url' => 'https://api-v3.igdb.com',
],
],
];
+1 -1
View File
@@ -6,5 +6,5 @@ return [
'indexes' => [
'releases' => 'releases_rt',
'predb' => 'predb_rt',
],
],
];
+1 -1
View File
@@ -12,7 +12,7 @@ return [
'displayer' => '\Illuminate\Support\Str::title',
// Database connection for Conner\Taggable\Tag model to use
// 'connection' => 'mysql',
// 'connection' => 'mysql',
// When deleting a model, remove all the tags first
'untag_on_delete' => true,
+84 -84
View File
@@ -95,99 +95,99 @@ return [
* See smarty docs for usage
*/
// 'auto_literal' => null,
// 'error_unassigned' => null,
// 'use_include_path' => null,
// 'joined_template_dir' => null,
// 'joined_config_dir' => null,
// 'default_template_handler_func' => null,
// 'default_config_handler_func' => null,
// 'default_plugin_handler_func' => null,
// 'use_sub_dirs' => null,
// 'allow_ambiguous_resources' => null,
// 'merge_compiled_includes' => null,
// 'inheritance_merge_compiled_includes' => null,
// 'force_cache' => null,
// 'security_class' => null,
// 'php_handling' => null,
// 'allow_php_templates' => null,
// 'direct_access_security' => null,
// 'debugging_ctrl' => null,
// 'smarty_debug_id' => null,
// 'debug_tpl' => null,
// 'error_reporting' => null,
// 'get_used_tags' => null,
// 'config_overwrite' => null,
// 'config_booleanize' => null,
// 'config_read_hidden' => null,
// 'compile_locking' => null,
// 'cache_locking' => null,
// 'locking_timeout' => null,
// 'default_resource_type' => null,
// 'caching_type' => null,
// 'properties' => null,
// 'default_config_type' => null,
// 'source_objects' => null,
// 'template_objects' => null,
// 'resource_caching' => null,
// 'template_resource_caching' => null,
// 'cache_modified_check' => null,
// 'registered_plugins' => null,
// 'plugin_search_order' => null,
// 'registered_objects' => null,
// 'registered_classes' => null,
// 'registered_filters' => null,
// 'registered_resources' => null,
// '_resource_handlers' => null,
// 'registered_cache_resources' => null,
// '_cacheresource_handlers' => null,
// 'autoload_filters' => null,
// 'default_modifiers' => null,
// 'escape_html' => null,
// 'start_time' => null,
// '_file_perms' => null,
// '_dir_perms' => null,
// '_tag_stack' => null,
// '_current_file' => null,
// '_parserdebug' => null,
// '_is_file_cache' => null,
// 'cache_id' => null,
// 'compile_id' => null,
// 'template_class' => null,
// 'tpl_vars' => null,
// 'parent' => null,
// 'config_vars' => null,
// 'auto_literal' => null,
// 'error_unassigned' => null,
// 'use_include_path' => null,
// 'joined_template_dir' => null,
// 'joined_config_dir' => null,
// 'default_template_handler_func' => null,
// 'default_config_handler_func' => null,
// 'default_plugin_handler_func' => null,
// 'use_sub_dirs' => null,
// 'allow_ambiguous_resources' => null,
// 'merge_compiled_includes' => null,
// 'inheritance_merge_compiled_includes' => null,
// 'force_cache' => null,
// 'security_class' => null,
// 'php_handling' => null,
// 'allow_php_templates' => null,
// 'direct_access_security' => null,
// 'debugging_ctrl' => null,
// 'smarty_debug_id' => null,
// 'debug_tpl' => null,
// 'error_reporting' => null,
// 'get_used_tags' => null,
// 'config_overwrite' => null,
// 'config_booleanize' => null,
// 'config_read_hidden' => null,
// 'compile_locking' => null,
// 'cache_locking' => null,
// 'locking_timeout' => null,
// 'default_resource_type' => null,
// 'caching_type' => null,
// 'properties' => null,
// 'default_config_type' => null,
// 'source_objects' => null,
// 'template_objects' => null,
// 'resource_caching' => null,
// 'template_resource_caching' => null,
// 'cache_modified_check' => null,
// 'registered_plugins' => null,
// 'plugin_search_order' => null,
// 'registered_objects' => null,
// 'registered_classes' => null,
// 'registered_filters' => null,
// 'registered_resources' => null,
// '_resource_handlers' => null,
// 'registered_cache_resources' => null,
// '_cacheresource_handlers' => null,
// 'autoload_filters' => null,
// 'default_modifiers' => null,
// 'escape_html' => null,
// 'start_time' => null,
// '_file_perms' => null,
// '_dir_perms' => null,
// '_tag_stack' => null,
// '_current_file' => null,
// '_parserdebug' => null,
// '_is_file_cache' => null,
// 'cache_id' => null,
// 'compile_id' => null,
// 'template_class' => null,
// 'tpl_vars' => null,
// 'parent' => null,
// 'config_vars' => null,
/*
* If true smarty will enable security `$smarty->enableSecurity()`
*/
// 'enable_security' => false,
// 'enable_security' => false,
/*
* The following settings will be applied to the smarty security policy object `$smarty->security_policy`
* Ignored if enable_security == false
*/
// 'security_policy' => [
// 'php_handling' => null,
// 'secure_dir' => null,
// 'trusted_dir' => null,
// 'trusted_uri' => null,
// 'trusted_constants' => null,
// 'static_classes' => null,
// 'trusted_static_methods' => null,
// 'trusted_static_properties' => null,
// 'php_functions' => null,
// 'php_modifiers' => null,
// 'allowed_tags' => null,
// 'disabled_tags' => null,
// 'allowed_modifiers' => null,
// 'disabled_modifiers' => null,
// 'disabled_special_smarty_vars' => null,
// 'streams' => null,
// 'allow_constants' => null,
// 'allow_super_globals' => null,
// 'max_template_nesting' => null,
// ]
// 'security_policy' => [
// 'php_handling' => null,
// 'secure_dir' => null,
// 'trusted_dir' => null,
// 'trusted_uri' => null,
// 'trusted_constants' => null,
// 'static_classes' => null,
// 'trusted_static_methods' => null,
// 'trusted_static_properties' => null,
// 'php_functions' => null,
// 'php_modifiers' => null,
// 'allowed_tags' => null,
// 'disabled_tags' => null,
// 'allowed_modifiers' => null,
// 'disabled_modifiers' => null,
// 'disabled_special_smarty_vars' => null,
// 'streams' => null,
// 'allow_constants' => null,
// 'allow_super_globals' => null,
// 'max_template_nesting' => null,
// ]
];
+6 -9
View File
@@ -1,7 +1,5 @@
<?php
use Illuminate\Support\Facades\DB;
require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'bootstrap/autoload.php';
if (Elasticsearch::indices()->exists(['index' => 'releases'])) {
@@ -12,9 +10,9 @@ $releases_index = [
'body' => [
'settings' => [
'number_of_shards' => 2,
'number_of_replicas' => 0
]
]
'number_of_replicas' => 0,
],
],
];
$response = Elasticsearch::indices()->create($releases_index);
@@ -28,14 +26,13 @@ $predb_index = [
'body' => [
'settings' => [
'number_of_shards' => 2,
'number_of_replicas' => 0
]
]
'number_of_replicas' => 0,
],
],
];
$response = Elasticsearch::indices()->create($predb_index);
print_r($response);
echo 'All done! ElasticSearch indexes are created now.'.PHP_EOL;
+11 -11
View File
@@ -78,21 +78,21 @@ function populate_rt($table, $max)
switch ($table) {
case 'releases_rt':
$sphinx->insertRelease([
'id' => $row->id,
'name' => $row->name,
'searchname' => $row->searchname,
'fromname' => $row->fromname,
'filename' => $row->filename,
]);
'id' => $row->id,
'name' => $row->name,
'searchname' => $row->searchname,
'fromname' => $row->fromname,
'filename' => $row->filename,
]);
break;
case 'predb_rt':
$sphinx->insertPredb([
'id' => $row->id,
'title' => $row->title,
'filename' => $row->filename,
'source' => $row->source,
]);
'id' => $row->id,
'title' => $row->title,
'filename' => $row->filename,
'source' => $row->source,
]);
break;
}
}
+5 -5
View File
@@ -38,11 +38,11 @@ $result = Arr::pluck(UsenetGroup::query()->where('active', '=', 1)->orWhere('bac
foreach ($data as $newgroup) {
if (\in_array($newgroup['group'], $result, false)) {
ShortGroup::query()->insert([
'name' => $newgroup['group'],
'first_record' => $newgroup['first'],
'last_record' => $newgroup['last'],
'updated' => now(),
]);
'name' => $newgroup['group'],
'first_record' => $newgroup['first'],
'last_record' => $newgroup['last'],
'updated' => now(),
]);
$colorCli->primary('Updated '.$newgroup['group']);
}
}