Update packages

This commit is contained in:
DariusIII
2024-01-08 19:00:14 +01:00
parent 59c59d049a
commit f55403ba2d
20 changed files with 39 additions and 53 deletions
-3
View File
@@ -259,9 +259,6 @@ class NZB
* file extensions, file sizes, file completion, group names, # of parts).
*
* @param string $nzb The NZB contents in a string.
* @param array $options
* 'no-file-key' => True - use numeric array key; False - Use filename as array key.
* 'strip-count' => True - Strip file/part count from file name to make the array key; False - Leave file name as is.
* @return array $result Empty if not an NZB or the contents of the NZB.
*/
public function nzbFileList(string $nzb, array $options = []): array
-10
View File
@@ -977,16 +977,6 @@ class NameFixer
/**
* Echo an updated release name to CLI.
*
* @param array $data
* [
* 'new_name' => (string) The new release search name.
* 'old_name' => (string) The old release search name.
* 'new_category' => (string) The new category name or ID for the release.
* 'old_category' => (string) The old category name or ID for the release.
* 'group' => (string) The group name or ID of the release.
* 'release_id' => (int) The ID of the release.
* 'method' => (string) The method used to rename the release.
* ]
*
* @static
*
+1 -1
View File
@@ -40,7 +40,7 @@ if (! function_exists('getRawHtml')) {
Log::error($e->getMessage());
}
$response = false;
} catch (\RuntimeException $e) {
} catch (RuntimeException $e) {
if (config('app.debug') === true) {
Log::error($e->getMessage());
}
+10 -10
View File
@@ -121,19 +121,19 @@ return [
'notifications' => [
'notifications' => [
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
],
/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
'notifiable' => Spatie\Backup\Notifications\Notifiable::class,
'mail' => [
'to' => env('ADMIN_EMAIL', 'hello@example.com'),
@@ -169,8 +169,8 @@ return [
'name' => env('APP_NAME', 'laravel-backup'),
'disks' => ['local'],
'health_checks' => [
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
],
],
@@ -196,7 +196,7 @@ return [
* No matter how you configure it the default strategy will never
* delete the newest backup.
*/
'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
'strategy' => Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
'default_strategy' => [
+6 -6
View File
@@ -52,21 +52,21 @@ return [
'services' => [
'maxmind_database' => [
'class' => \Torann\GeoIP\Services\MaxMindDatabase::class,
'class' => Torann\GeoIP\Services\MaxMindDatabase::class,
'database_path' => storage_path('app/geoip.mmdb'),
'update_url' => 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz',
'locales' => ['en'],
],
'maxmind_api' => [
'class' => \Torann\GeoIP\Services\MaxMindWebService::class,
'class' => Torann\GeoIP\Services\MaxMindWebService::class,
'user_id' => env('MAXMIND_USER_ID'),
'license_key' => env('MAXMIND_LICENSE_KEY'),
'locales' => ['en'],
],
'ipapi' => [
'class' => \Torann\GeoIP\Services\IPApi::class,
'class' => Torann\GeoIP\Services\IPApi::class,
'secure' => true,
'key' => env('IPAPI_KEY'),
'continent_path' => storage_path('app/continents.json'),
@@ -74,7 +74,7 @@ return [
],
'ipgeolocation' => [
'class' => \Torann\GeoIP\Services\IPGeoLocation::class,
'class' => Torann\GeoIP\Services\IPGeoLocation::class,
'secure' => true,
'key' => env('IPGEOLOCATION_KEY'),
'continent_path' => storage_path('app/continents.json'),
@@ -82,13 +82,13 @@ return [
],
'ipdata' => [
'class' => \Torann\GeoIP\Services\IPData::class,
'class' => Torann\GeoIP\Services\IPData::class,
'key' => env('IPDATA_API_KEY'),
'secure' => true,
],
'ipfinder' => [
'class' => \Torann\GeoIP\Services\IPFinder::class,
'class' => Torann\GeoIP\Services\IPFinder::class,
'key' => env('IPFINDER_API_KEY'),
'secure' => true,
'locales' => ['en'],
+1 -1
View File
@@ -79,6 +79,6 @@ return [
*
* Supports imagemagick, svg and eps
*/
'qrcode_image_backend' => \PragmaRX\Google2FALaravel\Support\Constants::QRCODE_IMAGE_BACKEND_IMAGEMAGICK,
'qrcode_image_backend' => PragmaRX\Google2FALaravel\Support\Constants::QRCODE_IMAGE_BACKEND_IMAGEMAGICK,
];
+1 -1
View File
@@ -30,5 +30,5 @@ return [
* You can customize this behaviour by writing your own clean up policy. A valid policy
* is any class that implements `Spatie\DirectoryCleanup\Policies\CleanupPolicy`.
*/
'cleanup_policy' => \Spatie\DirectoryCleanup\Policies\DeleteEverything::class,
'cleanup_policy' => Spatie\DirectoryCleanup\Policies\DeleteEverything::class,
];
@@ -14,7 +14,7 @@ return new class extends Migration
Schema::table('users', function (Blueprint $table) {
$table->string('name')->nullable()->after('username');
});
\App\Models\User::query()->update(['name' => \DB::raw('username')]);
App\Models\User::query()->update(['name' => DB::raw('username')]);
}
/**
+2 -2
View File
@@ -2,11 +2,11 @@
require_once dirname(__DIR__, 3).DIRECTORY_SEPARATOR.'bootstrap/autoload.php';
$tmux = \Illuminate\Support\Facades\DB::table('tmux')->get();
$tmux = Illuminate\Support\Facades\DB::table('tmux')->get();
foreach ($tmux as $item) {
echo 'Inserting '.$item->setting.' into settings table'.PHP_EOL;
\App\Models\Settings::insertOrIgnore(
App\Models\Settings::insertOrIgnore(
[
'section' => 'site',
'subsection' => 'tmux',
+2 -2
View File
@@ -35,8 +35,8 @@ $couldbe = ($argv[1] === 'true') ? 'could be ' : '';
$colorCli->header('Getting List of nzbs to check against db.');
$colorCli->header("Checked / {$couldbe}moved\n");
$dirItr = new \RecursiveDirectoryIterator(Settings::settingValue('..nzbpath'));
$itr = new \RecursiveIteratorIterator($dirItr, \RecursiveIteratorIterator::LEAVES_ONLY);
$dirItr = new RecursiveDirectoryIterator(Settings::settingValue('..nzbpath'));
$itr = new RecursiveIteratorIterator($dirItr, RecursiveIteratorIterator::LEAVES_ONLY);
foreach ($itr as $filePath) {
$guid = stristr($filePath->getFilename(), '.nzb.gz', true);
+1 -1
View File
@@ -14,7 +14,7 @@ $consoleTools = new ConsoleTools();
$newLevel = $argv[1];
$sourcePath = $argv[2];
$objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($sourcePath));
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($sourcePath));
$filestoprocess = [];
$iFilesProcessed = $iFilesCounted = 0;
+1 -1
View File
@@ -21,7 +21,7 @@ $res = $pdo->query(
Category::GAME_OTHER
)
);
if ($res instanceof \Traversable) {
if ($res instanceof Traversable) {
$colorCli->header('Updating console info for '.number_format($res->rowCount()).' releases.');
foreach ($res as $arr) {
+1 -1
View File
@@ -12,7 +12,7 @@ $movie = new Movie(['Echo' => true]);
$colorCli = new ColorCLI();
$movies = $pdo->query('SELECT imdbid FROM movieinfo WHERE tmdbid = 0 ORDER BY id ASC');
if ($movies instanceof \Traversable) {
if ($movies instanceof Traversable) {
$count = $movies->rowCount();
if ($count > 0) {
$colorCli->header('Updating movie info for '.number_format($count).' movies.');
+1 -1
View File
@@ -87,7 +87,7 @@ function categorizeRelease($argv, $echoOutput = false): int
'xxxinfo_id' => 0,
'categories_id' => $catId['categories_id'],
]);
\Blacklight\NameFixer::echoChangedReleaseName([
Blacklight\NameFixer::echoChangedReleaseName([
'new_name' => $result->searchname,
'old_name' => $result->searchname,
'new_category' => $catId['categories_id'],
+3 -3
View File
@@ -29,13 +29,13 @@ if (! empty($argv[1]) && isset($argv[2], $argv[3]) && is_numeric($argv[2]) && is
echo 'Invalid argument(s) used'.PHP_EOL;
return false;
} catch (\CanIHaveSomeCoffee\TheTVDbAPI\Exception\ParseException $error) {
} catch (CanIHaveSomeCoffee\TheTVDbAPI\Exception\ParseException $error) {
if (str_starts_with($error->getMessage(), 'Could not decode JSON data') || str_starts_with($error->getMessage(), 'Incorrect data structure')) {
return false;
}
} catch (\CanIHaveSomeCoffee\TheTVDbAPI\Exception\ResourceNotFoundException $error) {
} catch (CanIHaveSomeCoffee\TheTVDbAPI\Exception\ResourceNotFoundException $error) {
return false;
} catch (\CanIHaveSomeCoffee\TheTVDbAPI\Exception\UnauthorizedException $error) {
} catch (CanIHaveSomeCoffee\TheTVDbAPI\Exception\UnauthorizedException $error) {
if (str_starts_with($error->getMessage(), 'Unauthorized')) {
return false;
}
+4 -4
View File
@@ -48,12 +48,12 @@ if (! Str::endsWith($path, '/')) {
$path .= '/';
}
$files = new \RegexIterator(
new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($argv[1])
$files = new RegexIterator(
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($argv[1])
),
'/^.+\.nzb(\.gz)?$/i',
\RecursiveRegexIterator::GET_MATCH
RecursiveRegexIterator::GET_MATCH
);
$i = 1;
+1 -1
View File
@@ -27,7 +27,7 @@ if (isset($argv[1]) && $argv[1] === 'all' && ! isset($argv[2])) {
$backfill = new Backfill(['NNTP' => $nntp]);
$backfill->safeBackfill($argv[2]);
} else {
exit((new \Blacklight\ColorCLI())->error('Wrong set of arguments.'
exit((new Blacklight\ColorCLI())->error('Wrong set of arguments.'
.'php backfill.php safe 200000 ...: Backfill an active group alphabetically, x articles, the script stops,'
.' ...: if the group has reached reached 2012-06-24, the next group will backfill.'
.'php backfill.php alph 200000 ...: Backfills all groups (sorted alphabetically) by number of articles'
+1 -1
View File
@@ -36,7 +36,7 @@ $bool = [
if (! isset($argv[1], $argv[2]) || ! in_array($argv[1], $args, false) || ! in_array($argv[2], $bool, false)) {
exit(
(new \Blacklight\ColorCLI())->error(
(new Blacklight\ColorCLI())->error(
"\nIncorrect arguments.\n"
."The second argument (true/false) determines wether to echo or not.\n\n"
."php postprocess.php all true ...: Does all the types of post processing.\n"
+2 -2
View File
@@ -31,7 +31,7 @@ if (isset($argv[1]) && ! is_numeric($argv[1])) {
(isset($argv[2]) && is_numeric($argv[2]) && $argv[2] > 0 ? $argv[2] : $maxHeaders)
);
} catch (Throwable $e) {
\Illuminate\Support\Facades\Log::error($e->getMessage());
Illuminate\Support\Facades\Log::error($e->getMessage());
}
}
} else {
@@ -39,6 +39,6 @@ if (isset($argv[1]) && ! is_numeric($argv[1])) {
$binaries->updateAllGroups((isset($argv[1]) && is_numeric($argv[1]) && $argv[1] > 0 ? $argv[1] :
$maxHeaders));
} catch (Throwable $e) {
\Illuminate\Support\Facades\Log::error($e->getMessage());
Illuminate\Support\Facades\Log::error($e->getMessage());
}
}
-1
View File
@@ -69,7 +69,6 @@ use App\Http\Controllers\RssController;
use App\Http\Controllers\SearchController;
use App\Http\Controllers\SeriesController;
use App\Http\Controllers\TermsController;
use App\Models\User;
Auth::routes();