style: update ecs config to align associative arrays arrows

update composer dependencies to latest
This commit is contained in:
Yassine Doghri 2023-06-12 14:47:38 +00:00
parent 3fc1d8e18d
commit 2a50f6e4d2
268 changed files with 3833 additions and 3973 deletions

View File

@ -424,7 +424,7 @@ class App extends BaseConfig
*/ */
public array $siteIcon = [ public array $siteIcon = [
'ico' => '/favicon.ico', 'ico' => '/favicon.ico',
'64' => '/icon-64.png', '64' => '/icon-64.png',
'180' => '/icon-180.png', '180' => '/icon-180.png',
'192' => '/icon-192.png', '192' => '/icon-192.png',
'512' => '/icon-512.png', '512' => '/icon-512.png',

View File

@ -42,24 +42,24 @@ class Autoload extends AutoloadConfig
* @var array<string, string> * @var array<string, string>
*/ */
public $psr4 = [ public $psr4 = [
APP_NAMESPACE => APPPATH, APP_NAMESPACE => APPPATH,
'Modules' => ROOTPATH . 'modules/', 'Modules' => ROOTPATH . 'modules/',
'Modules\Admin' => ROOTPATH . 'modules/Admin/', 'Modules\Admin' => ROOTPATH . 'modules/Admin/',
'Modules\Auth' => ROOTPATH . 'modules/Auth/', 'Modules\Auth' => ROOTPATH . 'modules/Auth/',
'Modules\Analytics' => ROOTPATH . 'modules/Analytics/', 'Modules\Analytics' => ROOTPATH . 'modules/Analytics/',
'Modules\Install' => ROOTPATH . 'modules/Install/', 'Modules\Install' => ROOTPATH . 'modules/Install/',
'Modules\Update' => ROOTPATH . 'modules/Update/', 'Modules\Update' => ROOTPATH . 'modules/Update/',
'Modules\Fediverse' => ROOTPATH . 'modules/Fediverse/', 'Modules\Fediverse' => ROOTPATH . 'modules/Fediverse/',
'Modules\Media' => ROOTPATH . 'modules/Media/', 'Modules\Media' => ROOTPATH . 'modules/Media/',
'Modules\WebSub' => ROOTPATH . 'modules/WebSub/', 'Modules\WebSub' => ROOTPATH . 'modules/WebSub/',
'Modules\Api\Rest\V1' => ROOTPATH . 'modules/Api/Rest/V1', 'Modules\Api\Rest\V1' => ROOTPATH . 'modules/Api/Rest/V1',
'Modules\PremiumPodcasts' => ROOTPATH . 'modules/PremiumPodcasts/', 'Modules\PremiumPodcasts' => ROOTPATH . 'modules/PremiumPodcasts/',
'Config' => APPPATH . 'Config/', 'Config' => APPPATH . 'Config/',
'ViewComponents' => APPPATH . 'Libraries/ViewComponents/', 'ViewComponents' => APPPATH . 'Libraries/ViewComponents/',
'ViewThemes' => APPPATH . 'Libraries/ViewThemes/', 'ViewThemes' => APPPATH . 'Libraries/ViewThemes/',
'MediaClipper' => APPPATH . 'Libraries/MediaClipper/', 'MediaClipper' => APPPATH . 'Libraries/MediaClipper/',
'Vite' => APPPATH . 'Libraries/Vite/', 'Vite' => APPPATH . 'Libraries/Vite/',
'Themes' => ROOTPATH . 'themes', 'Themes' => ROOTPATH . 'themes',
]; ];
/** /**

View File

@ -112,7 +112,7 @@ class Cache extends BaseConfig
*/ */
public array $file = [ public array $file = [
'storePath' => WRITEPATH . 'cache/', 'storePath' => WRITEPATH . 'cache/',
'mode' => 0640, 'mode' => 0640,
]; ];
/** /**
@ -127,10 +127,10 @@ class Cache extends BaseConfig
* @var array<string, string|int|boolean> * @var array<string, string|int|boolean>
*/ */
public array $memcached = [ public array $memcached = [
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'port' => 11211, 'port' => 11211,
'weight' => 1, 'weight' => 1,
'raw' => false, 'raw' => false,
]; ];
/** /**
@ -143,10 +143,10 @@ class Cache extends BaseConfig
* @var array<string, string|int|null> * @var array<string, string|int|null>
*/ */
public array $redis = [ public array $redis = [
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'password' => null, 'password' => null,
'port' => 6379, 'port' => 6379,
'timeout' => 0, 'timeout' => 0,
'database' => 0, 'database' => 0,
]; ];
@ -161,11 +161,11 @@ class Cache extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $validHandlers = [ public array $validHandlers = [
'dummy' => DummyHandler::class, 'dummy' => DummyHandler::class,
'file' => FileHandler::class, 'file' => FileHandler::class,
'memcached' => MemcachedHandler::class, 'memcached' => MemcachedHandler::class,
'predis' => PredisHandler::class, 'predis' => PredisHandler::class,
'redis' => RedisHandler::class, 'redis' => RedisHandler::class,
'wincache' => WincacheHandler::class, 'wincache' => WincacheHandler::class,
]; ];
} }

View File

@ -14,136 +14,136 @@ class Colors extends BaseConfig
public array $themes = [ public array $themes = [
/* Castopod's brand color */ /* Castopod's brand color */
'pine' => [ 'pine' => [
'accent-base' => [174, 100, 29], 'accent-base' => [174, 100, 29],
'accent-hover' => [172, 100, 17], 'accent-hover' => [172, 100, 17],
'accent-muted' => [131, 100, 12], 'accent-muted' => [131, 100, 12],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [172, 100, 17], 'heading-foreground' => [172, 100, 17],
'heading-background' => [111, 64, 94], 'heading-background' => [111, 64, 94],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [173, 44, 96], 'background-base' => [173, 44, 96],
'background-navigation' => [172, 100, 17], 'background-navigation' => [172, 100, 17],
'background-header' => [172, 100, 17], 'background-header' => [172, 100, 17],
'background-highlight' => [111, 64, 94], 'background-highlight' => [111, 64, 94],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [111, 42, 86], 'border-subtle' => [111, 42, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'border-navigation' => [131, 100, 12], 'border-navigation' => [131, 100, 12],
'text-base' => [158, 8, 3], 'text-base' => [158, 8, 3],
'text-muted' => [172, 8, 38], 'text-muted' => [172, 8, 38],
], ],
/* Red / Rose color */ /* Red / Rose color */
'crimson' => [ 'crimson' => [
'accent-base' => [350, 87, 61], 'accent-base' => [350, 87, 61],
'accent-hover' => [348, 75, 40], 'accent-hover' => [348, 75, 40],
'accent-muted' => [348, 73, 32], 'accent-muted' => [348, 73, 32],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [348, 73, 32], 'heading-foreground' => [348, 73, 32],
'heading-background' => [344, 79, 96], 'heading-background' => [344, 79, 96],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [350, 44, 96], 'background-base' => [350, 44, 96],
'background-header' => [348, 75, 40], 'background-header' => [348, 75, 40],
'background-highlight' => [344, 79, 96], 'background-highlight' => [344, 79, 96],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [348, 42, 86], 'border-subtle' => [348, 42, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'text-base' => [340, 8, 3], 'text-base' => [340, 8, 3],
'text-muted' => [345, 8, 38], 'text-muted' => [345, 8, 38],
], ],
/* Blue color */ /* Blue color */
'lake' => [ 'lake' => [
'accent-base' => [194, 100, 44], 'accent-base' => [194, 100, 44],
'accent-hover' => [194, 100, 22], 'accent-hover' => [194, 100, 22],
'accent-muted' => [195, 100, 11], 'accent-muted' => [195, 100, 11],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [194, 100, 22], 'heading-foreground' => [194, 100, 22],
'heading-background' => [195, 100, 92], 'heading-background' => [195, 100, 92],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [196, 44, 96], 'background-base' => [196, 44, 96],
'background-header' => [194, 100, 22], 'background-header' => [194, 100, 22],
'background-highlight' => [195, 100, 92], 'background-highlight' => [195, 100, 92],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [195, 42, 86], 'border-subtle' => [195, 42, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'text-base' => [194, 8, 3], 'text-base' => [194, 8, 3],
'text-muted' => [195, 8, 38], 'text-muted' => [195, 8, 38],
], ],
/* Orange color */ /* Orange color */
'amber' => [ 'amber' => [
'accent-base' => [17, 100, 57], 'accent-base' => [17, 100, 57],
'accent-hover' => [17, 100, 35], 'accent-hover' => [17, 100, 35],
'accent-muted' => [17, 100, 24], 'accent-muted' => [17, 100, 24],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [17, 100, 35], 'heading-foreground' => [17, 100, 35],
'heading-background' => [17, 100, 89], 'heading-background' => [17, 100, 89],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [15, 44, 96], 'background-base' => [15, 44, 96],
'background-header' => [17, 100, 35], 'background-header' => [17, 100, 35],
'background-highlight' => [17, 100, 89], 'background-highlight' => [17, 100, 89],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [17, 42, 86], 'border-subtle' => [17, 42, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'text-base' => [15, 8, 3], 'text-base' => [15, 8, 3],
'text-muted' => [17, 8, 38], 'text-muted' => [17, 8, 38],
], ],
/* Violet color */ /* Violet color */
'jacaranda' => [ 'jacaranda' => [
'accent-base' => [254, 72, 52], 'accent-base' => [254, 72, 52],
'accent-hover' => [254, 73, 30], 'accent-hover' => [254, 73, 30],
'accent-muted' => [254, 71, 19], 'accent-muted' => [254, 71, 19],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [254, 73, 30], 'heading-foreground' => [254, 73, 30],
'heading-background' => [254, 73, 84], 'heading-background' => [254, 73, 84],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [253, 44, 96], 'background-base' => [253, 44, 96],
'background-header' => [254, 73, 30], 'background-header' => [254, 73, 30],
'background-highlight' => [254, 88, 91], 'background-highlight' => [254, 88, 91],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [254, 42, 86], 'border-subtle' => [254, 42, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'text-base' => [253, 8, 3], 'text-base' => [253, 8, 3],
'text-muted' => [254, 8, 38], 'text-muted' => [254, 8, 38],
], ],
/* Black color */ /* Black color */
'onyx' => [ 'onyx' => [
'accent-base' => [240, 17, 2], 'accent-base' => [240, 17, 2],
'accent-hover' => [240, 17, 17], 'accent-hover' => [240, 17, 17],
'accent-muted' => [240, 17, 17], 'accent-muted' => [240, 17, 17],
'accent-contrast' => [0, 0, 100], 'accent-contrast' => [0, 0, 100],
'heading-foreground' => [240, 17, 17], 'heading-foreground' => [240, 17, 17],
'heading-background' => [240, 17, 94], 'heading-background' => [240, 17, 94],
'background-elevated' => [0, 0, 100], 'background-elevated' => [0, 0, 100],
'background-base' => [240, 17, 96], 'background-base' => [240, 17, 96],
'background-header' => [240, 12, 17], 'background-header' => [240, 12, 17],
'background-highlight' => [240, 17, 94], 'background-highlight' => [240, 17, 94],
'background-backdrop' => [0, 0, 50], 'background-backdrop' => [0, 0, 50],
'border-subtle' => [240, 17, 86], 'border-subtle' => [240, 17, 86],
'border-contrast' => [0, 0, 0], 'border-contrast' => [0, 0, 0],
'text-base' => [240, 8, 3], 'text-base' => [240, 8, 3],
'text-muted' => [240, 8, 38], 'text-muted' => [240, 8, 38],
], ],
]; ];

View File

@ -27,7 +27,7 @@ class Database extends Config
* @var array<string, mixed> * @var array<string, mixed>
*/ */
public array $default = [ public array $default = [
'DSN' => '', 'DSN' => '',
'hostname' => 'localhost', 'hostname' => 'localhost',
'username' => '', 'username' => '',
'password' => '', 'password' => '',
@ -35,15 +35,15 @@ class Database extends Config
'DBDriver' => 'MySQLi', 'DBDriver' => 'MySQLi',
'DBPrefix' => 'cp_', 'DBPrefix' => 'cp_',
'pConnect' => false, 'pConnect' => false,
'DBDebug' => ENVIRONMENT !== 'production', 'DBDebug' => ENVIRONMENT !== 'production',
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'DBCollat' => 'utf8mb4_unicode_ci', 'DBCollat' => 'utf8mb4_unicode_ci',
'swapPre' => '', 'swapPre' => '',
'encrypt' => false, 'encrypt' => false,
'compress' => false, 'compress' => false,
'strictOn' => false, 'strictOn' => false,
'failover' => [], 'failover' => [],
'port' => 3306, 'port' => 3306,
]; ];
/** /**
@ -52,7 +52,7 @@ class Database extends Config
* @var array<string, mixed> * @var array<string, mixed>
*/ */
public array $tests = [ public array $tests = [
'DSN' => '', 'DSN' => '',
'hostname' => '127.0.0.1', 'hostname' => '127.0.0.1',
'username' => '', 'username' => '',
'password' => '', 'password' => '',
@ -60,16 +60,16 @@ class Database extends Config
'DBDriver' => 'SQLite3', 'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', 'DBPrefix' => 'db_',
// Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false, 'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'), 'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8', 'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci', 'DBCollat' => 'utf8_general_ci',
'swapPre' => '', 'swapPre' => '',
'encrypt' => false, 'encrypt' => false,
'compress' => false, 'compress' => false,
'strictOn' => false, 'strictOn' => false,
'failover' => [], 'failover' => [],
'port' => 3306, 'port' => 3306,
'foreignKeys' => true, 'foreignKeys' => true,
]; ];

View File

@ -12,42 +12,24 @@ class DocTypes
* @var array<string, string> * @var array<string, string>
*/ */
public array $list = [ public array $list = [
'xhtml11' => 'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', 'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-strict' => 'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml1-trans' => 'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'html5' => '<!DOCTYPE html>',
'xhtml1-frame' => 'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'xhtml-basic11' => 'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">', 'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'html5' => '<!DOCTYPE html>', 'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'html4-strict' => 'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'html4-trans' => 'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', 'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'html4-frame' => 'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', 'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'mathml1' => 'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">', 'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
'mathml2' =>
'<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' =>
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' =>
'<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
]; ];
} }

View File

@ -24,15 +24,15 @@ class Filters extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $aliases = [ public array $aliases = [
'csrf' => CSRF::class, 'csrf' => CSRF::class,
'toolbar' => DebugToolbar::class, 'toolbar' => DebugToolbar::class,
'honeypot' => Honeypot::class, 'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class, 'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class, 'secureheaders' => SecureHeaders::class,
'permission' => PermissionFilter::class, 'permission' => PermissionFilter::class,
'fediverse' => FediverseFilter::class, 'fediverse' => FediverseFilter::class,
'allow-cors' => AllowCorsFilter::class, 'allow-cors' => AllowCorsFilter::class,
'rest-api' => ApiFilter::class, 'rest-api' => ApiFilter::class,
'podcast-unlock' => PodcastUnlockFilter::class, 'podcast-unlock' => PodcastUnlockFilter::class,
]; ];

View File

@ -45,8 +45,8 @@ class Format extends BaseConfig
*/ */
public array $formatters = [ public array $formatters = [
'application/json' => JSONFormatter::class, 'application/json' => JSONFormatter::class,
'application/xml' => XMLFormatter::class, 'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class, 'text/xml' => XMLFormatter::class,
]; ];
/** /**
@ -61,8 +61,8 @@ class Format extends BaseConfig
*/ */
public array $formatterOptions = [ public array $formatterOptions = [
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, 'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
'application/xml' => 0, 'application/xml' => 0,
'text/xml' => 0, 'text/xml' => 0,
]; ];
//-------------------------------------------------------------------- //--------------------------------------------------------------------

View File

@ -28,20 +28,15 @@ class Generators extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $views = [ public array $views = [
'make:command' => 'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'CodeIgniter\Commands\Generators\Views\command.tpl.php', 'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php', 'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
'make:controller' => 'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
'CodeIgniter\Commands\Generators\Views\controller.tpl.php', 'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php', 'make:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php', 'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php',
'make:migration' => 'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
'CodeIgniter\Commands\Generators\Views\migration.tpl.php', 'make:validation' => 'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php', 'session:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
'make:validation' =>
'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
'session:migration' =>
'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
]; ];
} }

View File

@ -26,7 +26,7 @@ class Images extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $handlers = [ public array $handlers = [
'gd' => GDHandler::class, 'gd' => GDHandler::class,
'imagick' => ImageMagickHandler::class, 'imagick' => ImageMagickHandler::class,
]; ];
@ -51,55 +51,55 @@ class Images extends BaseConfig
*/ */
public array $podcastCoverSizes = [ public array $podcastCoverSizes = [
'tiny' => [ 'tiny' => [
'width' => 40, 'width' => 40,
'height' => 40, 'height' => 40,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'thumbnail' => [ 'thumbnail' => [
'width' => 150, 'width' => 150,
'height' => 150, 'height' => 150,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'medium' => [ 'medium' => [
'width' => 320, 'width' => 320,
'height' => 320, 'height' => 320,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'large' => [ 'large' => [
'width' => 1024, 'width' => 1024,
'height' => 1024, 'height' => 1024,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'feed' => [ 'feed' => [
'width' => 1400, 'width' => 1400,
'height' => 1400, 'height' => 1400,
], ],
'id3' => [ 'id3' => [
'width' => 500, 'width' => 500,
'height' => 500, 'height' => 500,
], ],
'og' => [ 'og' => [
'width' => 1200, 'width' => 1200,
'height' => 1200, 'height' => 1200,
], ],
'federation' => [ 'federation' => [
'width' => 400, 'width' => 400,
'height' => 400, 'height' => 400,
], ],
'webmanifest192' => [ 'webmanifest192' => [
'width' => 192, 'width' => 192,
'height' => 192, 'height' => 192,
'mimetype' => 'image/png', 'mimetype' => 'image/png',
'extension' => 'png', 'extension' => 'png',
], ],
'webmanifest512' => [ 'webmanifest512' => [
'width' => 512, 'width' => 512,
'height' => 512, 'height' => 512,
'mimetype' => 'image/png', 'mimetype' => 'image/png',
'extension' => 'png', 'extension' => 'png',
], ],
]; ];
@ -113,19 +113,19 @@ class Images extends BaseConfig
*/ */
public array $podcastBannerSizes = [ public array $podcastBannerSizes = [
'small' => [ 'small' => [
'width' => 320, 'width' => 320,
'height' => 128, 'height' => 128,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'medium' => [ 'medium' => [
'width' => 960, 'width' => 960,
'height' => 320, 'height' => 320,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'federation' => [ 'federation' => [
'width' => 1500, 'width' => 1500,
'height' => 500, 'height' => 500,
], ],
]; ];
@ -139,31 +139,31 @@ class Images extends BaseConfig
*/ */
public array $podcastBannerDefaultPaths = [ public array $podcastBannerDefaultPaths = [
'default' => [ 'default' => [
'path' => 'castopod-banner-pine.jpg', 'path' => 'castopod-banner-pine.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'pine' => [ 'pine' => [
'path' => 'castopod-banner-pine.jpg', 'path' => 'castopod-banner-pine.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'crimson' => [ 'crimson' => [
'path' => 'castopod-banner-crimson.jpg', 'path' => 'castopod-banner-crimson.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'amber' => [ 'amber' => [
'path' => 'castopod-banner-amber.jpg', 'path' => 'castopod-banner-amber.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'lake' => [ 'lake' => [
'path' => 'castopod-banner-lake.jpg', 'path' => 'castopod-banner-lake.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'jacaranda' => [ 'jacaranda' => [
'path' => 'castopod-banner-jacaranda.jpg', 'path' => 'castopod-banner-jacaranda.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
'onyx' => [ 'onyx' => [
'path' => 'castopod-banner-onyx.jpg', 'path' => 'castopod-banner-onyx.jpg',
'mimetype' => 'image/jpeg', 'mimetype' => 'image/jpeg',
], ],
]; ];
@ -181,26 +181,25 @@ class Images extends BaseConfig
*/ */
public array $personAvatarSizes = [ public array $personAvatarSizes = [
'federation' => [ 'federation' => [
'width' => 400, 'width' => 400,
'height' => 400, 'height' => 400,
], ],
'tiny' => [ 'tiny' => [
'width' => 40, 'width' => 40,
'height' => 40, 'height' => 40,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'thumbnail' => [ 'thumbnail' => [
'width' => 150, 'width' => 150,
'height' => 150, 'height' => 150,
'mimetype' => 'image/webp', 'mimetype' => 'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
'medium' => [ 'medium' => [
'width' => 320, 'width' => 320,
'height' => 320, 'height' => 320,
'mimetype' => 'mimetype' => 'image/webp',
'image/webp',
'extension' => 'webp', 'extension' => 'webp',
], ],
]; ];

View File

@ -50,24 +50,24 @@ class Mimes
'application/x-binary', 'application/x-binary',
'application/x-macbinary', 'application/x-macbinary',
], ],
'dms' => 'application/octet-stream', 'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream', 'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream', 'lzh' => 'application/octet-stream',
'exe' => ['application/octet-stream', 'application/x-msdownload'], 'exe' => ['application/octet-stream', 'application/x-msdownload'],
'class' => 'application/octet-stream', 'class' => 'application/octet-stream',
'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'], 'psd' => ['application/x-photoshop', 'image/vnd.adobe.photoshop'],
'so' => 'application/octet-stream', 'so' => 'application/octet-stream',
'sea' => 'application/octet-stream', 'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream', 'dll' => 'application/octet-stream',
'oda' => 'application/oda', 'oda' => 'application/oda',
'pdf' => ['application/pdf', 'application/force-download', 'application/x-download'], 'pdf' => ['application/pdf', 'application/force-download', 'application/x-download'],
'ai' => ['application/pdf', 'application/postscript'], 'ai' => ['application/pdf', 'application/postscript'],
'eps' => 'application/postscript', 'eps' => 'application/postscript',
'ps' => 'application/postscript', 'ps' => 'application/postscript',
'smi' => 'application/smil', 'smi' => 'application/smil',
'smil' => 'application/smil', 'smil' => 'application/smil',
'mif' => 'application/vnd.mif', 'mif' => 'application/vnd.mif',
'xls' => [ 'xls' => [
'application/vnd.ms-excel', 'application/vnd.ms-excel',
'application/msexcel', 'application/msexcel',
'application/x-msexcel', 'application/x-msexcel',
@ -87,17 +87,17 @@ class Mimes
'application/vnd.ms-office', 'application/vnd.ms-office',
'application/msword', 'application/msword',
], ],
'pptx' => ['application/vnd.openxmlformats-officedocument.presentationml.presentation'], 'pptx' => ['application/vnd.openxmlformats-officedocument.presentationml.presentation'],
'wbxml' => 'application/wbxml', 'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc', 'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director', 'dcr' => 'application/x-director',
'dir' => 'application/x-director', 'dir' => 'application/x-director',
'dxr' => 'application/x-director', 'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi', 'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar', 'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip', 'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip', 'gzip' => 'application/x-gzip',
'php' => [ 'php' => [
'application/x-php', 'application/x-php',
'application/x-httpd-php', 'application/x-httpd-php',
'application/php', 'application/php',
@ -105,41 +105,41 @@ class Mimes
'text/x-php', 'text/x-php',
'application/x-httpd-php-source', 'application/x-httpd-php-source',
], ],
'php4' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php', 'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source', 'phps' => 'application/x-httpd-php-source',
'js' => ['application/x-javascript', 'text/plain'], 'js' => ['application/x-javascript', 'text/plain'],
'swf' => 'application/x-shockwave-flash', 'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit', 'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar', 'tar' => 'application/x-tar',
'tgz' => ['application/x-tar', 'application/x-gzip-compressed'], 'tgz' => ['application/x-tar', 'application/x-gzip-compressed'],
'z' => 'application/x-compress', 'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml', 'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml',
'zip' => [ 'zip' => [
'application/x-zip', 'application/x-zip',
'application/zip', 'application/zip',
'application/x-zip-compressed', 'application/x-zip-compressed',
'application/s-compressed', 'application/s-compressed',
'multipart/x-zip', 'multipart/x-zip',
], ],
'rar' => ['application/vnd.rar', 'application/x-rar', 'application/rar', 'application/x-rar-compressed'], 'rar' => ['application/vnd.rar', 'application/x-rar', 'application/rar', 'application/x-rar-compressed'],
'mid' => 'audio/midi', 'mid' => 'audio/midi',
'midi' => 'audio/midi', 'midi' => 'audio/midi',
'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3', 'application/octet-stream'], 'mp3' => ['audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3', 'application/octet-stream'],
'mpga' => 'audio/mpeg', 'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg', 'mp2' => 'audio/mpeg',
'aif' => ['audio/x-aiff', 'audio/aiff'], 'aif' => ['audio/x-aiff', 'audio/aiff'],
'aiff' => ['audio/x-aiff', 'audio/aiff'], 'aiff' => ['audio/x-aiff', 'audio/aiff'],
'aifc' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio', 'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio', 'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin', 'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio', 'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo', 'rv' => 'video/vnd.rn-realvideo',
'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'], 'wav' => ['audio/x-wav', 'audio/wave', 'audio/wav'],
'bmp' => [ 'bmp' => [
'image/bmp', 'image/bmp',
'image/x-bmp', 'image/x-bmp',
'image/x-bitmap', 'image/x-bitmap',
@ -152,48 +152,48 @@ class Mimes
'application/x-bmp', 'application/x-bmp',
'application/x-win-bitmap', 'application/x-win-bitmap',
], ],
'gif' => 'image/gif', 'gif' => 'image/gif',
'jpg' => ['image/jpeg', 'image/pjpeg'], 'jpg' => ['image/jpeg', 'image/pjpeg'],
'jpeg' => ['image/jpeg', 'image/pjpeg'], 'jpeg' => ['image/jpeg', 'image/pjpeg'],
'jpe' => ['image/jpeg', 'image/pjpeg'], 'jpe' => ['image/jpeg', 'image/pjpeg'],
'jp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'jp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'j2k' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'j2k' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpf' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'jpf' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpg2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'jpg2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpx' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'jpx' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'jpm' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'jpm' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'mj2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'mj2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'mjp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'], 'mjp2' => ['image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'],
'png' => ['image/png', 'image/x-png'], 'png' => ['image/png', 'image/x-png'],
'webp' => 'image/webp', 'webp' => 'image/webp',
'tif' => 'image/tiff', 'tif' => 'image/tiff',
'tiff' => 'image/tiff', 'tiff' => 'image/tiff',
'css' => ['text/css', 'text/plain'], 'css' => ['text/css', 'text/plain'],
'html' => ['text/html', 'text/plain'], 'html' => ['text/html', 'text/plain'],
'htm' => ['text/html', 'text/plain'], 'htm' => ['text/html', 'text/plain'],
'shtml' => ['text/html', 'text/plain'], 'shtml' => ['text/html', 'text/plain'],
'txt' => 'text/plain', 'txt' => 'text/plain',
'text' => 'text/plain', 'text' => 'text/plain',
'log' => ['text/plain', 'text/x-log'], 'log' => ['text/plain', 'text/x-log'],
'rtx' => 'text/richtext', 'rtx' => 'text/richtext',
'rtf' => 'text/rtf', 'rtf' => 'text/rtf',
'xml' => ['application/xml', 'text/xml', 'text/plain'], 'xml' => ['application/xml', 'text/xml', 'text/plain'],
'xsl' => ['application/xml', 'text/xsl', 'text/xml'], 'xsl' => ['application/xml', 'text/xsl', 'text/xml'],
'mpeg' => 'video/mpeg', 'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg', 'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg', 'mpe' => 'video/mpeg',
'qt' => 'video/quicktime', 'qt' => 'video/quicktime',
'mov' => 'video/quicktime', 'mov' => 'video/quicktime',
'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'], 'avi' => ['video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'],
'movie' => 'video/x-sgi-movie', 'movie' => 'video/x-sgi-movie',
'doc' => ['application/msword', 'application/vnd.ms-office'], 'doc' => ['application/msword', 'application/vnd.ms-office'],
'docx' => [ 'docx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip', 'application/zip',
'application/msword', 'application/msword',
'application/x-zip', 'application/x-zip',
], ],
'dot' => ['application/msword', 'application/vnd.ms-office'], 'dot' => ['application/msword', 'application/vnd.ms-office'],
'dotx' => [ 'dotx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip', 'application/zip',
@ -209,49 +209,49 @@ class Mimes
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
'word' => ['application/msword', 'application/octet-stream'], 'word' => ['application/msword', 'application/octet-stream'],
'xl' => 'application/excel', 'xl' => 'application/excel',
'eml' => 'message/rfc822', 'eml' => 'message/rfc822',
'json' => ['application/json', 'text/json', 'text/plain'], 'json' => ['application/json', 'text/json', 'text/plain'],
'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'], 'pem' => ['application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'],
'p10' => ['application/x-pkcs10', 'application/pkcs10'], 'p10' => ['application/x-pkcs10', 'application/pkcs10'],
'p12' => 'application/x-pkcs12', 'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature', 'p7a' => 'application/x-pkcs7-signature',
'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'], 'p7c' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'], 'p7m' => ['application/pkcs7-mime', 'application/x-pkcs7-mime'],
'p7r' => 'application/x-pkcs7-certreqresp', 'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature', 'p7s' => 'application/pkcs7-signature',
'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'], 'crt' => ['application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'],
'crl' => ['application/pkix-crl', 'application/pkcs-crl'], 'crl' => ['application/pkix-crl', 'application/pkcs-crl'],
'der' => 'application/x-x509-ca-cert', 'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream', 'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp', 'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys', 'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream', 'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream', 'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7', 'rsa' => 'application/x-pkcs7',
'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'], 'cer' => ['application/pkix-cert', 'application/x-x509-ca-cert'],
'3g2' => 'video/3gpp2', '3g2' => 'video/3gpp2',
'3gp' => ['video/3gp', 'video/3gpp'], '3gp' => ['video/3gp', 'video/3gpp'],
'mp4' => 'video/mp4', 'mp4' => 'video/mp4',
'm4a' => ['audio/m4a', 'audio/x-m4a', 'application/octet-stream'], 'm4a' => ['audio/m4a', 'audio/x-m4a', 'application/octet-stream'],
'f4v' => ['video/mp4', 'video/x-f4v'], 'f4v' => ['video/mp4', 'video/x-f4v'],
'flv' => 'video/x-flv', 'flv' => 'video/x-flv',
'webm' => 'video/webm', 'webm' => 'video/webm',
'aac' => 'audio/x-acc', 'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl', 'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain', 'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml', 'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan', 'vlc' => 'application/videolan',
'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'], 'wmv' => ['video/x-ms-wmv', 'video/x-ms-asf'],
'au' => 'audio/x-au', 'au' => 'audio/x-au',
'ac3' => 'audio/ac3', 'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac', 'flac' => 'audio/x-flac',
'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'], 'ogg' => ['audio/ogg', 'video/ogg', 'application/ogg'],
'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'], 'kmz' => ['application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'],
'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'], 'kml' => ['application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'],
'ics' => 'text/calendar', 'ics' => 'text/calendar',
'ical' => 'text/calendar', 'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh', 'zsh' => 'text/x-scriptzsh',
'7zip' => [ '7zip' => [
'application/x-compressed', 'application/x-compressed',
'application/x-zip-compressed', 'application/x-zip-compressed',

View File

@ -23,9 +23,9 @@ class Pager extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public $templates = [ public $templates = [
'default_full' => 'App\Views\pager\default_full', 'default_full' => 'App\Views\pager\default_full',
'default_simple' => 'CodeIgniter\Pager\Views\default_simple', 'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
'default_head' => 'CodeIgniter\Pager\Views\default_head', 'default_head' => 'CodeIgniter\Pager\Views\default_head',
]; ];
/** /**

View File

@ -23,6 +23,6 @@ class Publisher extends BasePublisher
*/ */
public $restrictions = [ public $restrictions = [
ROOTPATH => '*', ROOTPATH => '*',
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i', FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
]; ];
} }

View File

@ -84,18 +84,18 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
// override default Fediverse Library's actor route // override default Fediverse Library's actor route
$routes->options('/', 'ActivityPubController::preflight'); $routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'PodcastController::activity/$1', [ $routes->get('/', 'PodcastController::activity/$1', [
'as' => 'actor', 'as' => 'actor',
'alternate-content' => [ 'alternate-content' => [
'application/activity+json' => [ 'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'ActorController/$1', 'controller-method' => 'ActorController/$1',
], ],
'application/podcast-activity+json' => [ 'application/podcast-activity+json' => [
'namespace' => 'App\Controllers', 'namespace' => 'App\Controllers',
'controller-method' => 'PodcastController::podcastActor/$1', 'controller-method' => 'PodcastController::podcastActor/$1',
], ],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [ 'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'ActorController/$1', 'controller-method' => 'ActorController/$1',
], ],
], ],
@ -106,7 +106,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]); ]);
$routes->options('episodes', 'ActivityPubController::preflight'); $routes->options('episodes', 'ActivityPubController::preflight');
$routes->get('episodes', 'PodcastController::episodes/$1', [ $routes->get('episodes', 'PodcastController::episodes/$1', [
'as' => 'podcast-episodes', 'as' => 'podcast-episodes',
'alternate-content' => [ 'alternate-content' => [
'application/activity+json' => [ 'application/activity+json' => [
'controller-method' => 'PodcastController::episodeCollection/$1', 'controller-method' => 'PodcastController::episodeCollection/$1',
@ -123,7 +123,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
$routes->group('episodes/(:slug)', static function ($routes): void { $routes->group('episodes/(:slug)', static function ($routes): void {
$routes->options('/', 'ActivityPubController::preflight'); $routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'EpisodeController/$1/$2', [ $routes->get('/', 'EpisodeController/$1/$2', [
'as' => 'episode', 'as' => 'episode',
'alternate-content' => [ 'alternate-content' => [
'application/activity+json' => [ 'application/activity+json' => [
'controller-method' => 'EpisodeController::episodeObject/$1/$2', 'controller-method' => 'EpisodeController::episodeObject/$1/$2',
@ -142,7 +142,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]); ]);
$routes->options('comments', 'ActivityPubController::preflight'); $routes->options('comments', 'ActivityPubController::preflight');
$routes->get('comments', 'EpisodeController::comments/$1/$2', [ $routes->get('comments', 'EpisodeController::comments/$1/$2', [
'as' => 'episode-comments', 'as' => 'episode-comments',
'application/activity+json' => [ 'application/activity+json' => [
'controller-method' => 'EpisodeController::comments/$1/$2', 'controller-method' => 'EpisodeController::comments/$1/$2',
], ],
@ -156,7 +156,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]); ]);
$routes->options('comments/(:uuid)', 'ActivityPubController::preflight'); $routes->options('comments/(:uuid)', 'ActivityPubController::preflight');
$routes->get('comments/(:uuid)', 'EpisodeCommentController::view/$1/$2/$3', [ $routes->get('comments/(:uuid)', 'EpisodeCommentController::view/$1/$2/$3', [
'as' => 'episode-comment', 'as' => 'episode-comment',
'application/activity+json' => [ 'application/activity+json' => [
'controller-method' => 'EpisodeController::commentObject/$1/$2', 'controller-method' => 'EpisodeController::commentObject/$1/$2',
], ],
@ -226,21 +226,21 @@ $routes->get('/pages/(:slug)', 'PageController/$1', [
*/ */
$routes->group('@(:podcastHandle)', static function ($routes): void { $routes->group('@(:podcastHandle)', static function ($routes): void {
$routes->post('posts/new', 'PostController::attemptCreate/$1', [ $routes->post('posts/new', 'PostController::attemptCreate/$1', [
'as' => 'post-attempt-create', 'as' => 'post-attempt-create',
'filter' => 'permission:podcast#.manage-publications', 'filter' => 'permission:podcast#.manage-publications',
]); ]);
// Post // Post
$routes->group('posts/(:uuid)', static function ($routes): void { $routes->group('posts/(:uuid)', static function ($routes): void {
$routes->options('/', 'ActivityPubController::preflight'); $routes->options('/', 'ActivityPubController::preflight');
$routes->get('/', 'PostController::view/$1/$2', [ $routes->get('/', 'PostController::view/$1/$2', [
'as' => 'post', 'as' => 'post',
'alternate-content' => [ 'alternate-content' => [
'application/activity+json' => [ 'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController/$2', 'controller-method' => 'PostController/$2',
], ],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [ 'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController/$2', 'controller-method' => 'PostController/$2',
], ],
], ],
@ -248,14 +248,14 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]); ]);
$routes->options('replies', 'ActivityPubController::preflight'); $routes->options('replies', 'ActivityPubController::preflight');
$routes->get('replies', 'PostController/$1/$2', [ $routes->get('replies', 'PostController/$1/$2', [
'as' => 'post-replies', 'as' => 'post-replies',
'alternate-content' => [ 'alternate-content' => [
'application/activity+json' => [ 'application/activity+json' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController::replies/$2', 'controller-method' => 'PostController::replies/$2',
], ],
'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [ 'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
'namespace' => 'Modules\Fediverse\Controllers', 'namespace' => 'Modules\Fediverse\Controllers',
'controller-method' => 'PostController::replies/$2', 'controller-method' => 'PostController::replies/$2',
], ],
], ],
@ -263,14 +263,14 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
]); ]);
// Actions // Actions
$routes->post('action', 'PostController::attemptAction/$1/$2', [ $routes->post('action', 'PostController::attemptAction/$1/$2', [
'as' => 'post-attempt-action', 'as' => 'post-attempt-action',
'filter' => 'permission:podcast#.interact-as', 'filter' => 'permission:podcast#.interact-as',
]); ]);
$routes->post( $routes->post(
'block-actor', 'block-actor',
'PostController::attemptBlockActor/$1/$2', 'PostController::attemptBlockActor/$1/$2',
[ [
'as' => 'post-attempt-block-actor', 'as' => 'post-attempt-block-actor',
'filter' => 'permission:fediverse.manage-blocks', 'filter' => 'permission:fediverse.manage-blocks',
], ],
); );
@ -278,12 +278,12 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
'block-domain', 'block-domain',
'PostController::attemptBlockDomain/$1/$2', 'PostController::attemptBlockDomain/$1/$2',
[ [
'as' => 'post-attempt-block-domain', 'as' => 'post-attempt-block-domain',
'filter' => 'permission:fediverse.manage-blocks', 'filter' => 'permission:fediverse.manage-blocks',
], ],
); );
$routes->post('delete', 'PostController::attemptDelete/$1/$2', [ $routes->post('delete', 'PostController::attemptDelete/$1/$2', [
'as' => 'post-attempt-delete', 'as' => 'post-attempt-delete',
'filter' => 'permission:podcast#.manage-publications', 'filter' => 'permission:podcast#.manage-publications',
]); ]);
$routes->get( $routes->get(
@ -298,7 +298,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
'as' => 'follow', 'as' => 'follow',
]); ]);
$routes->get('outbox', 'ActorController::outbox/$1', [ $routes->get('outbox', 'ActorController::outbox/$1', [
'as' => 'outbox', 'as' => 'outbox',
'filter' => 'fediverse:verify-activitystream', 'filter' => 'fediverse:verify-activitystream',
]); ]);
}); });

View File

@ -27,47 +27,47 @@ class UserAgents extends BaseConfig
*/ */
public array $platforms = [ public array $platforms = [
'windows nt 10.0' => 'Windows 10', 'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1', 'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8', 'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7', 'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista', 'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003', 'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP', 'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000', 'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0', 'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0', 'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT', 'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT', 'winnt' => 'Windows NT',
'windows 98' => 'Windows 98', 'windows 98' => 'Windows 98',
'win98' => 'Windows 98', 'win98' => 'Windows 98',
'windows 95' => 'Windows 95', 'windows 95' => 'Windows 95',
'win95' => 'Windows 95', 'win95' => 'Windows 95',
'windows phone' => 'Windows Phone', 'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS', 'windows' => 'Unknown Windows OS',
'android' => 'Android', 'android' => 'Android',
'blackberry' => 'BlackBerry', 'blackberry' => 'BlackBerry',
'iphone' => 'iOS', 'iphone' => 'iOS',
'ipad' => 'iOS', 'ipad' => 'iOS',
'ipod' => 'iOS', 'ipod' => 'iOS',
'os x' => 'Mac OS X', 'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac', 'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD', 'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh', 'ppc' => 'Macintosh',
'linux' => 'Linux', 'linux' => 'Linux',
'debian' => 'Debian', 'debian' => 'Debian',
'sunos' => 'Sun Solaris', 'sunos' => 'Sun Solaris',
'beos' => 'BeOS', 'beos' => 'BeOS',
'apachebench' => 'ApacheBench', 'apachebench' => 'ApacheBench',
'aix' => 'AIX', 'aix' => 'AIX',
'irix' => 'Irix', 'irix' => 'Irix',
'osf' => 'DEC OSF', 'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX', 'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD', 'netbsd' => 'NetBSD',
'bsdi' => 'BSDi', 'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD', 'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux', 'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS', 'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS', 'symbian' => 'Symbian OS',
]; ];
/** /**
@ -81,37 +81,37 @@ class UserAgents extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $browsers = [ public array $browsers = [
'OPR' => 'Opera', 'OPR' => 'Opera',
'Flock' => 'Flock', 'Flock' => 'Flock',
'Edge' => 'Spartan', 'Edge' => 'Spartan',
'Edg' => 'Edge', 'Edg' => 'Edge',
'Chrome' => 'Chrome', 'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string // Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera', 'Opera.*?Version' => 'Opera',
'Opera' => 'Opera', 'Opera' => 'Opera',
'MSIE' => 'Internet Explorer', 'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer', 'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer', 'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira', 'Shiira' => 'Shiira',
'Firefox' => 'Firefox', 'Firefox' => 'Firefox',
'Chimera' => 'Chimera', 'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix', 'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird', 'Firebird' => 'Firebird',
'Camino' => 'Camino', 'Camino' => 'Camino',
'Netscape' => 'Netscape', 'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb', 'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari', 'Safari' => 'Safari',
'Mozilla' => 'Mozilla', 'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror', 'Konqueror' => 'Konqueror',
'icab' => 'iCab', 'icab' => 'iCab',
'Lynx' => 'Lynx', 'Lynx' => 'Lynx',
'Links' => 'Links', 'Links' => 'Links',
'hotjava' => 'HotJava', 'hotjava' => 'HotJava',
'amaya' => 'Amaya', 'amaya' => 'Amaya',
'IBrowse' => 'IBrowse', 'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon', 'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser', 'Ubuntu' => 'Ubuntu Web Browser',
'Vivaldi' => 'Vivaldi', 'Vivaldi' => 'Vivaldi',
]; ];
/** /**
@ -139,86 +139,86 @@ class UserAgents extends BaseConfig
// 'motorola' => 'Motorola' // 'motorola' => 'Motorola'
// Phones and Manufacturers // Phones and Manufacturers
'motorola' => 'Motorola', 'motorola' => 'Motorola',
'nokia' => 'Nokia', 'nokia' => 'Nokia',
'palm' => 'Palm', 'palm' => 'Palm',
'iphone' => 'Apple iPhone', 'iphone' => 'Apple iPhone',
'ipad' => 'iPad', 'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch', 'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson', 'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson', 'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry', 'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon', 'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo', 'blazer' => 'Treo',
'lg' => 'LG', 'lg' => 'LG',
'amoi' => 'Amoi', 'amoi' => 'Amoi',
'xda' => 'XDA', 'xda' => 'XDA',
'mda' => 'MDA', 'mda' => 'MDA',
'vario' => 'Vario', 'vario' => 'Vario',
'htc' => 'HTC', 'htc' => 'HTC',
'samsung' => 'Samsung', 'samsung' => 'Samsung',
'sharp' => 'Sharp', 'sharp' => 'Sharp',
'sie-' => 'Siemens', 'sie-' => 'Siemens',
'alcatel' => 'Alcatel', 'alcatel' => 'Alcatel',
'benq' => 'BenQ', 'benq' => 'BenQ',
'ipaq' => 'HP iPaq', 'ipaq' => 'HP iPaq',
'mot-' => 'Motorola', 'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable', 'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3', 'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita', 'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop', 'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC', 'nec-' => 'NEC',
'panasonic' => 'Panasonic', 'panasonic' => 'Panasonic',
'philips' => 'Philips', 'philips' => 'Philips',
'sagem' => 'Sagem', 'sagem' => 'Sagem',
'sanyo' => 'Sanyo', 'sanyo' => 'Sanyo',
'spv' => 'SPV', 'spv' => 'SPV',
'zte' => 'ZTE', 'zte' => 'ZTE',
'sendo' => 'Sendo', 'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi', 'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS', 'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS', 'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii', 'wii' => 'Nintendo Wii',
'open web' => 'Open Web', 'open web' => 'Open Web',
'openweb' => 'OpenWeb', 'openweb' => 'OpenWeb',
// Operating Systems // Operating Systems
'android' => 'Android', 'android' => 'Android',
'symbian' => 'Symbian', 'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS', 'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm', 'elaine' => 'Palm',
'series60' => 'Symbian S60', 'series60' => 'Symbian S60',
'windows ce' => 'Windows CE', 'windows ce' => 'Windows CE',
// Browsers // Browsers
'obigo' => 'Obigo', 'obigo' => 'Obigo',
'netfront' => 'Netfront Browser', 'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser', 'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer', 'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini', 'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini', 'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile', 'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile', 'fennec' => 'Firefox Mobile',
// Other // Other
'digital paths' => 'Digital Paths', 'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo', 'avantgo' => 'AvantGo',
'xiino' => 'Xiino', 'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder', 'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone', 'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo', 'docomo' => 'NTT DoCoMo',
'o2' => 'O2', 'o2' => 'O2',
// Fallback // Fallback
'mobile' => 'Generic Mobile', 'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile', 'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile', 'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile', 'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile', 'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile', 'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile', 'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile', 'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile', 'cellphone' => 'Generic Mobile',
]; ];
/** /**
@ -231,24 +231,24 @@ class UserAgents extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $robots = [ public array $robots = [
'googlebot' => 'Googlebot', 'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot', 'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider', 'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing', 'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp', 'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo', 'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves', 'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler', 'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0', 'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos', 'lycos' => 'Lycos',
'yandex' => 'YandexBot', 'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google', 'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google', 'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google', 'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George', 'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler', 'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12', 'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot', 'Uptimebot' => 'Uptimebot',
]; ];
} }

View File

@ -32,7 +32,7 @@ class Validation extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $templates = [ public array $templates = [
'list' => 'CodeIgniter\Validation\Views\list', 'list' => 'CodeIgniter\Validation\Views\list',
'single' => 'CodeIgniter\Validation\Views\single', 'single' => 'CodeIgniter\Validation\Views\single',
]; ];
} }

View File

@ -34,7 +34,7 @@ class ActorController extends FediverseActorController
$data = [ $data = [
// @phpstan-ignore-next-line // @phpstan-ignore-next-line
'metatags' => get_follow_metatags($this->actor), 'metatags' => get_follow_metatags($this->actor),
'actor' => $this->actor, 'actor' => $this->actor,
]; ];
return view('podcast/follow', $data); return view('podcast/follow', $data);

View File

@ -28,8 +28,8 @@ class CreditsController extends BaseController
if (! ($found = cache($cacheName))) { if (! ($found = cache($cacheName))) {
$page = new Page([ $page = new Page([
'title' => lang('Person.credits', [], $locale), 'title' => lang('Person.credits', [], $locale),
'slug' => 'credits', 'slug' => 'credits',
'content_markdown' => '', 'content_markdown' => '',
]); ]);
@ -48,17 +48,15 @@ class CreditsController extends BaseController
$personRole = $credit->person_role; $personRole = $credit->person_role;
$credits[$personGroup] = [ $credits[$personGroup] = [
'group_label' => $credit->group_label, 'group_label' => $credit->group_label,
'persons' => [ 'persons' => [
$personId => [ $personId => [
'full_name' => $credit->person->full_name, 'full_name' => $credit->person->full_name,
'thumbnail_url' => 'thumbnail_url' => get_avatar_url($credit->person, 'thumbnail'),
get_avatar_url($credit->person, 'thumbnail'), 'information_url' => $credit->person->information_url,
'information_url' => 'roles' => [
$credit->person->information_url,
'roles' => [
$personRole => [ $personRole => [
'role_label' => $credit->role_label, 'role_label' => $credit->role_label,
'is_in' => [ 'is_in' => [
[ [
'link' => $credit->episode_id 'link' => $credit->episode_id
? $credit->episode->link ? $credit->episode->link
@ -88,14 +86,13 @@ class CreditsController extends BaseController
$personId = $credit->person_id; $personId = $credit->person_id;
$personRole = $credit->person_role; $personRole = $credit->person_role;
$credits[$personGroup]['persons'][$personId] = [ $credits[$personGroup]['persons'][$personId] = [
'full_name' => $credit->person->full_name, 'full_name' => $credit->person->full_name,
'thumbnail_url' => 'thumbnail_url' => get_avatar_url($credit->person, 'thumbnail'),
get_avatar_url($credit->person, 'thumbnail'),
'information_url' => $credit->person->information_url, 'information_url' => $credit->person->information_url,
'roles' => [ 'roles' => [
$personRole => [ $personRole => [
'role_label' => $credit->role_label, 'role_label' => $credit->role_label,
'is_in' => [ 'is_in' => [
[ [
'link' => $credit->episode_id 'link' => $credit->episode_id
? $credit->episode->link ? $credit->episode->link
@ -124,7 +121,7 @@ class CreditsController extends BaseController
$personRole $personRole
] = [ ] = [
'role_label' => $credit->role_label, 'role_label' => $credit->role_label,
'is_in' => [ 'is_in' => [
[ [
'link' => $credit->episode_id 'link' => $credit->episode_id
? $credit->episode->link ? $credit->episode->link
@ -169,8 +166,8 @@ class CreditsController extends BaseController
$data = [ $data = [
'metatags' => get_page_metatags($page), 'metatags' => get_page_metatags($page),
'page' => $page, 'page' => $page,
'credits' => $credits, 'credits' => $credits,
]; ];
$found = view('pages/credits', $data); $found = view('pages/credits', $data);

View File

@ -102,7 +102,7 @@ class EpisodeAudioController extends Controller
->setJSON([ ->setJSON([
'errors' => [ 'errors' => [
'status' => 401, 'status' => 401,
'title' => 'Unauthorized', 'title' => 'Unauthorized',
'detail' => 'Episode is premium, you must provide a token to unlock it.', 'detail' => 'Episode is premium, you must provide a token to unlock it.',
], ],
]); ]);
@ -117,7 +117,7 @@ class EpisodeAudioController extends Controller
->setJSON([ ->setJSON([
'errors' => [ 'errors' => [
'status' => 401, 'status' => 401,
'title' => 'Unauthorized', 'title' => 'Unauthorized',
'detail' => 'Invalid token!', 'detail' => 'Invalid token!',
], ],
]); ]);

View File

@ -99,10 +99,10 @@ class EpisodeCommentController extends BaseController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_episode_comment_metatags($this->comment), 'metatags' => get_episode_comment_metatags($this->comment),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'actor' => $this->actor, 'actor' => $this->actor,
'episode' => $this->episode, 'episode' => $this->episode,
'comment' => $this->comment, 'comment' => $this->comment,
]; ];
// if user is logged in then send to the authenticated activity view // if user is logged in then send to the authenticated activity view
@ -112,7 +112,7 @@ class EpisodeCommentController extends BaseController
} }
return view('episode/comment', $data, [ return view('episode/comment', $data, [
'cache' => DECADE, 'cache' => DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }

View File

@ -87,8 +87,8 @@ class EpisodeController extends BaseController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_episode_metatags($this->episode), 'metatags' => get_episode_metatags($this->episode),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'episode' => $this->episode, 'episode' => $this->episode,
]; ];
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode(
@ -138,8 +138,8 @@ class EpisodeController extends BaseController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_episode_metatags($this->episode), 'metatags' => get_episode_metatags($this->episode),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'episode' => $this->episode, 'episode' => $this->episode,
]; ];
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode(
@ -197,9 +197,9 @@ class EpisodeController extends BaseController
$themeData = EpisodeModel::$themes[$theme]; $themeData = EpisodeModel::$themes[$theme];
$data = [ $data = [
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'episode' => $this->episode, 'episode' => $this->episode,
'theme' => $theme, 'theme' => $theme,
'themeData' => $themeData, 'themeData' => $themeData,
]; ];
@ -222,22 +222,21 @@ class EpisodeController extends BaseController
public function oembedJSON(): ResponseInterface public function oembedJSON(): ResponseInterface
{ {
return $this->response->setJSON([ return $this->response->setJSON([
'type' => 'rich', 'type' => 'rich',
'version' => '1.0', 'version' => '1.0',
'title' => $this->episode->title, 'title' => $this->episode->title,
'provider_name' => $this->podcast->title, 'provider_name' => $this->podcast->title,
'provider_url' => $this->podcast->link, 'provider_url' => $this->podcast->link,
'author_name' => $this->podcast->title, 'author_name' => $this->podcast->title,
'author_url' => $this->podcast->link, 'author_url' => $this->podcast->link,
'html' => 'html' => '<iframe src="' .
'<iframe src="' .
$this->episode->embed_url . $this->episode->embed_url .
'" width="100%" height="' . config('Embed')->height . '" frameborder="0" scrolling="no"></iframe>', '" width="100%" height="' . config('Embed')->height . '" frameborder="0" scrolling="no"></iframe>',
'width' => config('Embed') 'width' => config('Embed')
->width, ->width,
'height' => config('Embed') 'height' => config('Embed')
->height, ->height,
'thumbnail_url' => $this->episode->cover->og_url, 'thumbnail_url' => $this->episode->cover->og_url,
'thumbnail_width' => config('Images') 'thumbnail_width' => config('Images')
->podcastCoverSizes['og']['width'], ->podcastCoverSizes['og']['width'],
'thumbnail_height' => config('Images') 'thumbnail_height' => config('Images')

View File

@ -36,7 +36,7 @@ class HomeController extends BaseController
$data = [ $data = [
'metatags' => get_home_metatags(), 'metatags' => get_home_metatags(),
'podcasts' => $allPodcasts, 'podcasts' => $allPodcasts,
'sortBy' => $sortBy, 'sortBy' => $sortBy,
]; ];
return view('home', $data); return view('home', $data);
@ -69,14 +69,14 @@ class HomeController extends BaseController
if ($errors !== []) { if ($errors !== []) {
return $this->response->setStatusCode(503) return $this->response->setStatusCode(503)
->setJSON([ ->setJSON([
'code' => 503, 'code' => 503,
'errors' => $errors, 'errors' => $errors,
]); ]);
} }
return $this->response->setStatusCode(200) return $this->response->setStatusCode(200)
->setJSON([ ->setJSON([
'code' => 200, 'code' => 200,
'message' => '✨ All good!', 'message' => '✨ All good!',
]); ]);
} }

View File

@ -31,7 +31,7 @@ class MapController extends BaseController
if (! ($found = cache($cacheName))) { if (! ($found = cache($cacheName))) {
return view('pages/map', [], [ return view('pages/map', [], [
'cache' => DECADE, 'cache' => DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }
@ -50,13 +50,13 @@ class MapController extends BaseController
$found = []; $found = [];
foreach ($episodes as $episode) { foreach ($episodes as $episode) {
$found[] = [ $found[] = [
'latitude' => $episode->location->latitude, 'latitude' => $episode->location->latitude,
'longitude' => $episode->location->longitude, 'longitude' => $episode->location->longitude,
'location_name' => esc($episode->location->name), 'location_name' => esc($episode->location->name),
'location_url' => $episode->location->url, 'location_url' => $episode->location->url,
'episode_link' => $episode->link, 'episode_link' => $episode->link,
'podcast_link' => $episode->podcast->link, 'podcast_link' => $episode->podcast->link,
'cover_url' => $episode->cover->thumbnail_url, 'cover_url' => $episode->cover->thumbnail_url,
'podcast_title' => esc($episode->podcast->title), 'podcast_title' => esc($episode->podcast->title),
'episode_title' => esc($episode->title), 'episode_title' => esc($episode->title),
]; ];

View File

@ -52,7 +52,7 @@ class PageController extends BaseController
if (! ($found = cache($cacheName))) { if (! ($found = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_page_metatags($this->page), 'metatags' => get_page_metatags($this->page),
'page' => $this->page, 'page' => $this->page,
]; ];
$found = view('pages/page', $data); $found = view('pages/page', $data);

View File

@ -80,8 +80,8 @@ class PodcastController extends BaseController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_podcast_metatags($this->podcast, 'activity'), 'metatags' => get_podcast_metatags($this->podcast, 'activity'),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'posts' => (new PostModel())->getActorPublishedPosts($this->podcast->actor_id), 'posts' => (new PostModel())->getActorPublishedPosts($this->podcast->actor_id),
]; ];
// if user is logged in then send to the authenticated activity view // if user is logged in then send to the authenticated activity view
@ -132,8 +132,8 @@ class PodcastController extends BaseController
$data = [ $data = [
'metatags' => get_podcast_metatags($this->podcast, 'about'), 'metatags' => get_podcast_metatags($this->podcast, 'about'),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'stats' => $stats, 'stats' => $stats,
]; ];
// // if user is logged in then send to the authenticated activity view // // if user is logged in then send to the authenticated activity view
@ -207,18 +207,17 @@ class PodcastController extends BaseController
$isActive = $yearQuery === $year['year']; $isActive = $yearQuery === $year['year'];
if ($isActive) { if ($isActive) {
$activeQuery = [ $activeQuery = [
'type' => 'year', 'type' => 'year',
'value' => $year['year'], 'value' => $year['year'],
'label' => $year['year'], 'label' => $year['year'],
'number_of_episodes' => $year['number_of_episodes'], 'number_of_episodes' => $year['number_of_episodes'],
]; ];
} }
$episodesNavigation[] = [ $episodesNavigation[] = [
'label' => $year['year'], 'label' => $year['year'],
'number_of_episodes' => $year['number_of_episodes'], 'number_of_episodes' => $year['number_of_episodes'],
'route' => 'route' => route_to('podcast-episodes', $this->podcast->handle) .
route_to('podcast-episodes', $this->podcast->handle) .
'?year=' . '?year=' .
$year['year'], $year['year'],
'is_active' => $isActive, 'is_active' => $isActive,
@ -229,7 +228,7 @@ class PodcastController extends BaseController
$isActive = $seasonQuery === $season['season_number']; $isActive = $seasonQuery === $season['season_number'];
if ($isActive) { if ($isActive) {
$activeQuery = [ $activeQuery = [
'type' => 'season', 'type' => 'season',
'value' => $season['season_number'], 'value' => $season['season_number'],
'label' => lang('Podcast.season', [ 'label' => lang('Podcast.season', [
'seasonNumber' => $season['season_number'], 'seasonNumber' => $season['season_number'],
@ -243,8 +242,7 @@ class PodcastController extends BaseController
'seasonNumber' => $season['season_number'], 'seasonNumber' => $season['season_number'],
]), ]),
'number_of_episodes' => $season['number_of_episodes'], 'number_of_episodes' => $season['number_of_episodes'],
'route' => 'route' => route_to('podcast-episodes', $this->podcast->handle) .
route_to('podcast-episodes', $this->podcast->handle) .
'?season=' . '?season=' .
$season['season_number'], $season['season_number'],
'is_active' => $isActive, 'is_active' => $isActive,
@ -252,11 +250,11 @@ class PodcastController extends BaseController
} }
$data = [ $data = [
'metatags' => get_podcast_metatags($this->podcast, 'episodes'), 'metatags' => get_podcast_metatags($this->podcast, 'episodes'),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'episodesNav' => $episodesNavigation, 'episodesNav' => $episodesNavigation,
'activeQuery' => $activeQuery, 'activeQuery' => $activeQuery,
'episodes' => (new EpisodeModel())->getPodcastEpisodes( 'episodes' => (new EpisodeModel())->getPodcastEpisodes(
$this->podcast->id, $this->podcast->id,
$this->podcast->type, $this->podcast->type,
$yearQuery, $yearQuery,

View File

@ -92,8 +92,8 @@ class PostController extends FediversePostController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_post_metatags($this->post), 'metatags' => get_post_metatags($this->post),
'post' => $this->post, 'post' => $this->post,
'podcast' => $this->podcast, 'podcast' => $this->podcast,
]; ];
// if user is logged in then send to the authenticated activity view // if user is logged in then send to the authenticated activity view
@ -103,7 +103,7 @@ class PostController extends FediversePostController
} }
return view('post/post', $data, [ return view('post/post', $data, [
'cache' => DECADE, 'cache' => DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }
@ -114,7 +114,7 @@ class PostController extends FediversePostController
public function attemptCreate(): RedirectResponse public function attemptCreate(): RedirectResponse
{ {
$rules = [ $rules = [
'message' => 'required|max_length[500]', 'message' => 'required|max_length[500]',
'episode_url' => 'valid_url_strict|permit_empty', 'episode_url' => 'valid_url_strict|permit_empty',
]; ];
@ -128,9 +128,9 @@ class PostController extends FediversePostController
$message = $this->request->getPost('message'); $message = $this->request->getPost('message');
$newPost = new CastopodPost([ $newPost = new CastopodPost([
'actor_id' => interact_as_actor_id(), 'actor_id' => interact_as_actor_id(),
'published_at' => Time::now(), 'published_at' => Time::now(),
'created_by' => user_id(), 'created_by' => user_id(),
]); ]);
// get episode if episodeUrl has been set // get episode if episodeUrl has been set
@ -174,11 +174,11 @@ class PostController extends FediversePostController
} }
$newPost = new CastopodPost([ $newPost = new CastopodPost([
'actor_id' => interact_as_actor_id(), 'actor_id' => interact_as_actor_id(),
'in_reply_to_id' => $this->post->id, 'in_reply_to_id' => $this->post->id,
'message' => $this->request->getPost('message'), 'message' => $this->request->getPost('message'),
'published_at' => Time::now(), 'published_at' => Time::now(),
'created_by' => user_id(), 'created_by' => user_id(),
]); ]);
if ($this->post->episode_id !== null) { if ($this->post->episode_id !== null) {
@ -227,9 +227,9 @@ class PostController extends FediversePostController
$action = $this->request->getPost('action'); $action = $this->request->getPost('action');
return match ($action) { return match ($action) {
'favourite' => $this->attemptFavourite(), 'favourite' => $this->attemptFavourite(),
'reblog' => $this->attemptReblog(), 'reblog' => $this->attemptReblog(),
'reply' => $this->attemptReply(), 'reply' => $this->attemptReply(),
default => redirect() default => redirect()
->back() ->back()
->withInput() ->withInput()
->with('errors', 'error'), ->with('errors', 'error'),
@ -251,16 +251,16 @@ class PostController extends FediversePostController
if (! ($cachedView = cache($cacheName))) { if (! ($cachedView = cache($cacheName))) {
$data = [ $data = [
'metatags' => get_remote_actions_metatags($this->post, $action), 'metatags' => get_remote_actions_metatags($this->post, $action),
'podcast' => $this->podcast, 'podcast' => $this->podcast,
'actor' => $this->actor, 'actor' => $this->actor,
'post' => $this->post, 'post' => $this->post,
'action' => $action, 'action' => $action,
]; ];
helper('form'); helper('form');
return view('post/remote_action', $data, [ return view('post/remote_action', $data, [
'cache' => DECADE, 'cache' => DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }

View File

@ -23,27 +23,27 @@ class WebmanifestController extends Controller
*/ */
final public const THEME_COLORS = [ final public const THEME_COLORS = [
'pine' => [ 'pine' => [
'theme' => '#009486', 'theme' => '#009486',
'background' => '#F0F9F8', 'background' => '#F0F9F8',
], ],
'lake' => [ 'lake' => [
'theme' => '#00ACE0', 'theme' => '#00ACE0',
'background' => '#F0F7F9', 'background' => '#F0F7F9',
], ],
'jacaranda' => [ 'jacaranda' => [
'theme' => '#562CDD', 'theme' => '#562CDD',
'background' => '#F2F0F9', 'background' => '#F2F0F9',
], ],
'crimson' => [ 'crimson' => [
'theme' => '#F24562', 'theme' => '#F24562',
'background' => '#F9F0F2', 'background' => '#F9F0F2',
], ],
'amber' => [ 'amber' => [
'theme' => '#FF6224', 'theme' => '#FF6224',
'background' => '#F9F3F0', 'background' => '#F9F3F0',
], ],
'onyx' => [ 'onyx' => [
'theme' => '#040406', 'theme' => '#040406',
'background' => '#F3F3F7', 'background' => '#F3F3F7',
], ],
]; ];
@ -53,24 +53,24 @@ class WebmanifestController extends Controller
helper('misc'); helper('misc');
$webmanifest = [ $webmanifest = [
'name' => esc(service('settings') ->get('App.siteName')), 'name' => esc(service('settings') ->get('App.siteName')),
'description' => esc(service('settings') ->get('App.siteDescription')), 'description' => esc(service('settings') ->get('App.siteDescription')),
'lang' => service('request') 'lang' => service('request')
->getLocale(), ->getLocale(),
'start_url' => base_url(), 'start_url' => base_url(),
'display' => 'standalone', 'display' => 'standalone',
'orientation' => 'portrait', 'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'], 'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'], 'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'],
'icons' => [ 'icons' => [
[ [
'src' => get_site_icon_url('192'), 'src' => get_site_icon_url('192'),
'type' => 'image/png', 'type' => 'image/png',
'sizes' => '192x192', 'sizes' => '192x192',
], ],
[ [
'src' => get_site_icon_url('512'), 'src' => get_site_icon_url('512'),
'type' => 'image/png', 'type' => 'image/png',
'sizes' => '512x512', 'sizes' => '512x512',
], ],
], ],
@ -88,25 +88,25 @@ class WebmanifestController extends Controller
} }
$webmanifest = [ $webmanifest = [
'name' => esc($podcast->title), 'name' => esc($podcast->title),
'short_name' => '@' . esc($podcast->handle), 'short_name' => '@' . esc($podcast->handle),
'description' => $podcast->description, 'description' => $podcast->description,
'lang' => $podcast->language_code, 'lang' => $podcast->language_code,
'start_url' => $podcast->link, 'start_url' => $podcast->link,
'scope' => '/@' . esc($podcast->handle), 'scope' => '/@' . esc($podcast->handle),
'display' => 'standalone', 'display' => 'standalone',
'orientation' => 'portrait', 'orientation' => 'portrait',
'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'], 'theme_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['theme'],
'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'], 'background_color' => self::THEME_COLORS[service('settings')->get('App.theme')]['background'],
'icons' => [ 'icons' => [
[ [
'src' => $podcast->cover->webmanifest192_url, 'src' => $podcast->cover->webmanifest192_url,
'type' => $podcast->cover->webmanifest192_mimetype, 'type' => $podcast->cover->webmanifest192_mimetype,
'sizes' => '192x192', 'sizes' => '192x192',
], ],
[ [
'src' => $podcast->cover->webmanifest512_url, 'src' => $podcast->cover->webmanifest512_url,
'type' => $podcast->cover->webmanifest512_mimetype, 'type' => $podcast->cover->webmanifest512_mimetype,
'sizes' => '512x512', 'sizes' => '512x512',
], ],
], ],

View File

@ -20,24 +20,24 @@ class AddCategories extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'parent_id' => [ 'parent_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'code' => [ 'code' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'apple_category' => [ 'apple_category' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'google_category' => [ 'google_category' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
]); ]);

View File

@ -20,12 +20,12 @@ class AddLanguages extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'code' => [ 'code' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'comment' => 'ISO 639-1 language code', 'comment' => 'ISO 639-1 language code',
'constraint' => 2, 'constraint' => 2,
], ],
'native_name' => [ 'native_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
]); ]);

View File

@ -20,24 +20,24 @@ class AddPodcasts extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'guid' => [ 'guid' => [
'type' => 'CHAR', 'type' => 'CHAR',
'constraint' => 36, 'constraint' => 36,
], ],
'actor_id' => [ 'actor_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'handle' => [ 'handle' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'title' => [ 'title' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
'description_markdown' => [ 'description_markdown' => [
@ -47,50 +47,50 @@ class AddPodcasts extends Migration
'type' => 'TEXT', 'type' => 'TEXT',
], ],
'cover_id' => [ 'cover_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'banner_id' => [ 'banner_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'language_code' => [ 'language_code' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 2, 'constraint' => 2,
], ],
'category_id' => [ 'category_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'default' => 0, 'default' => 0,
], ],
'parental_advisory' => [ 'parental_advisory' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['clean', 'explicit'], 'constraint' => ['clean', 'explicit'],
'null' => true, 'null' => true,
], ],
'owner_name' => [ 'owner_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
'owner_email' => [ 'owner_email' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 255, 'constraint' => 255,
], ],
'publisher' => [ 'publisher' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'null' => true, 'null' => true,
], ],
'type' => [ 'type' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['episodic', 'serial'], 'constraint' => ['episodic', 'serial'],
'default' => 'episodic', 'default' => 'episodic',
], ],
'copyright' => [ 'copyright' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'null' => true, 'null' => true,
], ],
'episode_description_footer_markdown' => [ 'episode_description_footer_markdown' => [
'type' => 'TEXT', 'type' => 'TEXT',
@ -101,85 +101,83 @@ class AddPodcasts extends Migration
'null' => true, 'null' => true,
], ],
'is_blocked' => [ 'is_blocked' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'is_completed' => [ 'is_completed' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'is_locked' => [ 'is_locked' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 1, 'default' => 1,
], ],
'imported_feed_url' => [ 'imported_feed_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'comment' => 'comment' => 'The RSS feed URL if this podcast was imported, NULL otherwise.',
'The RSS feed URL if this podcast was imported, NULL otherwise.', 'null' => true,
'null' => true,
], ],
'new_feed_url' => [ 'new_feed_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'comment' => 'comment' => 'The RSS new feed URL if this podcast is moving out, NULL otherwise.',
'The RSS new feed URL if this podcast is moving out, NULL otherwise.', 'null' => true,
'null' => true,
], ],
'payment_pointer' => [ 'payment_pointer' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'comment' => 'Wallet address for Web Monetization payments', 'comment' => 'Wallet address for Web Monetization payments',
'null' => true, 'null' => true,
], ],
'location_name' => [ 'location_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'null' => true, 'null' => true,
], ],
'location_geo' => [ 'location_geo' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
'null' => true, 'null' => true,
], ],
'location_osm' => [ 'location_osm' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 12, 'constraint' => 12,
'null' => true, 'null' => true,
], ],
'custom_rss' => [ 'custom_rss' => [
'type' => 'JSON', 'type' => 'JSON',
'null' => true, 'null' => true,
], ],
'partner_id' => [ 'partner_id' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
'null' => true, 'null' => true,
], ],
'partner_link_url' => [ 'partner_link_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'null' => true, 'null' => true,
], ],
'partner_image_url' => [ 'partner_image_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'null' => true, 'null' => true,
], ],
'is_premium_by_default' => [ 'is_premium_by_default' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'updated_by' => [ 'updated_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'published_at' => [ 'published_at' => [

View File

@ -20,28 +20,28 @@ class AddEpisodes extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'guid' => [ 'guid' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 255, 'constraint' => 255,
], ],
'title' => [ 'title' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
'slug' => [ 'slug' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
'audio_id' => [ 'audio_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'description_markdown' => [ 'description_markdown' => [
@ -51,95 +51,95 @@ class AddEpisodes extends Migration
'type' => 'TEXT', 'type' => 'TEXT',
], ],
'cover_id' => [ 'cover_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'transcript_id' => [ 'transcript_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'transcript_remote_url' => [ 'transcript_remote_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'null' => true, 'null' => true,
], ],
'chapters_id' => [ 'chapters_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'chapters_remote_url' => [ 'chapters_remote_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'null' => true, 'null' => true,
], ],
'parental_advisory' => [ 'parental_advisory' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['clean', 'explicit'], 'constraint' => ['clean', 'explicit'],
'null' => true, 'null' => true,
], ],
'number' => [ 'number' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'season_number' => [ 'season_number' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'type' => [ 'type' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['trailer', 'full', 'bonus'], 'constraint' => ['trailer', 'full', 'bonus'],
'default' => 'full', 'default' => 'full',
], ],
'is_blocked' => [ 'is_blocked' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'location_name' => [ 'location_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'null' => true, 'null' => true,
], ],
'location_geo' => [ 'location_geo' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
'null' => true, 'null' => true,
], ],
'location_osm' => [ 'location_osm' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 12, 'constraint' => 12,
'null' => true, 'null' => true,
], ],
'custom_rss' => [ 'custom_rss' => [
'type' => 'JSON', 'type' => 'JSON',
'null' => true, 'null' => true,
], ],
'posts_count' => [ 'posts_count' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'default' => 0, 'default' => 0,
], ],
'comments_count' => [ 'comments_count' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'default' => 0, 'default' => 0,
], ],
'is_premium' => [ 'is_premium' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'updated_by' => [ 'updated_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'published_at' => [ 'published_at' => [

View File

@ -20,25 +20,25 @@ class AddPlatforms extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'slug' => [ 'slug' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'type' => [ 'type' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['podcasting', 'social', 'funding'], 'constraint' => ['podcasting', 'social', 'funding'],
], ],
'label' => [ 'label' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'home_url' => [ 'home_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 255, 'constraint' => 255,
], ],
'submit_url' => [ 'submit_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'null' => true, 'null' => true,
], ],
]); ]);
$this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()'); $this->forge->addField('`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP()');

View File

@ -20,31 +20,31 @@ class AddPodcastsPlatforms extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'platform_slug' => [ 'platform_slug' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'link_url' => [ 'link_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
], ],
'account_id' => [ 'account_id' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'null' => true, 'null' => true,
], ],
'is_visible' => [ 'is_visible' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
'is_on_embed' => [ 'is_on_embed' => [
'type' => 'TINYINT', 'type' => 'TINYINT',
'constraint' => 1, 'constraint' => 1,
'default' => 0, 'default' => 0,
], ],
]); ]);

View File

@ -20,49 +20,49 @@ class AddEpisodeComments extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'BINARY', 'type' => 'BINARY',
'constraint' => 16, 'constraint' => 16,
], ],
'uri' => [ 'uri' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 255, 'constraint' => 255,
], ],
'episode_id' => [ 'episode_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'actor_id' => [ 'actor_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'in_reply_to_id' => [ 'in_reply_to_id' => [
'type' => 'BINARY', 'type' => 'BINARY',
'constraint' => 16, 'constraint' => 16,
'null' => true, 'null' => true,
], ],
'message' => [ 'message' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 5000, 'constraint' => 5000,
], ],
'message_html' => [ 'message_html' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 6000, 'constraint' => 6000,
], ],
'likes_count' => [ 'likes_count' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'replies_count' => [ 'replies_count' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'created_at' => [ 'created_at' => [
'type' => 'DATETIME', 'type' => 'DATETIME',
], ],
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
]); ]);

View File

@ -20,11 +20,11 @@ class AddLikes extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'actor_id' => [ 'actor_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'comment_id' => [ 'comment_id' => [
'type' => 'BINARY', 'type' => 'BINARY',
'constraint' => 16, 'constraint' => 16,
], ],
]); ]);

View File

@ -20,18 +20,18 @@ class AddPages extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'title' => [ 'title' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 255, 'constraint' => 255,
], ],
'slug' => [ 'slug' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
'unique' => true, 'unique' => true,
], ],
'content_markdown' => [ 'content_markdown' => [
'type' => 'TEXT', 'type' => 'TEXT',

View File

@ -20,11 +20,11 @@ class AddPodcastsCategories extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'category_id' => [ 'category_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
]); ]);

View File

@ -18,57 +18,57 @@ class AddClips extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'episode_id' => [ 'episode_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'start_time' => [ 'start_time' => [
'type' => 'DECIMAL(8,3)', 'type' => 'DECIMAL(8,3)',
'unsigned' => true, 'unsigned' => true,
], ],
'duration' => [ 'duration' => [
// clip duration cannot be higher than 9999,999 seconds ~ 2.77 hours // clip duration cannot be higher than 9999,999 seconds ~ 2.77 hours
'type' => 'DECIMAL(7,3)', 'type' => 'DECIMAL(7,3)',
'unsigned' => true, 'unsigned' => true,
], ],
'title' => [ 'title' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 128, 'constraint' => 128,
], ],
'type' => [ 'type' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['audio', 'video'], 'constraint' => ['audio', 'video'],
], ],
'media_id' => [ 'media_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'metadata' => [ 'metadata' => [
'type' => 'JSON', 'type' => 'JSON',
'null' => true, 'null' => true,
], ],
'status' => [ 'status' => [
'type' => 'ENUM', 'type' => 'ENUM',
'constraint' => ['queued', 'pending', 'running', 'passed', 'failed'], 'constraint' => ['queued', 'pending', 'running', 'passed', 'failed'],
], ],
'logs' => [ 'logs' => [
'type' => 'TEXT', 'type' => 'TEXT',
], ],
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'updated_by' => [ 'updated_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'job_started_at' => [ 'job_started_at' => [

View File

@ -20,39 +20,38 @@ class AddPersons extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'full_name' => [ 'full_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 192, 'constraint' => 192,
'comment' => 'This is the full name or alias of the person.', 'comment' => 'This is the full name or alias of the person.',
], ],
'unique_name' => [ 'unique_name' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 192, 'constraint' => 192,
'comment' => 'This is the slug name or alias of the person.', 'comment' => 'This is the slug name or alias of the person.',
'unique' => true, 'unique' => true,
], ],
'information_url' => [ 'information_url' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 512, 'constraint' => 512,
'comment' => 'comment' => 'The url to a relevant resource of information about the person, such as a homepage or third-party profile platform.',
'The url to a relevant resource of information about the person, such as a homepage or third-party profile platform.', 'null' => true,
'null' => true,
], ],
'avatar_id' => [ 'avatar_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
], ],
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'updated_by' => [ 'updated_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'created_at' => [ 'created_at' => [

View File

@ -20,24 +20,24 @@ class AddPodcastsPersons extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'person_id' => [ 'person_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'person_group' => [ 'person_group' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'person_role' => [ 'person_role' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
]); ]);

View File

@ -20,28 +20,28 @@ class AddEpisodesPersons extends Migration
{ {
$this->forge->addField([ $this->forge->addField([
'id' => [ 'id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'auto_increment' => true, 'auto_increment' => true,
], ],
'podcast_id' => [ 'podcast_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'episode_id' => [ 'episode_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'person_id' => [ 'person_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
], ],
'person_group' => [ 'person_group' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
'person_role' => [ 'person_role' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => 32, 'constraint' => 32,
], ],
]); ]);

View File

@ -24,10 +24,10 @@ class AddEpisodeIdToPosts extends Migration
$this->forge->addColumn("{$fediverseTablesPrefix}posts", [ $this->forge->addColumn("{$fediverseTablesPrefix}posts", [
'episode_id' => [ 'episode_id' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
'after' => 'replies_count', 'after' => 'replies_count',
], ],
]); ]);

View File

@ -24,10 +24,10 @@ class AddCreatedByToPosts extends Migration
$this->forge->addColumn("{$fediverseTablesPrefix}posts", [ $this->forge->addColumn("{$fediverseTablesPrefix}posts", [
'created_by' => [ 'created_by' => [
'type' => 'INT', 'type' => 'INT',
'unsigned' => true, 'unsigned' => true,
'null' => true, 'null' => true,
'after' => 'episode_id', 'after' => 'episode_id',
], ],
]); ]);

File diff suppressed because it is too large Load Diff

View File

@ -122,50 +122,50 @@ class FakePodcastsAnalyticsSeeder extends Seeder
$hits = rand(0, (int) $probability2); $hits = rand(0, (int) $probability2);
$analyticsPodcasts[] = [ $analyticsPodcasts[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'duration' => rand(60, 3600), 'duration' => rand(60, 3600),
'bandwidth' => rand(1000000, 10000000), 'bandwidth' => rand(1000000, 10000000),
'hits' => $hits, 'hits' => $hits,
'unique_listeners' => $hits, 'unique_listeners' => $hits,
]; ];
$analyticsPodcastsByHour[] = [ $analyticsPodcastsByHour[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'hour' => rand(0, 23), 'hour' => rand(0, 23),
'hits' => $hits, 'hits' => $hits,
]; ];
$analyticsPodcastsByCountry[] = [ $analyticsPodcastsByCountry[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'country_code' => $countryCode, 'country_code' => $countryCode,
'hits' => $hits, 'hits' => $hits,
]; ];
$analyticsPodcastsByEpisode[] = [ $analyticsPodcastsByEpisode[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'episode_id' => $episode->id, 'episode_id' => $episode->id,
'age' => $age, 'age' => $age,
'hits' => $hits, 'hits' => $hits,
]; ];
$analyticsPodcastsByPlayer[] = [ $analyticsPodcastsByPlayer[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'service' => $service, 'service' => $service,
'app' => $app, 'app' => $app,
'device' => $device, 'device' => $device,
'os' => $os, 'os' => $os,
'is_bot' => $isBot, 'is_bot' => $isBot,
'hits' => $hits, 'hits' => $hits,
]; ];
$analyticsPodcastsByRegion[] = [ $analyticsPodcastsByRegion[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'country_code' => $countryCode, 'country_code' => $countryCode,
'region_code' => $regionCode, 'region_code' => $regionCode,
'latitude' => $latitude, 'latitude' => $latitude,
'longitude' => $longitude, 'longitude' => $longitude,
'hits' => $hits, 'hits' => $hits,
]; ];
} }
} }

View File

@ -14,18 +14,18 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function cover(): array public static function cover(): array
{ {
return [ return [
'id' => 1, 'id' => 1,
'file_key' => 'podcasts/Handle/cover.jpg', 'file_key' => 'podcasts/Handle/cover.jpg',
'file_size' => 400000, 'file_size' => 400000,
'file_mimetype' => 'image/jpeg', 'file_mimetype' => 'image/jpeg',
'file_metadata' => '{"FILE":{"FileName":"cover.jpg","FileDateTime":1654861723,"FileSize":468541,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":"COMMENT"},"COMPUTED":{"html":"width=\"1400\" height=\"1400\"","Height":1400,"Width":1400,"IsColor":1},"COMMENT":["CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90\n"],"sizes":{"tiny":{"width":40,"height":40,"mimetype":"image\/webp","extension":"webp"},"thumbnail":{"width":150,"height":150,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":320,"height":320,"mimetype":"image\/webp","extension":"webp"},"large":{"width":1024,"height":1024,"mimetype":"image\/webp","extension":"webp"},"feed":{"width":1400,"height":1400},"id3":{"width":500,"height":500},"og":{"width":1200,"height":1200},"federation":{"width":400,"height":400},"webmanifest192":{"width":192,"height":192,"mimetype":"image\/png","extension":"png"},"webmanifest512":{"width":512,"height":512,"mimetype":"image\/png","extension":"png"}}}', 'file_metadata' => '{"FILE":{"FileName":"cover.jpg","FileDateTime":1654861723,"FileSize":468541,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":"COMMENT"},"COMPUTED":{"html":"width=\"1400\" height=\"1400\"","Height":1400,"Width":1400,"IsColor":1},"COMMENT":["CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90\n"],"sizes":{"tiny":{"width":40,"height":40,"mimetype":"image\/webp","extension":"webp"},"thumbnail":{"width":150,"height":150,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":320,"height":320,"mimetype":"image\/webp","extension":"webp"},"large":{"width":1024,"height":1024,"mimetype":"image\/webp","extension":"webp"},"feed":{"width":1400,"height":1400},"id3":{"width":500,"height":500},"og":{"width":1200,"height":1200},"federation":{"width":400,"height":400},"webmanifest192":{"width":192,"height":192,"mimetype":"image\/png","extension":"png"},"webmanifest512":{"width":512,"height":512,"mimetype":"image\/png","extension":"png"}}}',
'type' => 'image', 'type' => 'image',
'description' => null, 'description' => null,
'language_code' => null, 'language_code' => null,
'uploaded_by' => 1, 'uploaded_by' => 1,
'updated_by' => 1, 'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00', 'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00', 'updated_at' => '2022-06-13 8:00:00',
]; ];
} }
@ -35,18 +35,18 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function banner(): array public static function banner(): array
{ {
return [ return [
'id' => 2, 'id' => 2,
'file_key' => 'podcasts/Handle/banner.jpg', 'file_key' => 'podcasts/Handle/banner.jpg',
'file_size' => 400000, 'file_size' => 400000,
'file_mimetype' => 'image/jpeg', 'file_mimetype' => 'image/jpeg',
'file_metadata' => '{"FILE":{"FileName":"banner.jpg","FileDateTime":1654861724,"FileSize":98209,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":""},"COMPUTED":{"html":"width=\"1500\" height=\"500\"","Height":500,"Width":1500,"IsColor":1},"sizes":{"small":{"width":320,"height":128,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":960,"height":320,"mimetype":"image\/webp","extension":"webp"},"federation":{"width":1500,"height":500}}}', 'file_metadata' => '{"FILE":{"FileName":"banner.jpg","FileDateTime":1654861724,"FileSize":98209,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":""},"COMPUTED":{"html":"width=\"1500\" height=\"500\"","Height":500,"Width":1500,"IsColor":1},"sizes":{"small":{"width":320,"height":128,"mimetype":"image\/webp","extension":"webp"},"medium":{"width":960,"height":320,"mimetype":"image\/webp","extension":"webp"},"federation":{"width":1500,"height":500}}}',
'type' => 'image', 'type' => 'image',
'description' => null, 'description' => null,
'language_code' => null, 'language_code' => null,
'uploaded_by' => 1, 'uploaded_by' => 1,
'updated_by' => 1, 'updated_by' => 1,
'uploaded_at' => '2022-06-13 8:00:00', 'uploaded_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00', 'updated_at' => '2022-06-13 8:00:00',
]; ];
} }
@ -56,26 +56,26 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function actor(): array public static function actor(): array
{ {
return [ return [
'id' => 1, 'id' => 1,
'uri' => getenv('app_baseURL') . '@Handle', 'uri' => getenv('app_baseURL') . '@Handle',
'username' => 'Handle', 'username' => 'Handle',
'domain' => getenv('app_baseURL'), 'domain' => getenv('app_baseURL'),
'private_key' => 'private_key', 'private_key' => 'private_key',
'public_key' => 'public_key', 'public_key' => 'public_key',
'display_name' => 'Title', 'display_name' => 'Title',
'summary' => '<p>description</p>', 'summary' => '<p>description</p>',
'avatar_image_url' => getenv('app_baseURL') . 'media/podcasts/Handle', 'avatar_image_url' => getenv('app_baseURL') . 'media/podcasts/Handle',
'avatar_image_mimetype' => 'image/webp', 'avatar_image_mimetype' => 'image/webp',
'cover_image_url' => null, 'cover_image_url' => null,
'cover_image_mimetype' => null, 'cover_image_mimetype' => null,
'inbox_url' => getenv('app_baseURL') . '@Handle/inbox', 'inbox_url' => getenv('app_baseURL') . '@Handle/inbox',
'outbox_url' => getenv('app_baseURL') . '@Handle/outbox', 'outbox_url' => getenv('app_baseURL') . '@Handle/outbox',
'followers_url' => getenv('app_baseURL') . '@Handle/followers', 'followers_url' => getenv('app_baseURL') . '@Handle/followers',
'followers_count' => 0, 'followers_count' => 0,
'posts_count' => 0, 'posts_count' => 0,
'is_blocked' => 0, 'is_blocked' => 0,
'created_at' => '2022-06-13 8:00:00', 'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00', 'updated_at' => '2022-06-13 8:00:00',
]; ];
} }
@ -85,43 +85,43 @@ class FakeSinglePodcastApiSeeder extends Seeder
public static function podcast(): array public static function podcast(): array
{ {
return [ return [
'id' => 1, 'id' => 1,
'guid' => '0d341200-0234-5de7-99a6-a7d02bea4ce2', 'guid' => '0d341200-0234-5de7-99a6-a7d02bea4ce2',
'actor_id' => 1, 'actor_id' => 1,
'handle' => 'Handle', 'handle' => 'Handle',
'title' => 'Title', 'title' => 'Title',
'description_markdown' => 'description', 'description_markdown' => 'description',
'description_html' => '<p>description</p>', 'description_html' => '<p>description</p>',
'cover_id' => 1, 'cover_id' => 1,
'banner_id' => 2, 'banner_id' => 2,
'language_code' => 'en', 'language_code' => 'en',
'category_id' => 1, 'category_id' => 1,
'parental_advisory' => null, 'parental_advisory' => null,
'owner_name' => 'Owner', 'owner_name' => 'Owner',
'owner_email' => 'Owner@gmail.com', 'owner_email' => 'Owner@gmail.com',
'publisher' => '', 'publisher' => '',
'type' => 'episodic', 'type' => 'episodic',
'copyright' => '', 'copyright' => '',
'episode_description_footer_markdown' => null, 'episode_description_footer_markdown' => null,
'episode_description_footer_html' => null, 'episode_description_footer_html' => null,
'is_blocked' => 0, 'is_blocked' => 0,
'is_completed' => 0, 'is_completed' => 0,
'is_locked' => 1, 'is_locked' => 1,
'imported_feed_url' => null, 'imported_feed_url' => null,
'new_feed_url' => null, 'new_feed_url' => null,
'payment_pointer' => null, 'payment_pointer' => null,
'location_name' => null, 'location_name' => null,
'location_geo' => null, 'location_geo' => null,
'location_osm' => null, 'location_osm' => null,
'custom_rss' => null, 'custom_rss' => null,
'is_published_on_hubs' => 0, 'is_published_on_hubs' => 0,
'partner_id' => null, 'partner_id' => null,
'partner_link_url' => null, 'partner_link_url' => null,
'partner_image_url' => null, 'partner_image_url' => null,
'created_by' => 1, 'created_by' => 1,
'updated_by' => 1, 'updated_by' => 1,
'created_at' => '2022-06-13 8:00:00', 'created_at' => '2022-06-13 8:00:00',
'updated_at' => '2022-06-13 8:00:00', 'updated_at' => '2022-06-13 8:00:00',
]; ];
} }

View File

@ -227,24 +227,23 @@ class FakeWebsiteAnalyticsSeeder extends Seeder
$websiteByBrowser[] = [ $websiteByBrowser[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'browser' => $browser, 'browser' => $browser,
'hits' => $hits, 'hits' => $hits,
]; ];
$websiteByEntryPage[] = [ $websiteByEntryPage[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'entry_page_url' => $episode->link, 'entry_page_url' => $episode->link,
'hits' => $hits, 'hits' => $hits,
]; ];
$websiteByReferer[] = [ $websiteByReferer[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'referer_url' => 'referer_url' => 'http://' . $domain . '/?q=' . $keyword,
'http://' . $domain . '/?q=' . $keyword, 'domain' => $domain,
'domain' => $domain, 'keywords' => $keyword,
'keywords' => $keyword, 'hits' => $hits,
'hits' => $hits,
]; ];
} }
} }

View File

@ -25,740 +25,739 @@ class LanguageSeeder extends Seeder
{ {
$data = [ $data = [
[ [
'code' => 'aa', 'code' => 'aa',
'native_name' => 'Afaraf', 'native_name' => 'Afaraf',
], ],
[ [
'code' => 'ab', 'code' => 'ab',
'native_name' => 'аҧсуа бызшәа, аҧсшәа', 'native_name' => 'аҧсуа бызшәа, аҧсшәа',
], ],
[ [
'code' => 'ae', 'code' => 'ae',
'native_name' => 'Avesta', 'native_name' => 'Avesta',
], ],
[ [
'code' => 'af', 'code' => 'af',
'native_name' => 'Afrikaans', 'native_name' => 'Afrikaans',
], ],
[ [
'code' => 'ak', 'code' => 'ak',
'native_name' => 'Akan', 'native_name' => 'Akan',
], ],
[ [
'code' => 'am', 'code' => 'am',
'native_name' => 'አማርኛ', 'native_name' => 'አማርኛ',
], ],
[ [
'code' => 'an', 'code' => 'an',
'native_name' => 'Aragonés', 'native_name' => 'Aragonés',
], ],
[ [
'code' => 'ar', 'code' => 'ar',
'native_name' => 'العربية', 'native_name' => 'العربية',
], ],
[ [
'code' => 'as', 'code' => 'as',
'native_name' => 'অসমীয়া', 'native_name' => 'অসমীয়া',
], ],
[ [
'code' => 'av', 'code' => 'av',
'native_name' => 'авар мацӀ, магӀарул мацӀ', 'native_name' => 'авар мацӀ, магӀарул мацӀ',
], ],
[ [
'code' => 'ay', 'code' => 'ay',
'native_name' => 'Aymar aru', 'native_name' => 'Aymar aru',
], ],
[ [
'code' => 'az', 'code' => 'az',
'native_name' => 'azərbaycan dili', 'native_name' => 'azərbaycan dili',
], ],
[ [
'code' => 'ba', 'code' => 'ba',
'native_name' => 'башҡорт теле', 'native_name' => 'башҡорт теле',
], ],
[ [
'code' => 'be', 'code' => 'be',
'native_name' => 'беларуская мова', 'native_name' => 'беларуская мова',
], ],
[ [
'code' => 'bg', 'code' => 'bg',
'native_name' => 'български език', 'native_name' => 'български език',
], ],
[ [
'code' => 'bh', 'code' => 'bh',
'native_name' => 'भोजपुरी', 'native_name' => 'भोजपुरी',
], ],
[ [
'code' => 'bi', 'code' => 'bi',
'native_name' => 'Bislama', 'native_name' => 'Bislama',
], ],
[ [
'code' => 'bm', 'code' => 'bm',
'native_name' => 'Bamanankan', 'native_name' => 'Bamanankan',
], ],
[ [
'code' => 'bn', 'code' => 'bn',
'native_name' => 'বাংলা', 'native_name' => 'বাংলা',
], ],
[ [
'code' => 'bo', 'code' => 'bo',
'native_name' => 'བོད་ཡིག', 'native_name' => 'བོད་ཡིག',
], ],
[ [
'code' => 'br', 'code' => 'br',
'native_name' => 'Brezhoneg', 'native_name' => 'Brezhoneg',
], ],
[ [
'code' => 'bs', 'code' => 'bs',
'native_name' => 'Bosanski jezik', 'native_name' => 'Bosanski jezik',
], ],
[ [
'code' => 'ca', 'code' => 'ca',
'native_name' => 'Català, valencià', 'native_name' => 'Català, valencià',
], ],
[ [
'code' => 'ce', 'code' => 'ce',
'native_name' => 'нохчийн мотт', 'native_name' => 'нохчийн мотт',
], ],
[ [
'code' => 'ch', 'code' => 'ch',
'native_name' => 'Chamoru', 'native_name' => 'Chamoru',
], ],
[ [
'code' => 'co', 'code' => 'co',
'native_name' => 'Corsu, lingua corsa', 'native_name' => 'Corsu, lingua corsa',
], ],
[ [
'code' => 'cr', 'code' => 'cr',
'native_name' => 'ᓀᐦᐃᔭᐍᐏᐣ', 'native_name' => 'ᓀᐦᐃᔭᐍᐏᐣ',
], ],
[ [
'code' => 'cs', 'code' => 'cs',
'native_name' => 'čeština, český jazyk', 'native_name' => 'čeština, český jazyk',
], ],
[ [
'code' => 'cu', 'code' => 'cu',
'native_name' => 'ѩзыкъ словѣньскъ', 'native_name' => 'ѩзыкъ словѣньскъ',
], ],
[ [
'code' => 'cv', 'code' => 'cv',
'native_name' => 'чӑваш чӗлхи', 'native_name' => 'чӑваш чӗлхи',
], ],
[ [
'code' => 'cy', 'code' => 'cy',
'native_name' => 'Cymraeg', 'native_name' => 'Cymraeg',
], ],
[ [
'code' => 'da', 'code' => 'da',
'native_name' => 'Dansk', 'native_name' => 'Dansk',
], ],
[ [
'code' => 'de', 'code' => 'de',
'native_name' => 'Deutsch', 'native_name' => 'Deutsch',
], ],
[ [
'code' => 'dv', 'code' => 'dv',
'native_name' => 'ދިވެހި', 'native_name' => 'ދިވެހި',
], ],
[ [
'code' => 'dz', 'code' => 'dz',
'native_name' => 'རྫོང་ཁ', 'native_name' => 'རྫོང་ཁ',
], ],
[ [
'code' => 'ee', 'code' => 'ee',
'native_name' => 'Eʋegbe', 'native_name' => 'Eʋegbe',
], ],
[ [
'code' => 'el', 'code' => 'el',
'native_name' => 'ελληνικά', 'native_name' => 'ελληνικά',
], ],
[ [
'code' => 'en', 'code' => 'en',
'native_name' => 'English', 'native_name' => 'English',
], ],
[ [
'code' => 'eo', 'code' => 'eo',
'native_name' => 'Esperanto', 'native_name' => 'Esperanto',
], ],
[ [
'code' => 'es', 'code' => 'es',
'native_name' => 'Español', 'native_name' => 'Español',
], ],
[ [
'code' => 'et', 'code' => 'et',
'native_name' => 'eesti, eesti keel', 'native_name' => 'eesti, eesti keel',
], ],
[ [
'code' => 'eu', 'code' => 'eu',
'native_name' => 'Euskara, euskera', 'native_name' => 'Euskara, euskera',
], ],
[ [
'code' => 'fa', 'code' => 'fa',
'native_name' => 'فارسی', 'native_name' => 'فارسی',
], ],
[ [
'code' => 'ff', 'code' => 'ff',
'native_name' => 'Fulfulde, Pulaar, Pular', 'native_name' => 'Fulfulde, Pulaar, Pular',
], ],
[ [
'code' => 'fi', 'code' => 'fi',
'native_name' => 'Suomi, suomen kieli', 'native_name' => 'Suomi, suomen kieli',
], ],
[ [
'code' => 'fj', 'code' => 'fj',
'native_name' => 'Vosa Vakaviti', 'native_name' => 'Vosa Vakaviti',
], ],
[ [
'code' => 'fo', 'code' => 'fo',
'native_name' => 'Føroyskt', 'native_name' => 'Føroyskt',
], ],
[ [
'code' => 'fr', 'code' => 'fr',
'native_name' => 'Français, langue française', 'native_name' => 'Français, langue française',
], ],
[ [
'code' => 'fy', 'code' => 'fy',
'native_name' => 'Frysk', 'native_name' => 'Frysk',
], ],
[ [
'code' => 'ga', 'code' => 'ga',
'native_name' => 'Gaeilge', 'native_name' => 'Gaeilge',
], ],
[ [
'code' => 'gd', 'code' => 'gd',
'native_name' => 'Gàidhlig', 'native_name' => 'Gàidhlig',
], ],
[ [
'code' => 'gl', 'code' => 'gl',
'native_name' => 'Galego', 'native_name' => 'Galego',
], ],
[ [
'code' => 'gn', 'code' => 'gn',
'native_name' => "Avañe'ẽ", 'native_name' => "Avañe'ẽ",
], ],
[ [
'code' => 'gu', 'code' => 'gu',
'native_name' => 'ગુજરાતી', 'native_name' => 'ગુજરાતી',
], ],
[ [
'code' => 'gv', 'code' => 'gv',
'native_name' => 'Gaelg, Gailck', 'native_name' => 'Gaelg, Gailck',
], ],
[ [
'code' => 'ha', 'code' => 'ha',
'native_name' => '(Hausa) هَوُسَ', 'native_name' => '(Hausa) هَوُسَ',
], ],
[ [
'code' => 'he', 'code' => 'he',
'native_name' => 'עברית', 'native_name' => 'עברית',
], ],
[ [
'code' => 'hi', 'code' => 'hi',
'native_name' => 'हिन्दी, हिंदी', 'native_name' => 'हिन्दी, हिंदी',
], ],
[ [
'code' => 'ho', 'code' => 'ho',
'native_name' => 'Hiri Motu', 'native_name' => 'Hiri Motu',
], ],
[ [
'code' => 'hr', 'code' => 'hr',
'native_name' => 'Hrvatski jezik', 'native_name' => 'Hrvatski jezik',
], ],
[ [
'code' => 'ht', 'code' => 'ht',
'native_name' => 'Kreyòl ayisyen', 'native_name' => 'Kreyòl ayisyen',
], ],
[ [
'code' => 'hu', 'code' => 'hu',
'native_name' => 'Magyar', 'native_name' => 'Magyar',
], ],
[ [
'code' => 'hy', 'code' => 'hy',
'native_name' => 'Հայերեն', 'native_name' => 'Հայերեն',
], ],
[ [
'code' => 'hz', 'code' => 'hz',
'native_name' => 'Otjiherero', 'native_name' => 'Otjiherero',
], ],
[ [
'code' => 'ia', 'code' => 'ia',
'native_name' => 'Interlingua', 'native_name' => 'Interlingua',
], ],
[ [
'code' => 'id', 'code' => 'id',
'native_name' => 'Bahasa Indonesia', 'native_name' => 'Bahasa Indonesia',
], ],
[ [
'code' => 'ie', 'code' => 'ie',
'native_name' => 'native_name' => 'Interlingue, formerly Occidental',
'Interlingue, formerly Occidental',
], ],
[ [
'code' => 'ig', 'code' => 'ig',
'native_name' => 'Asụsụ Igbo', 'native_name' => 'Asụsụ Igbo',
], ],
[ [
'code' => 'ii', 'code' => 'ii',
'native_name' => 'ꆈꌠ꒿ Nuosuhxop', 'native_name' => 'ꆈꌠ꒿ Nuosuhxop',
], ],
[ [
'code' => 'ik', 'code' => 'ik',
'native_name' => 'Iñupiaq, Iñupiatun', 'native_name' => 'Iñupiaq, Iñupiatun',
], ],
[ [
'code' => 'io', 'code' => 'io',
'native_name' => 'Ido', 'native_name' => 'Ido',
], ],
[ [
'code' => 'is', 'code' => 'is',
'native_name' => 'Íslenska', 'native_name' => 'Íslenska',
], ],
[ [
'code' => 'it', 'code' => 'it',
'native_name' => 'Italiano', 'native_name' => 'Italiano',
], ],
[ [
'code' => 'iu', 'code' => 'iu',
'native_name' => 'ᐃᓄᒃᑎᑐᑦ', 'native_name' => 'ᐃᓄᒃᑎᑐᑦ',
], ],
[ [
'code' => 'ja', 'code' => 'ja',
'native_name' => '日本語 (にほんご)', 'native_name' => '日本語 (にほんご)',
], ],
[ [
'code' => 'jv', 'code' => 'jv',
'native_name' => 'ꦧꦱꦗꦮ, Basa Jawa', 'native_name' => 'ꦧꦱꦗꦮ, Basa Jawa',
], ],
[ [
'code' => 'ka', 'code' => 'ka',
'native_name' => 'ქართული', 'native_name' => 'ქართული',
], ],
[ [
'code' => 'kg', 'code' => 'kg',
'native_name' => 'Kikongo', 'native_name' => 'Kikongo',
], ],
[ [
'code' => 'ki', 'code' => 'ki',
'native_name' => 'Gĩkũyũ', 'native_name' => 'Gĩkũyũ',
], ],
[ [
'code' => 'kj', 'code' => 'kj',
'native_name' => 'Kuanyama', 'native_name' => 'Kuanyama',
], ],
[ [
'code' => 'kk', 'code' => 'kk',
'native_name' => 'қазақ тілі', 'native_name' => 'қазақ тілі',
], ],
[ [
'code' => 'kl', 'code' => 'kl',
'native_name' => 'Kalaallisut, kalaallit oqaasii', 'native_name' => 'Kalaallisut, kalaallit oqaasii',
], ],
[ [
'code' => 'km', 'code' => 'km',
'native_name' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ', 'native_name' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ',
], ],
[ [
'code' => 'kn', 'code' => 'kn',
'native_name' => 'ಕನ್ನಡ', 'native_name' => 'ಕನ್ನಡ',
], ],
[ [
'code' => 'ko', 'code' => 'ko',
'native_name' => '한국어', 'native_name' => '한국어',
], ],
[ [
'code' => 'kr', 'code' => 'kr',
'native_name' => 'Kanuri', 'native_name' => 'Kanuri',
], ],
[ [
'code' => 'ks', 'code' => 'ks',
'native_name' => 'कश्मीरी, كشميري‎', 'native_name' => 'कश्मीरी, كشميري‎',
], ],
[ [
'code' => 'ku', 'code' => 'ku',
'native_name' => 'Kurdî, کوردی‎', 'native_name' => 'Kurdî, کوردی‎',
], ],
[ [
'code' => 'kv', 'code' => 'kv',
'native_name' => 'коми кыв', 'native_name' => 'коми кыв',
], ],
[ [
'code' => 'kw', 'code' => 'kw',
'native_name' => 'Kernewek', 'native_name' => 'Kernewek',
], ],
[ [
'code' => 'ky', 'code' => 'ky',
'native_name' => 'Кыргызча, Кыргыз тили', 'native_name' => 'Кыргызча, Кыргыз тили',
], ],
[ [
'code' => 'la', 'code' => 'la',
'native_name' => 'Latine, lingua latina', 'native_name' => 'Latine, lingua latina',
], ],
[ [
'code' => 'lb', 'code' => 'lb',
'native_name' => 'Lëtzebuergesch', 'native_name' => 'Lëtzebuergesch',
], ],
[ [
'code' => 'lg', 'code' => 'lg',
'native_name' => 'Luganda', 'native_name' => 'Luganda',
], ],
[ [
'code' => 'li', 'code' => 'li',
'native_name' => 'Limburgs', 'native_name' => 'Limburgs',
], ],
[ [
'code' => 'ln', 'code' => 'ln',
'native_name' => 'Lingála', 'native_name' => 'Lingála',
], ],
[ [
'code' => 'lo', 'code' => 'lo',
'native_name' => 'ພາສາລາວ', 'native_name' => 'ພາສາລາວ',
], ],
[ [
'code' => 'lt', 'code' => 'lt',
'native_name' => 'Lietuvių kalba', 'native_name' => 'Lietuvių kalba',
], ],
[ [
'code' => 'lu', 'code' => 'lu',
'native_name' => 'Kiluba', 'native_name' => 'Kiluba',
], ],
[ [
'code' => 'lv', 'code' => 'lv',
'native_name' => 'Latviešu valoda', 'native_name' => 'Latviešu valoda',
], ],
[ [
'code' => 'mg', 'code' => 'mg',
'native_name' => 'Fiteny malagasy', 'native_name' => 'Fiteny malagasy',
], ],
[ [
'code' => 'mh', 'code' => 'mh',
'native_name' => 'Kajin M̧ajeļ', 'native_name' => 'Kajin M̧ajeļ',
], ],
[ [
'code' => 'mi', 'code' => 'mi',
'native_name' => 'Te reo Māori', 'native_name' => 'Te reo Māori',
], ],
[ [
'code' => 'mk', 'code' => 'mk',
'native_name' => 'македонски јазик', 'native_name' => 'македонски јазик',
], ],
[ [
'code' => 'ml', 'code' => 'ml',
'native_name' => 'മലയാളം', 'native_name' => 'മലയാളം',
], ],
[ [
'code' => 'mn', 'code' => 'mn',
'native_name' => 'Монгол хэл', 'native_name' => 'Монгол хэл',
], ],
[ [
'code' => 'mr', 'code' => 'mr',
'native_name' => 'मराठी', 'native_name' => 'मराठी',
], ],
[ [
'code' => 'ms', 'code' => 'ms',
'native_name' => 'Bahasa Melayu, بهاس ملايو‎', 'native_name' => 'Bahasa Melayu, بهاس ملايو‎',
], ],
[ [
'code' => 'mt', 'code' => 'mt',
'native_name' => 'Malti', 'native_name' => 'Malti',
], ],
[ [
'code' => 'my', 'code' => 'my',
'native_name' => 'ဗမာစာ', 'native_name' => 'ဗမာစာ',
], ],
[ [
'code' => 'na', 'code' => 'na',
'native_name' => 'Dorerin Naoero', 'native_name' => 'Dorerin Naoero',
], ],
[ [
'code' => 'nb', 'code' => 'nb',
'native_name' => 'Norsk Bokmål', 'native_name' => 'Norsk Bokmål',
], ],
[ [
'code' => 'nd', 'code' => 'nd',
'native_name' => 'isiNdebele', 'native_name' => 'isiNdebele',
], ],
[ [
'code' => 'ne', 'code' => 'ne',
'native_name' => 'नेपाली', 'native_name' => 'नेपाली',
], ],
[ [
'code' => 'ng', 'code' => 'ng',
'native_name' => 'Owambo', 'native_name' => 'Owambo',
], ],
[ [
'code' => 'nl', 'code' => 'nl',
'native_name' => 'Nederlands, Vlaams', 'native_name' => 'Nederlands, Vlaams',
], ],
[ [
'code' => 'nn', 'code' => 'nn',
'native_name' => 'Norsk Nynorsk', 'native_name' => 'Norsk Nynorsk',
], ],
[ [
'code' => 'no', 'code' => 'no',
'native_name' => 'Norsk', 'native_name' => 'Norsk',
], ],
[ [
'code' => 'nr', 'code' => 'nr',
'native_name' => 'isiNdebele', 'native_name' => 'isiNdebele',
], ],
[ [
'code' => 'nv', 'code' => 'nv',
'native_name' => 'Diné bizaad', 'native_name' => 'Diné bizaad',
], ],
[ [
'code' => 'ny', 'code' => 'ny',
'native_name' => 'Chicheŵa, chinyanja', 'native_name' => 'Chicheŵa, chinyanja',
], ],
[ [
'code' => 'oc', 'code' => 'oc',
'native_name' => 'Occitan, lenga dòc', 'native_name' => 'Occitan, lenga dòc',
], ],
[ [
'code' => 'oj', 'code' => 'oj',
'native_name' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', 'native_name' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ',
], ],
[ [
'code' => 'om', 'code' => 'om',
'native_name' => 'Afaan Oromoo', 'native_name' => 'Afaan Oromoo',
], ],
[ [
'code' => 'or', 'code' => 'or',
'native_name' => 'ଓଡ଼ିଆ', 'native_name' => 'ଓଡ଼ିଆ',
], ],
[ [
'code' => 'os', 'code' => 'os',
'native_name' => 'ирон æвзаг', 'native_name' => 'ирон æвзаг',
], ],
[ [
'code' => 'pa', 'code' => 'pa',
'native_name' => 'ਪੰਜਾਬੀ, پنجابی‎', 'native_name' => 'ਪੰਜਾਬੀ, پنجابی‎',
], ],
[ [
'code' => 'pi', 'code' => 'pi',
'native_name' => 'पालि, पाळि', 'native_name' => 'पालि, पाळि',
], ],
[ [
'code' => 'pl', 'code' => 'pl',
'native_name' => 'język polski, polszczyzna', 'native_name' => 'język polski, polszczyzna',
], ],
[ [
'code' => 'ps', 'code' => 'ps',
'native_name' => 'پښتو', 'native_name' => 'پښتو',
], ],
[ [
'code' => 'pt', 'code' => 'pt',
'native_name' => 'Português', 'native_name' => 'Português',
], ],
[ [
'code' => 'qu', 'code' => 'qu',
'native_name' => 'Runa Simi, Kichwa', 'native_name' => 'Runa Simi, Kichwa',
], ],
[ [
'code' => 'rm', 'code' => 'rm',
'native_name' => 'Rumantsch Grischun', 'native_name' => 'Rumantsch Grischun',
], ],
[ [
'code' => 'rn', 'code' => 'rn',
'native_name' => 'Ikirundi', 'native_name' => 'Ikirundi',
], ],
[ [
'code' => 'ro', 'code' => 'ro',
'native_name' => 'Română', 'native_name' => 'Română',
], ],
[ [
'code' => 'ru', 'code' => 'ru',
'native_name' => 'Pусский', 'native_name' => 'Pусский',
], ],
[ [
'code' => 'rw', 'code' => 'rw',
'native_name' => 'Ikinyarwanda', 'native_name' => 'Ikinyarwanda',
], ],
[ [
'code' => 'sa', 'code' => 'sa',
'native_name' => 'संस्कृतम्', 'native_name' => 'संस्कृतम्',
], ],
[ [
'code' => 'sc', 'code' => 'sc',
'native_name' => 'Sardu', 'native_name' => 'Sardu',
], ],
[ [
'code' => 'sd', 'code' => 'sd',
'native_name' => 'सिन्धी, سنڌي، سندھی‎', 'native_name' => 'सिन्धी, سنڌي، سندھی‎',
], ],
[ [
'code' => 'se', 'code' => 'se',
'native_name' => 'Davvisámegiella', 'native_name' => 'Davvisámegiella',
], ],
[ [
'code' => 'sg', 'code' => 'sg',
'native_name' => 'Yângâ tî sängö', 'native_name' => 'Yângâ tî sängö',
], ],
[ [
'code' => 'si', 'code' => 'si',
'native_name' => 'සිංහල', 'native_name' => 'සිංහල',
], ],
[ [
'code' => 'sk', 'code' => 'sk',
'native_name' => 'Slovenčina, Slovenský Jazyk', 'native_name' => 'Slovenčina, Slovenský Jazyk',
], ],
[ [
'code' => 'sl', 'code' => 'sl',
'native_name' => 'Slovenski Jezik, Slovenščina', 'native_name' => 'Slovenski Jezik, Slovenščina',
], ],
[ [
'code' => 'sm', 'code' => 'sm',
'native_name' => "Gagana fa'a Samoa", 'native_name' => "Gagana fa'a Samoa",
], ],
[ [
'code' => 'sn', 'code' => 'sn',
'native_name' => 'chiShona', 'native_name' => 'chiShona',
], ],
[ [
'code' => 'so', 'code' => 'so',
'native_name' => 'Soomaaliga, af Soomaali', 'native_name' => 'Soomaaliga, af Soomaali',
], ],
[ [
'code' => 'sq', 'code' => 'sq',
'native_name' => 'Shqip', 'native_name' => 'Shqip',
], ],
[ [
'code' => 'sr', 'code' => 'sr',
'native_name' => 'српски језик', 'native_name' => 'српски језик',
], ],
[ [
'code' => 'ss', 'code' => 'ss',
'native_name' => 'SiSwati', 'native_name' => 'SiSwati',
], ],
[ [
'code' => 'st', 'code' => 'st',
'native_name' => 'Sesotho', 'native_name' => 'Sesotho',
], ],
[ [
'code' => 'su', 'code' => 'su',
'native_name' => 'Basa Sunda', 'native_name' => 'Basa Sunda',
], ],
[ [
'code' => 'sv', 'code' => 'sv',
'native_name' => 'Svenska', 'native_name' => 'Svenska',
], ],
[ [
'code' => 'sw', 'code' => 'sw',
'native_name' => 'Kiswahili', 'native_name' => 'Kiswahili',
], ],
[ [
'code' => 'ta', 'code' => 'ta',
'native_name' => 'தமிழ்', 'native_name' => 'தமிழ்',
], ],
[ [
'code' => 'te', 'code' => 'te',
'native_name' => 'తెలుగు', 'native_name' => 'తెలుగు',
], ],
[ [
'code' => 'tg', 'code' => 'tg',
'native_name' => 'тоҷикӣ, toçikī, تاجیکی‎', 'native_name' => 'тоҷикӣ, toçikī, تاجیکی‎',
], ],
[ [
'code' => 'th', 'code' => 'th',
'native_name' => 'ไทย', 'native_name' => 'ไทย',
], ],
[ [
'code' => 'ti', 'code' => 'ti',
'native_name' => 'ትግርኛ', 'native_name' => 'ትግርኛ',
], ],
[ [
'code' => 'tk', 'code' => 'tk',
'native_name' => 'Türkmen, Түркмен', 'native_name' => 'Türkmen, Түркмен',
], ],
[ [
'code' => 'tl', 'code' => 'tl',
'native_name' => 'Wikang Tagalog', 'native_name' => 'Wikang Tagalog',
], ],
[ [
'code' => 'tn', 'code' => 'tn',
'native_name' => 'Setswana', 'native_name' => 'Setswana',
], ],
[ [
'code' => 'to', 'code' => 'to',
'native_name' => 'Faka Tonga', 'native_name' => 'Faka Tonga',
], ],
[ [
'code' => 'tr', 'code' => 'tr',
'native_name' => 'Türkçe', 'native_name' => 'Türkçe',
], ],
[ [
'code' => 'ts', 'code' => 'ts',
'native_name' => 'Xitsonga', 'native_name' => 'Xitsonga',
], ],
[ [
'code' => 'tt', 'code' => 'tt',
'native_name' => 'татар теле, tatar tele', 'native_name' => 'татар теле, tatar tele',
], ],
[ [
'code' => 'tw', 'code' => 'tw',
'native_name' => 'Twi', 'native_name' => 'Twi',
], ],
[ [
'code' => 'ty', 'code' => 'ty',
'native_name' => 'Reo Tahiti', 'native_name' => 'Reo Tahiti',
], ],
[ [
'code' => 'ug', 'code' => 'ug',
'native_name' => 'ئۇيغۇرچە‎, Uyghurche', 'native_name' => 'ئۇيغۇرچە‎, Uyghurche',
], ],
[ [
'code' => 'uk', 'code' => 'uk',
'native_name' => 'Українська', 'native_name' => 'Українська',
], ],
[ [
'code' => 'ur', 'code' => 'ur',
'native_name' => 'اردو', 'native_name' => 'اردو',
], ],
[ [
'code' => 'uz', 'code' => 'uz',
'native_name' => 'Oʻzbek, Ўзбек, أۇزبېك‎', 'native_name' => 'Oʻzbek, Ўзбек, أۇزبېك‎',
], ],
[ [
'code' => 've', 'code' => 've',
'native_name' => 'Tshivenḓa', 'native_name' => 'Tshivenḓa',
], ],
[ [
'code' => 'vi', 'code' => 'vi',
'native_name' => 'Tiếng Việt', 'native_name' => 'Tiếng Việt',
], ],
[ [
'code' => 'vo', 'code' => 'vo',
'native_name' => 'Volapük', 'native_name' => 'Volapük',
], ],
[ [
'code' => 'wa', 'code' => 'wa',
'native_name' => 'Walon', 'native_name' => 'Walon',
], ],
[ [
'code' => 'wo', 'code' => 'wo',
'native_name' => 'Wollof', 'native_name' => 'Wollof',
], ],
[ [
'code' => 'xh', 'code' => 'xh',
'native_name' => 'isiXhosa', 'native_name' => 'isiXhosa',
], ],
[ [
'code' => 'yi', 'code' => 'yi',
'native_name' => 'ייִדיש', 'native_name' => 'ייִדיש',
], ],
[ [
'code' => 'yo', 'code' => 'yo',
'native_name' => 'Yorùbá', 'native_name' => 'Yorùbá',
], ],
[ [
'code' => 'za', 'code' => 'za',
'native_name' => 'Saɯ cueŋƅ, Saw cuengh', 'native_name' => 'Saɯ cueŋƅ, Saw cuengh',
], ],
[ [
'code' => 'zh', 'code' => 'zh',
'native_name' => '中文 (Zhōngwén), 汉语, 漢語', 'native_name' => '中文 (Zhōngwén), 汉语, 漢語',
], ],
[ [
'code' => 'zu', 'code' => 'zu',
'native_name' => 'isiZulu', 'native_name' => 'isiZulu',
], ],
]; ];

View File

@ -20,592 +20,583 @@ class PlatformSeeder extends Seeder
{ {
$podcastingData = [ $podcastingData = [
[ [
'slug' => 'amazon', 'slug' => 'amazon',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Amazon Music and Audible', 'label' => 'Amazon Music and Audible',
'home_url' => 'https://music.amazon.com/', 'home_url' => 'https://music.amazon.com/',
'submit_url' => 'https://podcasters.amazon.com/', 'submit_url' => 'https://podcasters.amazon.com/',
], ],
[ [
'slug' => 'antennapod', 'slug' => 'antennapod',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'AntennaPod', 'label' => 'AntennaPod',
'home_url' => 'https://antennapod.org/', 'home_url' => 'https://antennapod.org/',
'submit_url' => 'https://antennapod.org/documentation/podcasters-hosters/add-on-antennapod', 'submit_url' => 'https://antennapod.org/documentation/podcasters-hosters/add-on-antennapod',
], ],
[ [
'slug' => 'apple', 'slug' => 'apple',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Apple Podcasts', 'label' => 'Apple Podcasts',
'home_url' => 'https://www.apple.com/itunes/podcasts/', 'home_url' => 'https://www.apple.com/itunes/podcasts/',
'submit_url' => 'submit_url' => 'https://podcastsconnect.apple.com/my-podcasts/new-feed',
'https://podcastsconnect.apple.com/my-podcasts/new-feed',
], ],
[ [
'slug' => 'blubrry', 'slug' => 'blubrry',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Blubrry', 'label' => 'Blubrry',
'home_url' => 'https://www.blubrry.com/', 'home_url' => 'https://www.blubrry.com/',
'submit_url' => 'https://www.blubrry.com/addpodcast.php', 'submit_url' => 'https://www.blubrry.com/addpodcast.php',
], ],
[ [
'slug' => 'breaker', 'slug' => 'breaker',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Breaker', 'label' => 'Breaker',
'home_url' => 'https://www.breaker.audio/', 'home_url' => 'https://www.breaker.audio/',
'submit_url' => 'https://podcasters.breaker.audio/', 'submit_url' => 'https://podcasters.breaker.audio/',
], ],
[ [
'slug' => 'castbox', 'slug' => 'castbox',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Castbox', 'label' => 'Castbox',
'home_url' => 'https://castbox.fm/', 'home_url' => 'https://castbox.fm/',
'submit_url' => 'submit_url' => 'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast',
'https://helpcenter.castbox.fm/portal/kb/articles/submit-my-podcast',
], ],
[ [
'slug' => 'castopod', 'slug' => 'castopod',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Castopod', 'label' => 'Castopod',
'home_url' => 'https://castopod.org/', 'home_url' => 'https://castopod.org/',
'submit_url' => 'https://castopod.org/instances', 'submit_url' => 'https://castopod.org/instances',
], ],
[ [
'slug' => 'castro', 'slug' => 'castro',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Castro', 'label' => 'Castro',
'home_url' => 'http://castro.fm/', 'home_url' => 'http://castro.fm/',
'submit_url' => 'submit_url' => 'https://castro.fm/support/link-to-your-podcast-in-castro',
'https://castro.fm/support/link-to-your-podcast-in-castro',
], ],
[ [
'slug' => 'chartable', 'slug' => 'chartable',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Chartable', 'label' => 'Chartable',
'home_url' => 'https://chartable.com/', 'home_url' => 'https://chartable.com/',
'submit_url' => 'https://chartable.com/podcasts/submit', 'submit_url' => 'https://chartable.com/podcasts/submit',
], ],
[ [
'slug' => 'deezer', 'slug' => 'deezer',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Deezer', 'label' => 'Deezer',
'home_url' => 'https://www.deezer.com/', 'home_url' => 'https://www.deezer.com/',
'submit_url' => 'https://podcasters.deezer.com/submission', 'submit_url' => 'https://podcasters.deezer.com/submission',
], ],
[ [
'slug' => 'fyyd', 'slug' => 'fyyd',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'fyyd', 'label' => 'fyyd',
'home_url' => 'https://fyyd.de/', 'home_url' => 'https://fyyd.de/',
'submit_url' => 'https://fyyd.de/add-feed', 'submit_url' => 'https://fyyd.de/add-feed',
], ],
[ [
'slug' => 'google', 'slug' => 'google',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Google Podcasts', 'label' => 'Google Podcasts',
'home_url' => 'https://podcasts.google.com/about', 'home_url' => 'https://podcasts.google.com/about',
'submit_url' => 'submit_url' => 'https://search.google.com/search-console/about',
'https://search.google.com/search-console/about',
], ],
[ [
'slug' => 'ivoox', 'slug' => 'ivoox',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Ivoox', 'label' => 'Ivoox',
'home_url' => 'https://www.ivoox.com/', 'home_url' => 'https://www.ivoox.com/',
'submit_url' => 'http://www.ivoox.com/upload-podcast_u.html', 'submit_url' => 'http://www.ivoox.com/upload-podcast_u.html',
], ],
[ [
'slug' => 'listennotes', 'slug' => 'listennotes',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'ListenNotes', 'label' => 'ListenNotes',
'home_url' => 'https://www.listennotes.com/', 'home_url' => 'https://www.listennotes.com/',
'submit_url' => 'https://www.listennotes.com/submit/', 'submit_url' => 'https://www.listennotes.com/submit/',
], ],
[ [
'slug' => 'overcast', 'slug' => 'overcast',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Overcast', 'label' => 'Overcast',
'home_url' => 'https://overcast.fm/', 'home_url' => 'https://overcast.fm/',
'submit_url' => 'https://overcast.fm/podcasterinfo', 'submit_url' => 'https://overcast.fm/podcasterinfo',
], ],
[ [
'slug' => 'playerfm', 'slug' => 'playerfm',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Player.Fm', 'label' => 'Player.Fm',
'home_url' => 'https://player.fm/', 'home_url' => 'https://player.fm/',
'submit_url' => 'https://player.fm/importer/feed', 'submit_url' => 'https://player.fm/importer/feed',
], ],
[ [
'slug' => 'pocketcasts', 'slug' => 'pocketcasts',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Pocketcasts', 'label' => 'Pocketcasts',
'home_url' => 'https://www.pocketcasts.com/', 'home_url' => 'https://www.pocketcasts.com/',
'submit_url' => 'https://www.pocketcasts.com/submit/', 'submit_url' => 'https://www.pocketcasts.com/submit/',
], ],
[ [
'slug' => 'podbean', 'slug' => 'podbean',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podbean', 'label' => 'Podbean',
'home_url' => 'https://www.podbean.com/', 'home_url' => 'https://www.podbean.com/',
'submit_url' => 'https://www.podbean.com/site/submitPodcast', 'submit_url' => 'https://www.podbean.com/site/submitPodcast',
], ],
[ [
'slug' => 'podcastaddict', 'slug' => 'podcastaddict',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podcast Addict', 'label' => 'Podcast Addict',
'home_url' => 'https://podcastaddict.com/', 'home_url' => 'https://podcastaddict.com/',
'submit_url' => 'https://podcastaddict.com/submit', 'submit_url' => 'https://podcastaddict.com/submit',
], ],
[ [
'slug' => 'podcastindex', 'slug' => 'podcastindex',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podcast Index', 'label' => 'Podcast Index',
'home_url' => 'https://podcastindex.org/', 'home_url' => 'https://podcastindex.org/',
'submit_url' => 'https://podcastindex.org/add', 'submit_url' => 'https://podcastindex.org/add',
], ],
[ [
'slug' => 'podchaser', 'slug' => 'podchaser',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podchaser', 'label' => 'Podchaser',
'home_url' => 'https://www.podchaser.com/', 'home_url' => 'https://www.podchaser.com/',
'submit_url' => 'https://www.podchaser.com/creators/edit', 'submit_url' => 'https://www.podchaser.com/creators/edit',
], ],
[ [
'slug' => 'podcloud', 'slug' => 'podcloud',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'podCloud', 'label' => 'podCloud',
'home_url' => 'https://podcloud.fr/', 'home_url' => 'https://podcloud.fr/',
'submit_url' => 'https://podcloud.fr/studio/podcasts/new', 'submit_url' => 'https://podcloud.fr/studio/podcasts/new',
], ],
[ [
'slug' => 'podinstall', 'slug' => 'podinstall',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podinstall', 'label' => 'Podinstall',
'home_url' => 'https://www.podinstall.com/', 'home_url' => 'https://www.podinstall.com/',
'submit_url' => 'https://www.podinstall.com/claim.html', 'submit_url' => 'https://www.podinstall.com/claim.html',
], ],
[ [
'slug' => 'podlink', 'slug' => 'podlink',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'pod.link', 'label' => 'pod.link',
'home_url' => 'https://pod.link/', 'home_url' => 'https://pod.link/',
'submit_url' => 'https://pod.link', 'submit_url' => 'https://pod.link',
], ],
[ [
'slug' => 'podtail', 'slug' => 'podtail',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podtail', 'label' => 'Podtail',
'home_url' => 'https://podtail.com/', 'home_url' => 'https://podtail.com/',
'submit_url' => 'https://podtail.com/about/faq/', 'submit_url' => 'https://podtail.com/about/faq/',
], ],
[ [
'slug' => 'podfriend', 'slug' => 'podfriend',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podfriend', 'label' => 'Podfriend',
'home_url' => 'https://www.podfriend.com/', 'home_url' => 'https://www.podfriend.com/',
'submit_url' => 'https://podcastindex.org/add', 'submit_url' => 'https://podcastindex.org/add',
], ],
[ [
'slug' => 'podverse', 'slug' => 'podverse',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podverse', 'label' => 'Podverse',
'home_url' => 'https://podverse.fm/', 'home_url' => 'https://podverse.fm/',
'submit_url' => 'submit_url' => 'https://docs.google.com/forms/d/e/1FAIpQLSdewKP-YrE8zGjDPrkmoJEwCxPl_gizEkmzAlTYsiWAuAk1Ng/viewform',
'https://docs.google.com/forms/d/e/1FAIpQLSdewKP-YrE8zGjDPrkmoJEwCxPl_gizEkmzAlTYsiWAuAk1Ng/viewform',
], ],
[ [
'slug' => 'radiopublic', 'slug' => 'radiopublic',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'RadioPublic', 'label' => 'RadioPublic',
'home_url' => 'https://radiopublic.com/', 'home_url' => 'https://radiopublic.com/',
'submit_url' => 'https://podcasters.radiopublic.com/signup', 'submit_url' => 'https://podcasters.radiopublic.com/signup',
], ],
[ [
'slug' => 'spotify', 'slug' => 'spotify',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Spotify', 'label' => 'Spotify',
'home_url' => 'https://www.spotify.com/', 'home_url' => 'https://www.spotify.com/',
'submit_url' => 'https://podcasters.spotify.com/submit', 'submit_url' => 'https://podcasters.spotify.com/submit',
], ],
[ [
'slug' => 'spreaker', 'slug' => 'spreaker',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Spreaker', 'label' => 'Spreaker',
'home_url' => 'https://www.spreaker.com/', 'home_url' => 'https://www.spreaker.com/',
'submit_url' => 'https://www.spreaker.com/cms/shows/rss-import', 'submit_url' => 'https://www.spreaker.com/cms/shows/rss-import',
], ],
[ [
'slug' => 'stitcher', 'slug' => 'stitcher',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Stitcher', 'label' => 'Stitcher',
'home_url' => 'https://www.stitcher.com/', 'home_url' => 'https://www.stitcher.com/',
'submit_url' => 'https://partners.stitcher.com/join', 'submit_url' => 'https://partners.stitcher.com/join',
], ],
[ [
'slug' => 'tunein', 'slug' => 'tunein',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'TuneIn', 'label' => 'TuneIn',
'home_url' => 'https://tunein.com/', 'home_url' => 'https://tunein.com/',
'submit_url' => 'submit_url' => 'https://help.tunein.com/contact/add-podcast-S19TR3Sdf',
'https://help.tunein.com/contact/add-podcast-S19TR3Sdf',
], ],
[ [
'slug' => 'anytime', 'slug' => 'anytime',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Anytime Podcast Player', 'label' => 'Anytime Podcast Player',
'home_url' => 'https://anytimeplayer.app/', 'home_url' => 'https://anytimeplayer.app/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'breez', 'slug' => 'breez',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Breez', 'label' => 'Breez',
'home_url' => 'https://breez.technology/', 'home_url' => 'https://breez.technology/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'castamatic', 'slug' => 'castamatic',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Castamatic', 'label' => 'Castamatic',
'home_url' => 'https://castamatic.com/', 'home_url' => 'https://castamatic.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'castcoverage', 'slug' => 'castcoverage',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'CastCoverage', 'label' => 'CastCoverage',
'home_url' => 'http://castcoverage.com/', 'home_url' => 'http://castcoverage.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'curiocaster', 'slug' => 'curiocaster',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'CurioCaster', 'label' => 'CurioCaster',
'home_url' => 'https://curiocaster.com/', 'home_url' => 'https://curiocaster.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'escapepod', 'slug' => 'escapepod',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Escapepod', 'label' => 'Escapepod',
'home_url' => 'http://y20k.org/escapepod/', 'home_url' => 'http://y20k.org/escapepod/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'fountain', 'slug' => 'fountain',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Fountain', 'label' => 'Fountain',
'home_url' => 'https://www.fountain.fm/', 'home_url' => 'https://www.fountain.fm/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'gpodder', 'slug' => 'gpodder',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'gPodder', 'label' => 'gPodder',
'home_url' => 'https://gpodder.org/', 'home_url' => 'https://gpodder.org/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'hypercatcher', 'slug' => 'hypercatcher',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'HyperCatcher', 'label' => 'HyperCatcher',
'home_url' => 'https://hypercatcher.com/', 'home_url' => 'https://hypercatcher.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'ivyfm', 'slug' => 'ivyfm',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Ivy Podcast Discovery', 'label' => 'Ivy Podcast Discovery',
'home_url' => 'https://ivy.fm/', 'home_url' => 'https://ivy.fm/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'jumplink', 'slug' => 'jumplink',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'JumpLink', 'label' => 'JumpLink',
'home_url' => 'https://jump.link/', 'home_url' => 'https://jump.link/',
'submit_url' => 'https://jump.link/a/accounts/signup/', 'submit_url' => 'https://jump.link/a/accounts/signup/',
], ],
[ [
'slug' => 'kasts', 'slug' => 'kasts',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Kasts', 'label' => 'Kasts',
'home_url' => 'https://apps.kde.org/kasts/', 'home_url' => 'https://apps.kde.org/kasts/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'playapod', 'slug' => 'playapod',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Playapod', 'label' => 'Playapod',
'home_url' => 'https://playapod.com/', 'home_url' => 'https://playapod.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'plink', 'slug' => 'plink',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Plink', 'label' => 'Plink',
'home_url' => 'https://plinkhq.com/', 'home_url' => 'https://plinkhq.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'podcastchapters', 'slug' => 'podcastchapters',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podcast Chapters', 'label' => 'Podcast Chapters',
'home_url' => 'https://chaptersapp.com/', 'home_url' => 'https://chaptersapp.com/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'podcastguru', 'slug' => 'podcastguru',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Podcast Guru', 'label' => 'Podcast Guru',
'home_url' => 'https://podcastguru.io/', 'home_url' => 'https://podcastguru.io/',
'submit_url' => 'https://podcastguru.io/promote-your-podcast/', 'submit_url' => 'https://podcastguru.io/promote-your-podcast/',
], ],
[ [
'slug' => 'podlp', 'slug' => 'podlp',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'PodLP', 'label' => 'PodLP',
'home_url' => 'https://podlp.com/', 'home_url' => 'https://podlp.com/',
'submit_url' => 'https://podlp.com/submit.html', 'submit_url' => 'https://podlp.com/submit.html',
], ],
[ [
'slug' => 'podnews', 'slug' => 'podnews',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'podnews', 'label' => 'podnews',
'home_url' => 'https://podnews.net/podcast/subscribe-pages', 'home_url' => 'https://podnews.net/podcast/subscribe-pages',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'podstation', 'slug' => 'podstation',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'podStation', 'label' => 'podStation',
'home_url' => 'https://podstation.github.io/', 'home_url' => 'https://podstation.github.io/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'sphinxchat', 'slug' => 'sphinxchat',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Sphinx', 'label' => 'Sphinx',
'home_url' => 'https://sphinx.chat/', 'home_url' => 'https://sphinx.chat/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'tsacdop', 'slug' => 'tsacdop',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Tsacdop', 'label' => 'Tsacdop',
'home_url' => 'https://www.tsacdop.app/', 'home_url' => 'https://www.tsacdop.app/',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'zion', 'slug' => 'zion',
'type' => 'podcasting', 'type' => 'podcasting',
'label' => 'Zion', 'label' => 'Zion',
'home_url' => 'https://getzion.com/', 'home_url' => 'https://getzion.com/',
'submit_url' => 'https://shop.n2n2.chat/', 'submit_url' => 'https://shop.n2n2.chat/',
], ],
]; ];
$fundingData = [ $fundingData = [
[ [
'slug' => 'paypal', 'slug' => 'paypal',
'type' => 'funding', 'type' => 'funding',
'label' => 'Paypal', 'label' => 'Paypal',
'home_url' => 'https://www.paypal.com/', 'home_url' => 'https://www.paypal.com/',
'submit_url' => 'https://www.paypal.com/paypalme/my/grab', 'submit_url' => 'https://www.paypal.com/paypalme/my/grab',
], ],
[ [
'slug' => 'fosspay', 'slug' => 'fosspay',
'type' => 'funding', 'type' => 'funding',
'label' => 'fosspay', 'label' => 'fosspay',
'home_url' => 'https://git.sr.ht/~sircmpwn/fosspay', 'home_url' => 'https://git.sr.ht/~sircmpwn/fosspay',
'submit_url' => '', 'submit_url' => '',
], ],
[ [
'slug' => 'gofundme', 'slug' => 'gofundme',
'type' => 'funding', 'type' => 'funding',
'label' => 'GoFundMe', 'label' => 'GoFundMe',
'home_url' => 'https://www.gofundme.com/', 'home_url' => 'https://www.gofundme.com/',
'submit_url' => 'https://www.gofundme.com/sign-up', 'submit_url' => 'https://www.gofundme.com/sign-up',
], ],
[ [
'slug' => 'helloasso', 'slug' => 'helloasso',
'type' => 'funding', 'type' => 'funding',
'label' => 'helloasso', 'label' => 'helloasso',
'home_url' => 'https://www.helloasso.com/', 'home_url' => 'https://www.helloasso.com/',
'submit_url' => 'https://auth.helloasso.com/inscription', 'submit_url' => 'https://auth.helloasso.com/inscription',
], ],
[ [
'slug' => 'indiegogo', 'slug' => 'indiegogo',
'type' => 'funding', 'type' => 'funding',
'label' => 'Indiegogo', 'label' => 'Indiegogo',
'home_url' => 'https://www.indiegogo.com/', 'home_url' => 'https://www.indiegogo.com/',
'submit_url' => 'https://www.indiegogo.com/start-a-campaign#/', 'submit_url' => 'https://www.indiegogo.com/start-a-campaign#/',
], ],
[ [
'slug' => 'kickstarter', 'slug' => 'kickstarter',
'type' => 'funding', 'type' => 'funding',
'label' => 'Kickstarter', 'label' => 'Kickstarter',
'home_url' => 'https://www.kickstarter.com/', 'home_url' => 'https://www.kickstarter.com/',
'submit_url' => 'https://www.kickstarter.com/learn', 'submit_url' => 'https://www.kickstarter.com/learn',
], ],
[ [
'slug' => 'kisskissbankbank', 'slug' => 'kisskissbankbank',
'type' => 'funding', 'type' => 'funding',
'label' => 'KissKissBankBank', 'label' => 'KissKissBankBank',
'home_url' => 'https://www.kisskissbankbank.com/', 'home_url' => 'https://www.kisskissbankbank.com/',
'submit_url' => 'submit_url' => 'https://www.kisskissbankbank.com/en/financer-mon-projet',
'https://www.kisskissbankbank.com/en/financer-mon-projet',
], ],
[ [
'slug' => 'liberapay', 'slug' => 'liberapay',
'type' => 'funding', 'type' => 'funding',
'label' => 'Liberapay', 'label' => 'Liberapay',
'home_url' => 'https://liberapay.com/', 'home_url' => 'https://liberapay.com/',
'submit_url' => 'https://liberapay.com/sign-up', 'submit_url' => 'https://liberapay.com/sign-up',
], ],
[ [
'slug' => 'patreon', 'slug' => 'patreon',
'type' => 'funding', 'type' => 'funding',
'label' => 'Patreon', 'label' => 'Patreon',
'home_url' => 'https://www.patreon.com/', 'home_url' => 'https://www.patreon.com/',
'submit_url' => 'https://www.patreon.com/create', 'submit_url' => 'https://www.patreon.com/create',
], ],
[ [
'slug' => 'tipeee', 'slug' => 'tipeee',
'type' => 'funding', 'type' => 'funding',
'label' => 'Tipeee', 'label' => 'Tipeee',
'home_url' => 'https://tipeee.com/', 'home_url' => 'https://tipeee.com/',
'submit_url' => 'https://tipeee.com/register/', 'submit_url' => 'https://tipeee.com/register/',
], ],
[ [
'slug' => 'ulule', 'slug' => 'ulule',
'type' => 'funding', 'type' => 'funding',
'label' => 'Ulule', 'label' => 'Ulule',
'home_url' => 'https://www.ulule.com/', 'home_url' => 'https://www.ulule.com/',
'submit_url' => 'https://www.ulule.com/projects/create/#/', 'submit_url' => 'https://www.ulule.com/projects/create/#/',
], ],
]; ];
$socialData = [ $socialData = [
[ [
'slug' => 'discord', 'slug' => 'discord',
'type' => 'social', 'type' => 'social',
'label' => 'Discord', 'label' => 'Discord',
'home_url' => 'https://discord.com/', 'home_url' => 'https://discord.com/',
'submit_url' => 'https://discord.com/register', 'submit_url' => 'https://discord.com/register',
], ],
[ [
'slug' => 'facebook', 'slug' => 'facebook',
'type' => 'social', 'type' => 'social',
'label' => 'Facebook', 'label' => 'Facebook',
'home_url' => 'https://www.facebook.com/', 'home_url' => 'https://www.facebook.com/',
'submit_url' => 'submit_url' => 'https://www.facebook.com/pages/creation/?ref_type=comet_home',
'https://www.facebook.com/pages/creation/?ref_type=comet_home',
], ],
[ [
'slug' => 'funkwhale', 'slug' => 'funkwhale',
'type' => 'social', 'type' => 'social',
'label' => 'Funkwhale', 'label' => 'Funkwhale',
'home_url' => 'https://funkwhale.audio/', 'home_url' => 'https://funkwhale.audio/',
'submit_url' => 'https://network.funkwhale.audio/dashboards/', 'submit_url' => 'https://network.funkwhale.audio/dashboards/',
], ],
[ [
'slug' => 'instagram', 'slug' => 'instagram',
'type' => 'social', 'type' => 'social',
'label' => 'Instagram', 'label' => 'Instagram',
'home_url' => 'https://www.instagram.com/', 'home_url' => 'https://www.instagram.com/',
'submit_url' => 'submit_url' => 'https://www.instagram.com/accounts/emailsignup/',
'https://www.instagram.com/accounts/emailsignup/',
], ],
[ [
'slug' => 'linkedin', 'slug' => 'linkedin',
'type' => 'social', 'type' => 'social',
'label' => 'LinkedIn', 'label' => 'LinkedIn',
'home_url' => 'https://www.linkedin.com/', 'home_url' => 'https://www.linkedin.com/',
'submit_url' => 'https://www.linkedin.com/company/setup/new/', 'submit_url' => 'https://www.linkedin.com/company/setup/new/',
], ],
[ [
'slug' => 'mastodon', 'slug' => 'mastodon',
'type' => 'social', 'type' => 'social',
'label' => 'Mastodon', 'label' => 'Mastodon',
'home_url' => 'https://joinmastodon.org/', 'home_url' => 'https://joinmastodon.org/',
'submit_url' => 'https://joinmastodon.org/communities', 'submit_url' => 'https://joinmastodon.org/communities',
], ],
[ [
'slug' => 'misskey', 'slug' => 'misskey',
'type' => 'social', 'type' => 'social',
'label' => 'Misskey', 'label' => 'Misskey',
'home_url' => 'https://join.misskey.page/', 'home_url' => 'https://join.misskey.page/',
'submit_url' => 'https://join.misskey.page/en-US/instances', 'submit_url' => 'https://join.misskey.page/en-US/instances',
], ],
[ [
'slug' => 'mobilizon', 'slug' => 'mobilizon',
'type' => 'social', 'type' => 'social',
'label' => 'Mobilizon', 'label' => 'Mobilizon',
'home_url' => 'https://joinmobilizon.org/', 'home_url' => 'https://joinmobilizon.org/',
'submit_url' => 'https://instances.joinmobilizon.org/instances', 'submit_url' => 'https://instances.joinmobilizon.org/instances',
], ],
[ [
'slug' => 'peertube', 'slug' => 'peertube',
'type' => 'social', 'type' => 'social',
'label' => 'PeerTube', 'label' => 'PeerTube',
'home_url' => 'https://joinpeertube.org/', 'home_url' => 'https://joinpeertube.org/',
'submit_url' => 'https://joinpeertube.org/instances', 'submit_url' => 'https://joinpeertube.org/instances',
], ],
[ [
'slug' => 'pixelfed', 'slug' => 'pixelfed',
'type' => 'social', 'type' => 'social',
'label' => 'Pixelfed', 'label' => 'Pixelfed',
'home_url' => 'https://pixelfed.org/', 'home_url' => 'https://pixelfed.org/',
'submit_url' => 'https://beta.joinpixelfed.org/', 'submit_url' => 'https://beta.joinpixelfed.org/',
], ],
[ [
'slug' => 'pleroma', 'slug' => 'pleroma',
'type' => 'social', 'type' => 'social',
'label' => 'Pleroma', 'label' => 'Pleroma',
'home_url' => 'https://pleroma.social/', 'home_url' => 'https://pleroma.social/',
'submit_url' => 'https://pleroma.social/#featured-instances', 'submit_url' => 'https://pleroma.social/#featured-instances',
], ],
[ [
'slug' => 'plume', 'slug' => 'plume',
'type' => 'social', 'type' => 'social',
'label' => 'Plume', 'label' => 'Plume',
'home_url' => 'https://joinplu.me/', 'home_url' => 'https://joinplu.me/',
'submit_url' => 'https://joinplu.me/#instances', 'submit_url' => 'https://joinplu.me/#instances',
], ],
[ [
'slug' => 'slack', 'slug' => 'slack',
'type' => 'social', 'type' => 'social',
'label' => 'Slack', 'label' => 'Slack',
'home_url' => 'https://slack.com/', 'home_url' => 'https://slack.com/',
'submit_url' => 'https://slack.com/get-started#/create', 'submit_url' => 'https://slack.com/get-started#/create',
], ],
[ [
'slug' => 'twitch', 'slug' => 'twitch',
'type' => 'social', 'type' => 'social',
'label' => 'Twitch', 'label' => 'Twitch',
'home_url' => 'https://www.twitch.tv/', 'home_url' => 'https://www.twitch.tv/',
'submit_url' => 'https://www.twitch.tv/signup', 'submit_url' => 'https://www.twitch.tv/signup',
], ],
[ [
'slug' => 'twitter', 'slug' => 'twitter',
'type' => 'social', 'type' => 'social',
'label' => 'Twitter', 'label' => 'Twitter',
'home_url' => 'https://twitter.com/', 'home_url' => 'https://twitter.com/',
'submit_url' => 'https://twitter.com/i/flow/signup', 'submit_url' => 'https://twitter.com/i/flow/signup',
], ],
[ [
'slug' => 'writefreely', 'slug' => 'writefreely',
'type' => 'social', 'type' => 'social',
'label' => 'WriteFreely', 'label' => 'WriteFreely',
'home_url' => 'https://writefreely.org/', 'home_url' => 'https://writefreely.org/',
'submit_url' => 'https://writefreely.org/instances', 'submit_url' => 'https://writefreely.org/instances',
], ],
[ [
'slug' => 'youtube', 'slug' => 'youtube',
'type' => 'social', 'type' => 'social',
'label' => 'Youtube', 'label' => 'Youtube',
'home_url' => 'https://www.youtube.com/', 'home_url' => 'https://www.youtube.com/',
'submit_url' => 'https://creatoracademy.youtube.com/page/home', 'submit_url' => 'https://creatoracademy.youtube.com/page/home',
], ],
]; ];

View File

@ -25,17 +25,17 @@ class TestSeeder extends Seeder
*/ */
$this->db->table('users') $this->db->table('users')
->insert([ ->insert([
'id' => 1, 'id' => 1,
'username' => 'admin', 'username' => 'admin',
'is_owner' => 1, 'is_owner' => 1,
]); ]);
$this->db->table('auth_identities') $this->db->table('auth_identities')
->insert([ ->insert([
'id' => 1, 'id' => 1,
'user_id' => 1, 'user_id' => 1,
'type' => 'email_password', 'type' => 'email_password',
'secret' => 'admin@example.com', 'secret' => 'admin@example.com',
'secret2' => '$2y$10$TXJEHX/djW8jtzgpDVf7dOOCGo5rv1uqtAYWdwwwkttQcDkAeB2.6', 'secret2' => '$2y$10$TXJEHX/djW8jtzgpDVf7dOOCGo5rv1uqtAYWdwwwkttQcDkAeB2.6',
]); ]);
@ -43,7 +43,7 @@ class TestSeeder extends Seeder
->table('auth_groups_users') ->table('auth_groups_users')
->insert([ ->insert([
'user_id' => 1, 'user_id' => 1,
'group' => setting('AuthGroups.mostPowerfulGroup'), 'group' => setting('AuthGroups.mostPowerfulGroup'),
]); ]);
} }
} }

View File

@ -29,10 +29,10 @@ class Category extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'parent_id' => '?integer', 'parent_id' => '?integer',
'code' => 'string', 'code' => 'string',
'apple_category' => 'string', 'apple_category' => 'string',
'google_category' => 'string', 'google_category' => 'string',
]; ];

View File

@ -65,17 +65,17 @@ class BaseClip extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'podcast_id' => 'integer', 'podcast_id' => 'integer',
'episode_id' => 'integer', 'episode_id' => 'integer',
'title' => 'string', 'title' => 'string',
'start_time' => 'double', 'start_time' => 'double',
'duration' => 'double', 'duration' => 'double',
'type' => 'string', 'type' => 'string',
'media_id' => '?integer', 'media_id' => '?integer',
'metadata' => '?json-array', 'metadata' => '?json-array',
'status' => 'string', 'status' => 'string',
'logs' => 'string', 'logs' => 'string',
'created_by' => 'integer', 'created_by' => 'integer',
'updated_by' => 'integer', 'updated_by' => 'integer',
]; ];
@ -132,11 +132,11 @@ class BaseClip extends Entity
(new MediaModel('audio'))->updateMedia($this->getMedia()); (new MediaModel('audio'))->updateMedia($this->getMedia());
} else { } else {
$media = new Audio([ $media = new Audio([
'file_key' => $fileKey, 'file_key' => $fileKey,
'language_code' => $this->getPodcast() 'language_code' => $this->getPodcast()
->language_code, ->language_code,
'uploaded_by' => $this->attributes['created_by'], 'uploaded_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'], 'updated_by' => $this->attributes['created_by'],
]); ]);
$media->setFile($file); $media->setFile($file);

View File

@ -71,11 +71,11 @@ class VideoClip extends BaseClip
} }
$video = new Video([ $video = new Video([
'file_key' => $fileKey, 'file_key' => $fileKey,
'language_code' => $this->getPodcast() 'language_code' => $this->getPodcast()
->language_code, ->language_code,
'uploaded_by' => $this->attributes['created_by'], 'uploaded_by' => $this->attributes['created_by'],
'updated_by' => $this->attributes['created_by'], 'updated_by' => $this->attributes['created_by'],
]); ]);
$video->setFile($file); $video->setFile($file);

View File

@ -45,12 +45,12 @@ class Credit extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'podcast_id' => 'integer', 'podcast_id' => 'integer',
'episode_id' => '?integer', 'episode_id' => '?integer',
'person_id' => 'integer', 'person_id' => 'integer',
'full_name' => 'string', 'full_name' => 'string',
'person_group' => 'string', 'person_group' => 'string',
'person_role' => 'string', 'person_role' => 'string',
]; ];
public function getPerson(): ?Person public function getPerson(): ?Person

View File

@ -147,34 +147,34 @@ class Episode extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'podcast_id' => 'integer', 'podcast_id' => 'integer',
'guid' => 'string', 'guid' => 'string',
'slug' => 'string', 'slug' => 'string',
'title' => 'string', 'title' => 'string',
'audio_id' => 'integer', 'audio_id' => 'integer',
'description_markdown' => 'string', 'description_markdown' => 'string',
'description_html' => 'string', 'description_html' => 'string',
'cover_id' => '?integer', 'cover_id' => '?integer',
'transcript_id' => '?integer', 'transcript_id' => '?integer',
'transcript_remote_url' => '?string', 'transcript_remote_url' => '?string',
'chapters_id' => '?integer', 'chapters_id' => '?integer',
'chapters_remote_url' => '?string', 'chapters_remote_url' => '?string',
'parental_advisory' => '?string', 'parental_advisory' => '?string',
'number' => '?integer', 'number' => '?integer',
'season_number' => '?integer', 'season_number' => '?integer',
'type' => 'string', 'type' => 'string',
'is_blocked' => 'boolean', 'is_blocked' => 'boolean',
'location_name' => '?string', 'location_name' => '?string',
'location_geo' => '?string', 'location_geo' => '?string',
'location_osm' => '?string', 'location_osm' => '?string',
'custom_rss' => '?json-array', 'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean', 'is_published_on_hubs' => 'boolean',
'posts_count' => 'integer', 'posts_count' => 'integer',
'comments_count' => 'integer', 'comments_count' => 'integer',
'is_premium' => 'boolean', 'is_premium' => 'boolean',
'created_by' => 'integer', 'created_by' => 'integer',
'updated_by' => 'integer', 'updated_by' => 'integer',
]; ];
public function setCover(UploadedFile | File $file = null): self public function setCover(UploadedFile | File $file = null): self
@ -192,10 +192,10 @@ class Episode extends Entity
} else { } else {
$cover = new Image([ $cover = new Image([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '.' . $file->getExtension(), 'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '.' . $file->getExtension(),
'sizes' => config('Images') 'sizes' => config('Images')
->podcastCoverSizes, ->podcastCoverSizes,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$cover->setFile($file); $cover->setFile($file);
@ -244,7 +244,7 @@ class Episode extends Entity
'language_code' => $this->getPodcast() 'language_code' => $this->getPodcast()
->language_code, ->language_code,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$audio->setFile($file); $audio->setFile($file);
@ -277,11 +277,11 @@ class Episode extends Entity
(new MediaModel('transcript'))->updateMedia($this->getTranscript()); (new MediaModel('transcript'))->updateMedia($this->getTranscript());
} else { } else {
$transcript = new Transcript([ $transcript = new Transcript([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-transcript.' . $file->getExtension(), 'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-transcript.' . $file->getExtension(),
'language_code' => $this->getPodcast() 'language_code' => $this->getPodcast()
->language_code, ->language_code,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$transcript->setFile($file); $transcript->setFile($file);
@ -314,11 +314,11 @@ class Episode extends Entity
(new MediaModel('chapters'))->updateMedia($this->getChapters()); (new MediaModel('chapters'))->updateMedia($this->getChapters());
} else { } else {
$chapters = new Chapters([ $chapters = new Chapters([
'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-chapters' . '.' . $file->getExtension(), 'file_key' => 'podcasts/' . $this->getPodcast()->handle . '/' . $this->attributes['slug'] . '-chapters' . '.' . $file->getExtension(),
'language_code' => $this->getPodcast() 'language_code' => $this->getPodcast()
->language_code, ->language_code,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$chapters->setFile($file); $chapters->setFile($file);
@ -471,7 +471,7 @@ class Episode extends Entity
public function setDescriptionMarkdown(string $descriptionMarkdown): static public function setDescriptionMarkdown(string $descriptionMarkdown): static
{ {
$config = [ $config = [
'html_input' => 'escape', 'html_input' => 'escape',
'allow_unsafe_links' => false, 'allow_unsafe_links' => false,
]; ];

View File

@ -59,17 +59,17 @@ class EpisodeComment extends UuidEntity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'string', 'id' => 'string',
'uri' => 'string', 'uri' => 'string',
'episode_id' => 'integer', 'episode_id' => 'integer',
'actor_id' => 'integer', 'actor_id' => 'integer',
'in_reply_to_id' => '?string', 'in_reply_to_id' => '?string',
'message' => 'string', 'message' => 'string',
'message_html' => 'string', 'message_html' => 'string',
'likes_count' => 'integer', 'likes_count' => 'integer',
'replies_count' => 'integer', 'replies_count' => 'integer',
'created_by' => 'integer', 'created_by' => 'integer',
'is_from_post' => 'boolean', 'is_from_post' => 'boolean',
]; ];
public function getEpisode(): ?Episode public function getEpisode(): ?Episode

View File

@ -22,7 +22,7 @@ class Language extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'code' => 'string', 'code' => 'string',
'native_name' => 'string', 'native_name' => 'string',
]; ];
} }

View File

@ -27,7 +27,7 @@ class Like extends UuidEntity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'actor_id' => 'integer', 'actor_id' => 'integer',
'comment_id' => 'string', 'comment_id' => 'string',
]; ];
} }

View File

@ -47,10 +47,10 @@ class Location extends Entity
} }
parent::__construct([ parent::__construct([
'name' => $name, 'name' => $name,
'geo' => $geo, 'geo' => $geo,
'osm' => $osm, 'osm' => $osm,
'latitude' => $latitude, 'latitude' => $latitude,
'longitude' => $longitude, 'longitude' => $longitude,
]); ]);
} }
@ -93,7 +93,7 @@ class Location extends Entity
[ [
'headers' => [ 'headers' => [
'User-Agent' => 'Castopod/' . CP_VERSION, 'User-Agent' => 'Castopod/' . CP_VERSION,
'Accept' => 'application/json', 'Accept' => 'application/json',
], ],
], ],
); );

View File

@ -40,11 +40,11 @@ class Page extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'title' => 'string', 'title' => 'string',
'slug' => 'string', 'slug' => 'string',
'content_markdown' => 'string', 'content_markdown' => 'string',
'content_html' => 'string', 'content_html' => 'string',
]; ];
public function getLink(): string public function getLink(): string

View File

@ -42,15 +42,15 @@ class Person extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'full_name' => 'string', 'full_name' => 'string',
'unique_name' => 'string', 'unique_name' => 'string',
'information_url' => '?string', 'information_url' => '?string',
'avatar_id' => '?int', 'avatar_id' => '?int',
'podcast_id' => '?integer', 'podcast_id' => '?integer',
'episode_id' => '?integer', 'episode_id' => '?integer',
'created_by' => 'integer', 'created_by' => 'integer',
'updated_by' => 'integer', 'updated_by' => 'integer',
]; ];
/** /**
@ -71,10 +71,10 @@ class Person extends Entity
} else { } else {
$avatar = new Image([ $avatar = new Image([
'file_key' => 'persons/' . $this->attributes['unique_name'] . '.' . $file->getExtension(), 'file_key' => 'persons/' . $this->attributes['unique_name'] . '.' . $file->getExtension(),
'sizes' => config('Images') 'sizes' => config('Images')
->personAvatarSizes, ->personAvatarSizes,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$avatar->setFile($file); $avatar->setFile($file);

View File

@ -29,14 +29,14 @@ class Platform extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'slug' => 'string', 'slug' => 'string',
'type' => 'string', 'type' => 'string',
'label' => 'string', 'label' => 'string',
'home_url' => 'string', 'home_url' => 'string',
'submit_url' => '?string', 'submit_url' => '?string',
'link_url' => '?string', 'link_url' => '?string',
'account_id' => '?string', 'account_id' => '?string',
'is_visible' => '?boolean', 'is_visible' => '?boolean',
'is_on_embed' => '?boolean', 'is_on_embed' => '?boolean',
]; ];
} }

View File

@ -172,42 +172,42 @@ class Podcast extends Entity
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'integer', 'id' => 'integer',
'guid' => 'string', 'guid' => 'string',
'actor_id' => 'integer', 'actor_id' => 'integer',
'handle' => 'string', 'handle' => 'string',
'title' => 'string', 'title' => 'string',
'description_markdown' => 'string', 'description_markdown' => 'string',
'description_html' => 'string', 'description_html' => 'string',
'cover_id' => 'int', 'cover_id' => 'int',
'banner_id' => '?int', 'banner_id' => '?int',
'language_code' => 'string', 'language_code' => 'string',
'category_id' => 'integer', 'category_id' => 'integer',
'parental_advisory' => '?string', 'parental_advisory' => '?string',
'publisher' => '?string', 'publisher' => '?string',
'owner_name' => 'string', 'owner_name' => 'string',
'owner_email' => 'string', 'owner_email' => 'string',
'type' => 'string', 'type' => 'string',
'copyright' => '?string', 'copyright' => '?string',
'episode_description_footer_markdown' => '?string', 'episode_description_footer_markdown' => '?string',
'episode_description_footer_html' => '?string', 'episode_description_footer_html' => '?string',
'is_blocked' => 'boolean', 'is_blocked' => 'boolean',
'is_completed' => 'boolean', 'is_completed' => 'boolean',
'is_locked' => 'boolean', 'is_locked' => 'boolean',
'is_premium_by_default' => 'boolean', 'is_premium_by_default' => 'boolean',
'imported_feed_url' => '?string', 'imported_feed_url' => '?string',
'new_feed_url' => '?string', 'new_feed_url' => '?string',
'location_name' => '?string', 'location_name' => '?string',
'location_geo' => '?string', 'location_geo' => '?string',
'location_osm' => '?string', 'location_osm' => '?string',
'payment_pointer' => '?string', 'payment_pointer' => '?string',
'custom_rss' => '?json-array', 'custom_rss' => '?json-array',
'is_published_on_hubs' => 'boolean', 'is_published_on_hubs' => 'boolean',
'partner_id' => '?string', 'partner_id' => '?string',
'partner_link_url' => '?string', 'partner_link_url' => '?string',
'partner_image_url' => '?string', 'partner_image_url' => '?string',
'created_by' => 'integer', 'created_by' => 'integer',
'updated_by' => 'integer', 'updated_by' => 'integer',
]; ];
public function getAtHandle(): string public function getAtHandle(): string
@ -244,10 +244,10 @@ class Podcast extends Entity
} else { } else {
$cover = new Image([ $cover = new Image([
'file_key' => 'podcasts/' . $this->attributes['handle'] . '/cover.' . $file->getExtension(), 'file_key' => 'podcasts/' . $this->attributes['handle'] . '/cover.' . $file->getExtension(),
'sizes' => config('Images') 'sizes' => config('Images')
->podcastCoverSizes, ->podcastCoverSizes,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$cover->setFile($file); $cover->setFile($file);
@ -281,10 +281,10 @@ class Podcast extends Entity
} else { } else {
$banner = new Image([ $banner = new Image([
'file_key' => 'podcasts/' . $this->attributes['handle'] . '/banner.' . $file->getExtension(), 'file_key' => 'podcasts/' . $this->attributes['handle'] . '/banner.' . $file->getExtension(),
'sizes' => config('Images') 'sizes' => config('Images')
->podcastBannerSizes, ->podcastBannerSizes,
'uploaded_by' => user_id(), 'uploaded_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
$banner->setFile($file); $banner->setFile($file);
@ -420,7 +420,7 @@ class Podcast extends Entity
public function setDescriptionMarkdown(string $descriptionMarkdown): static public function setDescriptionMarkdown(string $descriptionMarkdown): static
{ {
$config = [ $config = [
'html_input' => 'escape', 'html_input' => 'escape',
'allow_unsafe_links' => false, 'allow_unsafe_links' => false,
]; ];
@ -452,7 +452,7 @@ class Podcast extends Entity
} }
$config = [ $config = [
'html_input' => 'escape', 'html_input' => 'escape',
'allow_unsafe_links' => false, 'allow_unsafe_links' => false,
]; ];

View File

@ -26,18 +26,18 @@ class Post extends FediversePost
* @var array<string, string> * @var array<string, string>
*/ */
protected $casts = [ protected $casts = [
'id' => 'string', 'id' => 'string',
'uri' => 'string', 'uri' => 'string',
'actor_id' => 'integer', 'actor_id' => 'integer',
'in_reply_to_id' => '?string', 'in_reply_to_id' => '?string',
'reblog_of_id' => '?string', 'reblog_of_id' => '?string',
'episode_id' => '?integer', 'episode_id' => '?integer',
'message' => 'string', 'message' => 'string',
'message_html' => 'string', 'message_html' => 'string',
'favourites_count' => 'integer', 'favourites_count' => 'integer',
'reblogs_count' => 'integer', 'reblogs_count' => 'integer',
'replies_count' => 'integer', 'replies_count' => 'integer',
'created_by' => 'integer', 'created_by' => 'integer',
]; ];
/** /**

View File

@ -57,14 +57,13 @@ if (! function_exists('data_table')) {
$template = [ $template = [
'table_open' => '<table class="w-full whitespace-nowrap">', 'table_open' => '<table class="w-full whitespace-nowrap">',
'thead_open' => 'thead_open' => '<thead class="text-xs font-semibold text-left uppercase text-skin-muted">',
'<thead class="text-xs font-semibold text-left uppercase text-skin-muted">',
'heading_cell_start' => '<th class="px-4 py-2">', 'heading_cell_start' => '<th class="px-4 py-2">',
'cell_start' => '<td class="px-4 py-2">', 'cell_start' => '<td class="px-4 py-2">',
'cell_alt_start' => '<td class="px-4 py-2">', 'cell_alt_start' => '<td class="px-4 py-2">',
'row_start' => '<tr class="border-t border-subtle hover:bg-base">', 'row_start' => '<tr class="border-t border-subtle hover:bg-base">',
'row_alt_start' => '<tr class="border-t border-subtle hover:bg-base">', 'row_alt_start' => '<tr class="border-t border-subtle hover:bg-base">',
]; ];
@ -91,8 +90,8 @@ if (! function_exists('data_table')) {
$table->addRow([ $table->addRow([
[ [
'colspan' => count($tableHeaders), 'colspan' => count($tableHeaders),
'class' => 'px-4 py-2 italic font-semibold text-center', 'class' => 'px-4 py-2 italic font-semibold text-center',
'data' => lang('Common.no_data'), 'data' => lang('Common.no_data'),
], ],
]); ]);
} }
@ -114,18 +113,18 @@ if (! function_exists('publication_pill')) {
function publication_pill(?Time $publicationDate, string $publicationStatus, string $customClass = ''): string function publication_pill(?Time $publicationDate, string $publicationStatus, string $customClass = ''): string
{ {
$class = match ($publicationStatus) { $class = match ($publicationStatus) {
'published' => 'text-pine-500 border-pine-500 bg-pine-50', 'published' => 'text-pine-500 border-pine-500 bg-pine-50',
'scheduled' => 'text-red-600 border-red-600 bg-red-50', 'scheduled' => 'text-red-600 border-red-600 bg-red-50',
'with_podcast' => 'text-blue-600 border-blue-600 bg-blue-50', 'with_podcast' => 'text-blue-600 border-blue-600 bg-blue-50',
'not_published' => 'text-gray-600 border-gray-600 bg-gray-50', 'not_published' => 'text-gray-600 border-gray-600 bg-gray-50',
default => 'text-gray-600 border-gray-600 bg-gray-50', default => 'text-gray-600 border-gray-600 bg-gray-50',
}; };
$title = match ($publicationStatus) { $title = match ($publicationStatus) {
'published', 'scheduled' => (string) $publicationDate, 'published', 'scheduled' => (string) $publicationDate,
'with_podcast' => lang('Episode.with_podcast_hint'), 'with_podcast' => lang('Episode.with_podcast_hint'),
'not_published' => '', 'not_published' => '',
default => '', default => '',
}; };
$label = lang('Episode.publication_status.' . $publicationStatus); $label = lang('Episode.publication_status.' . $publicationStatus);
@ -300,11 +299,10 @@ if (! function_exists('location_link')) {
$location->url, $location->url,
icon('map-pin', 'mr-2 flex-shrink-0') . '<span class="truncate">' . esc($location->name) . '</span>', icon('map-pin', 'mr-2 flex-shrink-0') . '<span class="truncate">' . esc($location->name) . '</span>',
[ [
'class' => 'class' => 'w-full overflow-hidden inline-flex items-baseline hover:underline focus:ring-accent' .
'w-full overflow-hidden inline-flex items-baseline hover:underline focus:ring-accent' .
($class === '' ? '' : " {$class}"), ($class === '' ? '' : " {$class}"),
'target' => '_blank', 'target' => '_blank',
'rel' => 'noreferrer noopener', 'rel' => 'noreferrer noopener',
], ],
); );
} }
@ -460,15 +458,15 @@ if (! function_exists('downloads_abbr')) {
$option = match (true) { $option = match (true) {
$downloads < 1_000_000 => [ $downloads < 1_000_000 => [
'divider' => 1_000, 'divider' => 1_000,
'suffix' => 'K', 'suffix' => 'K',
], ],
$downloads < 1_000_000_000 => [ $downloads < 1_000_000_000 => [
'divider' => 1_000_000, 'divider' => 1_000_000,
'suffix' => 'M', 'suffix' => 'M',
], ],
default => [ default => [
'divider' => 1_000_000_000, 'divider' => 1_000_000_000,
'suffix' => 'B', 'suffix' => 'B',
], ],
}; };
$formatter = new NumberFormatter(service('request')->getLocale(), NumberFormatter::DECIMAL); $formatter = new NumberFormatter(service('request')->getLocale(), NumberFormatter::DECIMAL);

View File

@ -43,19 +43,19 @@ if (! function_exists('write_audio_file_tags')) {
// populate data array // populate data array
$TagData = [ $TagData = [
'title' => [esc($episode->title)], 'title' => [esc($episode->title)],
'artist' => [ 'artist' => [
$episode->podcast->publisher === null $episode->podcast->publisher === null
? esc($episode->podcast->owner_name) ? esc($episode->podcast->owner_name)
: $episode->podcast->publisher, : $episode->podcast->publisher,
], ],
'album' => [esc($episode->podcast->title)], 'album' => [esc($episode->podcast->title)],
'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''], 'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''],
'genre' => ['Podcast'], 'genre' => ['Podcast'],
'comment' => [$episode->description], 'comment' => [$episode->description],
'track_number' => [(string) $episode->number], 'track_number' => [(string) $episode->number],
'copyright_message' => [$episode->podcast->copyright], 'copyright_message' => [$episode->podcast->copyright],
'publisher' => [ 'publisher' => [
$episode->podcast->publisher === null $episode->podcast->publisher === null
? esc($episode->podcast->owner_name) ? esc($episode->podcast->owner_name)
: $episode->podcast->publisher, : $episode->podcast->publisher,
@ -73,9 +73,9 @@ if (! function_exists('write_audio_file_tags')) {
$TagData['attached_picture'][] = [ $TagData['attached_picture'][] = [
// picturetypeid == Cover. More: module.tag.id3v2.php // picturetypeid == Cover. More: module.tag.id3v2.php
'picturetypeid' => 2, 'picturetypeid' => 2,
'data' => $APICdata, 'data' => $APICdata,
'description' => 'cover', 'description' => 'cover',
'mime' => $episode->cover->file_mimetype, 'mime' => $episode->cover->file_mimetype,
]; ];
$tagwriter->tag_data = $TagData; $tagwriter->tag_data = $TagData;

View File

@ -37,9 +37,9 @@ if (! function_exists('render_page_links')) {
// if set in .env, add legal notice link at the end of page links // if set in .env, add legal notice link at the end of page links
if (config('App')->legalNoticeURL !== null) { if (config('App')->legalNoticeURL !== null) {
$links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [ $links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [
'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent', 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent',
'target' => '_blank', 'target' => '_blank',
'rel' => 'noopener noreferrer', 'rel' => 'noopener noreferrer',
]); ]);
} }

View File

@ -32,20 +32,20 @@ if (! function_exists('get_podcast_metatags')) {
$schema = new Schema( $schema = new Schema(
new Thing('PodcastSeries', [ new Thing('PodcastSeries', [
'name' => $podcast->title, 'name' => $podcast->title,
'headline' => $podcast->title, 'headline' => $podcast->title,
'url' => current_url(), 'url' => current_url(),
'sameAs' => $podcast->link, 'sameAs' => $podcast->link,
'identifier' => $podcast->guid, 'identifier' => $podcast->guid,
'image' => $podcast->cover->feed_url, 'image' => $podcast->cover->feed_url,
'description' => $podcast->description, 'description' => $podcast->description,
'webFeed' => $podcast->feed_url, 'webFeed' => $podcast->feed_url,
'accessMode' => 'auditory', 'accessMode' => 'auditory',
'author' => $podcast->owner_name, 'author' => $podcast->owner_name,
'creator' => $podcast->owner_name, 'creator' => $podcast->owner_name,
'publisher' => $podcast->publisher, 'publisher' => $podcast->publisher,
'inLanguage' => $podcast->language_code, 'inLanguage' => $podcast->language_code,
'genre' => $category, 'genre' => $category,
]) ])
); );
@ -61,7 +61,7 @@ if (! function_exists('get_podcast_metatags')) {
->og('locale', $podcast->language_code) ->og('locale', $podcast->language_code)
->og('site_name', esc(service('settings')->get('App.siteName'))) ->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [ ->push('link', [
'rel' => 'alternate', 'rel' => 'alternate',
'type' => 'application/activity+json', 'type' => 'application/activity+json',
'href' => url_to('podcast-activity', esc($podcast->handle)), 'href' => url_to('podcast-activity', esc($podcast->handle)),
]); ]);
@ -81,19 +81,19 @@ if (! function_exists('get_episode_metatags')) {
{ {
$schema = new Schema( $schema = new Schema(
new Thing('PodcastEpisode', [ new Thing('PodcastEpisode', [
'url' => url_to('episode', esc($episode->podcast->handle), $episode->slug), 'url' => url_to('episode', esc($episode->podcast->handle), $episode->slug),
'name' => $episode->title, 'name' => $episode->title,
'image' => $episode->cover->feed_url, 'image' => $episode->cover->feed_url,
'description' => $episode->description, 'description' => $episode->description,
'datePublished' => $episode->published_at->format(DATE_ISO8601), 'datePublished' => $episode->published_at->format(DATE_ISO8601),
'timeRequired' => iso8601_duration($episode->audio->duration), 'timeRequired' => iso8601_duration($episode->audio->duration),
'duration' => iso8601_duration($episode->audio->duration), 'duration' => iso8601_duration($episode->audio->duration),
'associatedMedia' => new Thing('MediaObject', [ 'associatedMedia' => new Thing('MediaObject', [
'contentUrl' => $episode->audio_url, 'contentUrl' => $episode->audio_url,
]), ]),
'partOfSeries' => new Thing('PodcastSeries', [ 'partOfSeries' => new Thing('PodcastSeries', [
'name' => $episode->podcast->title, 'name' => $episode->podcast->title,
'url' => $episode->podcast->link, 'url' => $episode->podcast->link,
]), ]),
]) ])
); );
@ -119,7 +119,7 @@ if (! function_exists('get_episode_metatags')) {
->twitter('player:width', (string) config('Embed')->width) ->twitter('player:width', (string) config('Embed')->width)
->twitter('player:height', (string) config('Embed')->height) ->twitter('player:height', (string) config('Embed')->height)
->push('link', [ ->push('link', [
'rel' => 'alternate', 'rel' => 'alternate',
'type' => 'application/activity+json', 'type' => 'application/activity+json',
'href' => url_to('episode', $episode->podcast->handle, $episode->slug), 'href' => url_to('episode', $episode->podcast->handle, $episode->slug),
]); ]);
@ -142,11 +142,11 @@ if (! function_exists('get_post_metatags')) {
function get_post_metatags(Post $post): string function get_post_metatags(Post $post): string
{ {
$socialMediaPosting = new Thing('SocialMediaPosting', [ $socialMediaPosting = new Thing('SocialMediaPosting', [
'@id' => url_to('post', esc($post->actor->username), $post->id), '@id' => url_to('post', esc($post->actor->username), $post->id),
'datePublished' => $post->published_at->format(DATE_ISO8601), 'datePublished' => $post->published_at->format(DATE_ISO8601),
'author' => new Thing('Person', [ 'author' => new Thing('Person', [
'name' => $post->actor->display_name, 'name' => $post->actor->display_name,
'url' => $post->actor->uri, 'url' => $post->actor->uri,
]), ]),
'text' => $post->message, 'text' => $post->message,
]); ]);
@ -154,16 +154,16 @@ if (! function_exists('get_post_metatags')) {
if ($post->episode_id !== null) { if ($post->episode_id !== null) {
$socialMediaPosting->__set('sharedContent', new Thing('Audio', [ $socialMediaPosting->__set('sharedContent', new Thing('Audio', [
'headline' => $post->episode->title, 'headline' => $post->episode->title,
'url' => $post->episode->link, 'url' => $post->episode->link,
'author' => new Thing('Person', [ 'author' => new Thing('Person', [
'name' => $post->episode->podcast->owner_name, 'name' => $post->episode->podcast->owner_name,
]), ]),
])); ]));
} elseif ($post->preview_card instanceof PreviewCard) { } elseif ($post->preview_card instanceof PreviewCard) {
$socialMediaPosting->__set('sharedContent', new Thing('WebPage', [ $socialMediaPosting->__set('sharedContent', new Thing('WebPage', [
'headline' => $post->preview_card->title, 'headline' => $post->preview_card->title,
'url' => $post->preview_card->url, 'url' => $post->preview_card->url,
'author' => new Thing('Person', [ 'author' => new Thing('Person', [
'name' => $post->preview_card->author_name, 'name' => $post->preview_card->author_name,
]), ]),
])); ]));
@ -181,7 +181,7 @@ if (! function_exists('get_post_metatags')) {
->canonical((string) current_url()) ->canonical((string) current_url())
->og('site_name', esc(service('settings')->get('App.siteName'))) ->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [ ->push('link', [
'rel' => 'alternate', 'rel' => 'alternate',
'type' => 'application/activity+json', 'type' => 'application/activity+json',
'href' => url_to('post', esc($post->actor->username), $post->id), 'href' => url_to('post', esc($post->actor->username), $post->id),
]); ]);
@ -201,11 +201,11 @@ if (! function_exists('get_episode_comment_metatags')) {
$episodeComment->id $episodeComment->id
), ),
'datePublished' => $episodeComment->created_at->format(DATE_ISO8601), 'datePublished' => $episodeComment->created_at->format(DATE_ISO8601),
'author' => new Thing('Person', [ 'author' => new Thing('Person', [
'name' => $episodeComment->actor->display_name, 'name' => $episodeComment->actor->display_name,
'url' => $episodeComment->actor->uri, 'url' => $episodeComment->actor->uri,
]), ]),
'text' => $episodeComment->message, 'text' => $episodeComment->message,
'upvoteCount' => $episodeComment->likes_count, 'upvoteCount' => $episodeComment->likes_count,
])); ]));
@ -213,14 +213,14 @@ if (! function_exists('get_episode_comment_metatags')) {
$metatags $metatags
->title(lang('Comment.title', [ ->title(lang('Comment.title', [
'actorDisplayName' => $episodeComment->actor->display_name, 'actorDisplayName' => $episodeComment->actor->display_name,
'episodeTitle' => $episodeComment->episode->title, 'episodeTitle' => $episodeComment->episode->title,
])) ]))
->description($episodeComment->message) ->description($episodeComment->message)
->image($episodeComment->actor->avatar_image_url) ->image($episodeComment->actor->avatar_image_url)
->canonical((string) current_url()) ->canonical((string) current_url())
->og('site_name', esc(service('settings')->get('App.siteName'))) ->og('site_name', esc(service('settings')->get('App.siteName')))
->push('link', [ ->push('link', [
'rel' => 'alternate', 'rel' => 'alternate',
'type' => 'application/activity+json', 'type' => 'application/activity+json',
'href' => url_to( 'href' => url_to(
'episode-comment', 'episode-comment',

View File

@ -74,7 +74,7 @@ if (! function_exists('extract_params_from_episode_uri')) {
return [ return [
'podcastHandle' => $matches['podcastHandle'], 'podcastHandle' => $matches['podcastHandle'],
'episodeSlug' => $matches['episodeSlug'], 'episodeSlug' => $matches['episodeSlug'],
]; ];
} }
} }

View File

@ -21,205 +21,205 @@ class MediaClipper extends BaseConfig
*/ */
public array $formats = [ public array $formats = [
'landscape' => [ 'landscape' => [
'width' => 1920, 'width' => 1920,
'height' => 1080, 'height' => 1080,
'cover' => [ 'cover' => [
'width' => 480, 'width' => 480,
'height' => 480, 'height' => 480,
'radius' => 24, 'radius' => 24,
'x' => 150, 'x' => 150,
'y' => 120, 'y' => 120,
], ],
'quotes' => [ 'quotes' => [
'width' => 192, 'width' => 192,
'height' => 192, 'height' => 192,
'x' => 810, 'x' => 810,
'y' => 210, 'y' => 210,
], ],
'podcastTitle' => [ 'podcastTitle' => [
'fontsize' => 20, 'fontsize' => 20,
'x' => 150, 'x' => 150,
'y' => 620, 'y' => 620,
'lineWidth' => 510, 'lineWidth' => 510,
], ],
'episodeTitle' => [ 'episodeTitle' => [
'fontsize' => 32, 'fontsize' => 32,
'x' => 150, 'x' => 150,
'y' => 660, 'y' => 660,
'lines' => 3, 'lines' => 3,
'lineWidth' => 510, 'lineWidth' => 510,
'lineHeight' => 1.5, 'lineHeight' => 1.5,
], ],
'episodeNumbering' => [ 'episodeNumbering' => [
'fontsize' => 18, 'fontsize' => 18,
'paddingX' => 10, 'paddingX' => 10,
'paddingY' => 5, 'paddingY' => 5,
'marginRight' => 10, 'marginRight' => 10,
], ],
'timestamp' => [ 'timestamp' => [
'fontsize' => 32, 'fontsize' => 32,
'padding' => 10, 'padding' => 10,
'x' => 1620, 'x' => 1620,
'y' => 985, 'y' => 985,
], ],
'watermark' => [ 'watermark' => [
'width' => 90, 'width' => 90,
'height' => 72, 'height' => 72,
'x' => 140, 'x' => 140,
'y' => 960, 'y' => 960,
], ],
'progressbar' => [ 'progressbar' => [
'height' => 10, 'height' => 10,
], ],
'soundwaves' => [ 'soundwaves' => [
'width' => 192, 'width' => 192,
'height' => 108, 'height' => 108,
'rescaleWidth' => 1920, 'rescaleWidth' => 1920,
'rescaleHeight' => 540, 'rescaleHeight' => 540,
'x' => 0, 'x' => 0,
'y' => 810, 'y' => 810,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-landscape.png', 'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-landscape.png',
], ],
'subtitles' => [ 'subtitles' => [
'fontsize' => 18, 'fontsize' => 18,
'marginL' => 180, 'marginL' => 180,
'marginR' => 20, 'marginR' => 20,
'marginV' => 85, 'marginV' => 85,
], ],
], ],
'portrait' => [ 'portrait' => [
'width' => 1080, 'width' => 1080,
'height' => 1920, 'height' => 1920,
'cover' => [ 'cover' => [
'width' => 280, 'width' => 280,
'height' => 280, 'height' => 280,
'radius' => 16, 'radius' => 16,
'x' => 50, 'x' => 50,
'y' => 50, 'y' => 50,
], ],
'quotes' => [ 'quotes' => [
'width' => 256, 'width' => 256,
'height' => 256, 'height' => 256,
'x' => 40, 'x' => 40,
'y' => 520, 'y' => 520,
], ],
'podcastTitle' => [ 'podcastTitle' => [
'fontsize' => 32, 'fontsize' => 32,
'x' => 360, 'x' => 360,
'y' => 55, 'y' => 55,
'lineWidth' => 670, 'lineWidth' => 670,
], ],
'episodeTitle' => [ 'episodeTitle' => [
'fontsize' => 42, 'fontsize' => 42,
'x' => 360, 'x' => 360,
'y' => 110, 'y' => 110,
'lines' => 3, 'lines' => 3,
'lineWidth' => 670, 'lineWidth' => 670,
'lineHeight' => 1.5, 'lineHeight' => 1.5,
], ],
'episodeNumbering' => [ 'episodeNumbering' => [
'fontsize' => 28, 'fontsize' => 28,
'paddingX' => 10, 'paddingX' => 10,
'paddingY' => 10, 'paddingY' => 10,
'marginRight' => 10, 'marginRight' => 10,
], ],
'timestamp' => [ 'timestamp' => [
'fontsize' => 48, 'fontsize' => 48,
'padding' => 14, 'padding' => 14,
'x' => 734, 'x' => 734,
'y' => 1800, 'y' => 1800,
], ],
'watermark' => [ 'watermark' => [
'width' => 120, 'width' => 120,
'height' => 96, 'height' => 96,
'x' => 130, 'x' => 130,
'y' => 1770, 'y' => 1770,
], ],
'progressbar' => [ 'progressbar' => [
'height' => 10, 'height' => 10,
], ],
'soundwaves' => [ 'soundwaves' => [
'width' => 54, 'width' => 54,
'height' => 96, 'height' => 96,
'rescaleWidth' => 1080, 'rescaleWidth' => 1080,
'rescaleHeight' => 1920, 'rescaleHeight' => 1920,
'x' => 0, 'x' => 0,
'y' => 960, 'y' => 960,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-portrait.png', 'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-portrait.png',
], ],
'subtitles' => [ 'subtitles' => [
'fontsize' => 16, 'fontsize' => 16,
'marginL' => 40, 'marginL' => 40,
'marginR' => 25, 'marginR' => 25,
'marginV' => 97, 'marginV' => 97,
], ],
], ],
'squared' => [ 'squared' => [
'width' => 1200, 'width' => 1200,
'height' => 1200, 'height' => 1200,
'cover' => [ 'cover' => [
'width' => 200, 'width' => 200,
'height' => 200, 'height' => 200,
'radius' => 16, 'radius' => 16,
'x' => 40, 'x' => 40,
'y' => 40, 'y' => 40,
], ],
'quotes' => [ 'quotes' => [
'width' => 200, 'width' => 200,
'height' => 200, 'height' => 200,
'x' => 85, 'x' => 85,
'y' => 320, 'y' => 320,
], ],
'podcastTitle' => [ 'podcastTitle' => [
'fontsize' => 28, 'fontsize' => 28,
'x' => 260, 'x' => 260,
'y' => 50, 'y' => 50,
'lines' => 1, 'lines' => 1,
'lineWidth' => 800, 'lineWidth' => 800,
], ],
'episodeTitle' => [ 'episodeTitle' => [
'fontsize' => 36, 'fontsize' => 36,
'x' => 260, 'x' => 260,
'y' => 90, 'y' => 90,
'lines' => 2, 'lines' => 2,
'lineWidth' => 850, 'lineWidth' => 850,
'lineHeight' => 1.5, 'lineHeight' => 1.5,
], ],
'episodeNumbering' => [ 'episodeNumbering' => [
'fontsize' => 24, 'fontsize' => 24,
'paddingX' => 10, 'paddingX' => 10,
'paddingY' => 5, 'paddingY' => 5,
'marginRight' => 10, 'marginRight' => 10,
], ],
'timestamp' => [ 'timestamp' => [
'fontsize' => 48, 'fontsize' => 48,
'padding' => 10, 'padding' => 10,
'x' => 855, 'x' => 855,
'y' => 1070, 'y' => 1070,
], ],
'watermark' => [ 'watermark' => [
'width' => 120, 'width' => 120,
'height' => 96, 'height' => 96,
'x' => 130, 'x' => 130,
'y' => 1040, 'y' => 1040,
], ],
'progressbar' => [ 'progressbar' => [
'height' => 10, 'height' => 10,
], ],
'soundwaves' => [ 'soundwaves' => [
'width' => 60, 'width' => 60,
'height' => 60, 'height' => 60,
'rescaleWidth' => 1200, 'rescaleWidth' => 1200,
'rescaleHeight' => 1200, 'rescaleHeight' => 1200,
'x' => 0, 'x' => 0,
'y' => 600, 'y' => 600,
'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-squared.png', 'mask' => APPPATH . 'Libraries/MediaClipper/soundwaves-mask-squared.png',
], ],
'subtitles' => [ 'subtitles' => [
'fontsize' => 20, 'fontsize' => 20,
'marginL' => 60, 'marginL' => 60,
'marginR' => 20, 'marginR' => 20,
'marginV' => 98, 'marginV' => 98,
], ],
], ],
]; ];
@ -230,117 +230,117 @@ class MediaClipper extends BaseConfig
public array $themes = [ public array $themes = [
'pine' => [ 'pine' => [
// Previews must be a HSL colorscheme string // Previews must be a HSL colorscheme string
'preview' => '174 100% 29%', 'preview' => '174 100% 29%',
'preview-background' => '172 100% 17%', 'preview-background' => '172 100% 17%',
// arrays are rgb // arrays are rgb
'background' => [0, 86, 74], 'background' => [0, 86, 74],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [0, 148, 134], 'quotes' => [0, 148, 134],
'episodeNumberingBg' => [0, 61, 11], 'episodeNumberingBg' => [0, 61, 11],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => '009486', 'progressbar' => '009486',
'timestampBg' => '00564A', 'timestampBg' => '00564A',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => '00564A', 'watermarkBg' => '00564A',
'soundwaves' => [231, 249, 228], 'soundwaves' => [231, 249, 228],
], ],
'crimson' => [ 'crimson' => [
// Preview must be a HSL colorscheme string // Preview must be a HSL colorscheme string
'preview' => '350 87% 61%', 'preview' => '350 87% 61%',
'preview-background' => '348 75% 40%', 'preview-background' => '348 75% 40%',
// arrays are rgb // arrays are rgb
'background' => [179, 31, 57], 'background' => [179, 31, 57],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [242, 70, 100], 'quotes' => [242, 70, 100],
'episodeNumberingBg' => [152, 16, 43], 'episodeNumberingBg' => [152, 16, 43],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'F24664', 'progressbar' => 'F24664',
'timestampBg' => 'B31F39', 'timestampBg' => 'B31F39',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => 'B31F39', 'watermarkBg' => 'B31F39',
'soundwaves' => [253, 206, 215], 'soundwaves' => [253, 206, 215],
], ],
'lake' => [ 'lake' => [
// Preview must be a HSL colorscheme string // Preview must be a HSL colorscheme string
'preview' => '194 100% 44%', 'preview' => '194 100% 44%',
'preview-background' => '194 100% 22%', 'preview-background' => '194 100% 22%',
// arrays are rgb // arrays are rgb
'background' => [0, 86, 113], 'background' => [0, 86, 113],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [0, 171, 225], 'quotes' => [0, 171, 225],
'episodeNumberingBg' => [0, 43, 57], 'episodeNumberingBg' => [0, 43, 57],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => '00ABE1', 'progressbar' => '00ABE1',
'timestampBg' => '005671', 'timestampBg' => '005671',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => '005671', 'watermarkBg' => '005671',
'soundwaves' => [214, 245, 255], 'soundwaves' => [214, 245, 255],
], ],
'amber' => [ 'amber' => [
// Preview must be a HSL colorscheme string // Preview must be a HSL colorscheme string
'preview' => '17 100% 57%', 'preview' => '17 100% 57%',
'preview-background' => '17 100% 35%', 'preview-background' => '17 100% 35%',
// arrays are rgb // arrays are rgb
'background' => [177, 50, 0], 'background' => [177, 50, 0],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [255, 96, 34], 'quotes' => [255, 96, 34],
'episodeNumberingBg' => [121, 34, 0], 'episodeNumberingBg' => [121, 34, 0],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'FF6022', 'progressbar' => 'FF6022',
'timestampBg' => 'B13200', 'timestampBg' => 'B13200',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => 'B13200', 'watermarkBg' => 'B13200',
'soundwaves' => [255, 213, 197], 'soundwaves' => [255, 213, 197],
], ],
'jacaranda' => [ 'jacaranda' => [
// Preview must be a HSL colorscheme string // Preview must be a HSL colorscheme string
'preview' => '254 72% 52%', 'preview' => '254 72% 52%',
'preview-background' => '254 73% 30%', 'preview-background' => '254 73% 30%',
// arrays are rgb // arrays are rgb
'background' => [47, 21, 132], 'background' => [47, 21, 132],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [86, 45, 221], 'quotes' => [86, 45, 221],
'episodeNumberingBg' => [30, 14, 84], 'episodeNumberingBg' => [30, 14, 84],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => '562DDD', 'progressbar' => '562DDD',
'timestampBg' => '2F1584', 'timestampBg' => '2F1584',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => '2F1584', 'watermarkBg' => '2F1584',
'soundwaves' => [199, 185, 244], 'soundwaves' => [199, 185, 244],
], ],
'onyx' => [ 'onyx' => [
// Preview must be a HSL colorscheme string // Preview must be a HSL colorscheme string
'preview' => '240 17% 2%', 'preview' => '240 17% 2%',
'preview-background' => '240 17% 2%', 'preview-background' => '240 17% 2%',
// arrays are rgb // arrays are rgb
'background' => [5, 5, 7], 'background' => [5, 5, 7],
'text' => [255, 255, 255], 'text' => [255, 255, 255],
// subtitle hex color is BGR (Blue, Green, Red), // subtitle hex color is BGR (Blue, Green, Red),
'subtitles' => 'FFFFFF', 'subtitles' => 'FFFFFF',
// quotes image MUST BE black // quotes image MUST BE black
'quotes' => [38, 38, 49], 'quotes' => [38, 38, 49],
'episodeNumberingBg' => [0, 0, 0], 'episodeNumberingBg' => [0, 0, 0],
'episodeNumberingText' => [255, 255, 255], 'episodeNumberingText' => [255, 255, 255],
'progressbar' => 'D5D5E1', 'progressbar' => 'D5D5E1',
'timestampBg' => '050507', 'timestampBg' => '050507',
'timestampText' => 'FFFFFF', 'timestampText' => 'FFFFFF',
'watermarkBg' => '050507', 'watermarkBg' => '050507',
'soundwaves' => [213, 213, 225], 'soundwaves' => [213, 213, 225],
], ],
]; ];
} }

View File

@ -26,11 +26,11 @@ class VideoClipper
* @var array<string, string> * @var array<string, string>
*/ */
final public const FONTS = [ final public const FONTS = [
'episodeTitle' => 'Rubik-Bold.ttf', 'episodeTitle' => 'Rubik-Bold.ttf',
'podcastTitle' => 'Inter-Regular.otf', 'podcastTitle' => 'Inter-Regular.otf',
'subtitles' => 'Inter-SemiBold', 'subtitles' => 'Inter-SemiBold',
'episodeNumbering' => 'Inter-SemiBold.otf', 'episodeNumbering' => 'Inter-SemiBold.otf',
'timestamp' => 'NotoSansMono-Regular.ttf', 'timestamp' => 'NotoSansMono-Regular.ttf',
]; ];
public ?string $logs = null; public ?string $logs = null;
@ -505,8 +505,8 @@ class VideoClipper
{ {
return match ($this->episode->cover->file_mimetype) { return match ($this->episode->cover->file_mimetype) {
'image/jpeg' => imagecreatefromjpeg($this->episodeCoverPath), 'image/jpeg' => imagecreatefromjpeg($this->episodeCoverPath),
'image/png' => imagecreatefrompng($this->episodeCoverPath), 'image/png' => imagecreatefrompng($this->episodeCoverPath),
default => imagecreate(1400, 1400), default => imagecreate(1400, 1400),
}; };
} }
@ -677,11 +677,11 @@ class VideoClipper
$maxY = max([$bbox[1], $bbox[3], $bbox[5], $bbox[7]]); $maxY = max([$bbox[1], $bbox[3], $bbox[5], $bbox[7]]);
return [ return [
'left' => abs($minX) - 1, 'left' => abs($minX) - 1,
'top' => abs($minY), 'top' => abs($minY),
'width' => $maxX - $minX, 'width' => $maxX - $minX,
'height' => $maxY - $minY, 'height' => $maxY - $minY,
'box' => $bbox, 'box' => $bbox,
]; ];
} }

View File

@ -46,30 +46,30 @@ class PodcastEpisode extends ObjectType
$this->id = $episode->link; $this->id = $episode->link;
$this->description = [ $this->description = [
'type' => 'Note', 'type' => 'Note',
'mediaType' => 'text/markdown', 'mediaType' => 'text/markdown',
'content' => $episode->description_markdown, 'content' => $episode->description_markdown,
'contentMap' => [ 'contentMap' => [
$episode->podcast->language_code => $episode->description_html, $episode->podcast->language_code => $episode->description_html,
], ],
]; ];
$this->image = [ $this->image = [
'type' => 'Image', 'type' => 'Image',
'mediaType' => $episode->cover->file_mimetype, 'mediaType' => $episode->cover->file_mimetype,
'url' => $episode->cover->feed_url, 'url' => $episode->cover->feed_url,
]; ];
// add audio file // add audio file
$this->audio = [ $this->audio = [
'id' => $episode->audio_url, 'id' => $episode->audio_url,
'type' => 'Audio', 'type' => 'Audio',
'name' => esc($episode->title), 'name' => esc($episode->title),
'size' => $episode->audio->file_size, 'size' => $episode->audio->file_size,
'duration' => $episode->audio->duration, 'duration' => $episode->audio->duration,
'url' => [ 'url' => [
'href' => $episode->audio_url, 'href' => $episode->audio_url,
'type' => 'Link', 'type' => 'Link',
'mediaType' => $episode->audio->file_mimetype, 'mediaType' => $episode->audio->file_mimetype,
], ],
]; ];

View File

@ -16,9 +16,9 @@ class Themes extends BaseConfig
* @var array<string, string> * @var array<string, string>
*/ */
public array $themes = [ public array $themes = [
'app' => 'cp_app', 'app' => 'cp_app',
'admin' => 'cp_admin', 'admin' => 'cp_admin',
'install' => 'cp_install', 'install' => 'cp_install',
'auth' => 'cp_auth', 'auth' => 'cp_auth',
]; ];
} }

View File

@ -116,7 +116,7 @@ class CategoryModel extends Model
$categoriesIds, $categoriesIds,
static function (array $result, int $categoryId) use ($podcastId): array { static function (array $result, int $categoryId) use ($podcastId): array {
$result[] = [ $result[] = [
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'category_id' => $categoryId, 'category_id' => $categoryId,
]; ];
return $result; return $result;

View File

@ -113,7 +113,7 @@ class ClipModel extends Model
public function getScheduledVideoClips(): array public function getScheduledVideoClips(): array
{ {
$found = $this->where([ $found = $this->where([
'type' => 'video', 'type' => 'video',
'status' => 'queued', 'status' => 'queued',
]) ])
->orderBy('created_at') ->orderBy('created_at')
@ -131,7 +131,7 @@ class ClipModel extends Model
$result = $this->builder() $result = $this->builder()
->select('COUNT(*) as `running_count`') ->select('COUNT(*) as `running_count`')
->where([ ->where([
'type' => 'video', 'type' => 'video',
'status' => 'running', 'status' => 'running',
]) ])
->get() ->get()
@ -148,7 +148,7 @@ class ClipModel extends Model
'podcast_id' => $videoClip->podcast_id, 'podcast_id' => $videoClip->podcast_id,
'episode_id' => $videoClip->episode_id, 'episode_id' => $videoClip->episode_id,
'start_time' => $videoClip->start_time, 'start_time' => $videoClip->start_time,
'duration' => $videoClip->duration, 'duration' => $videoClip->duration,
]) ])
->where('JSON_EXTRACT(`metadata`, "$.format")', $videoClip->format) ->where('JSON_EXTRACT(`metadata`, "$.format")', $videoClip->format)
->where('JSON_EXTRACT(`metadata`, "$.theme.name")', $videoClip->theme['name']) ->where('JSON_EXTRACT(`metadata`, "$.theme.name")', $videoClip->theme['name'])
@ -169,7 +169,7 @@ class ClipModel extends Model
return $this->delete([ return $this->delete([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'id' => $clipId, 'id' => $clipId,
]); ]);
} }
@ -211,7 +211,7 @@ class ClipModel extends Model
$found = $this->where([ $found = $this->where([
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'type' => 'audio', 'type' => 'audio',
]) ])
->orderBy('start_time') ->orderBy('start_time')
->findAll(); ->findAll();
@ -234,7 +234,7 @@ class ClipModel extends Model
return $this->delete([ return $this->delete([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'id' => $clipId, 'id' => $clipId,
]); ]);
} }

View File

@ -202,7 +202,7 @@ class EpisodeCommentModel extends UuidModel
$episodeCommentsBuilder = $this->builder(); $episodeCommentsBuilder = $this->builder();
$episodeComments = $episodeCommentsBuilder->select('*, 0 as is_from_post') $episodeComments = $episodeCommentsBuilder->select('*, 0 as is_from_post')
->where([ ->where([
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'in_reply_to_id' => null, 'in_reply_to_id' => null,
]) ])
->getCompiledSelect(); ->getCompiledSelect();
@ -216,7 +216,7 @@ class EpisodeCommentModel extends UuidModel
return $builder->select('id') return $builder->select('id')
->from(config('Fediverse')->tablesPrefix . 'posts') ->from(config('Fediverse')->tablesPrefix . 'posts')
->where([ ->where([
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'in_reply_to_id' => null, 'in_reply_to_id' => null,
]); ]);
}) })

View File

@ -24,30 +24,28 @@ class EpisodeModel extends Model
*/ */
public static $themes = [ public static $themes = [
'light-transparent' => [ 'light-transparent' => [
'style' => 'style' => 'background-color: #fff; background-image: linear-gradient(45deg, #ccc 12.5%, transparent 12.5%, transparent 50%, #ccc 50%, #ccc 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background-color: #fff; background-image: linear-gradient(45deg, #ccc 12.5%, transparent 12.5%, transparent 50%, #ccc 50%, #ccc 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background' => 'transparent', 'background' => 'transparent',
'text' => '#000', 'text' => '#000',
'inverted' => '#fff', 'inverted' => '#fff',
], ],
'light' => [ 'light' => [
'style' => 'background-color: #fff;', 'style' => 'background-color: #fff;',
'background' => '#fff', 'background' => '#fff',
'text' => '#000', 'text' => '#000',
'inverted' => '#fff', 'inverted' => '#fff',
], ],
'dark-transparent' => [ 'dark-transparent' => [
'style' => 'style' => 'background-color: #001f1a; background-image: linear-gradient(45deg, #888 12.5%, transparent 12.5%, transparent 50%, #888 50%, #888 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background-color: #001f1a; background-image: linear-gradient(45deg, #888 12.5%, transparent 12.5%, transparent 50%, #888 50%, #888 62.5%, transparent 62.5%, transparent 100%); background-size: 5.66px 5.66px;',
'background' => 'transparent', 'background' => 'transparent',
'text' => '#fff', 'text' => '#fff',
'inverted' => '#000', 'inverted' => '#000',
], ],
'dark' => [ 'dark' => [
'style' => 'background-color: #001f1a;', 'style' => 'background-color: #001f1a;',
'background' => '#313131', 'background' => '#313131',
'text' => '#fff', 'text' => '#fff',
'inverted' => '#000', 'inverted' => '#000',
], ],
]; ];
@ -105,19 +103,19 @@ class EpisodeModel extends Model
* @var array<string, string> * @var array<string, string>
*/ */
protected $validationRules = [ protected $validationRules = [
'podcast_id' => 'required', 'podcast_id' => 'required',
'title' => 'required', 'title' => 'required',
'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]', 'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]',
'audio_id' => 'required', 'audio_id' => 'required',
'description_markdown' => 'required', 'description_markdown' => 'required',
'number' => 'is_natural_no_zero|permit_empty', 'number' => 'is_natural_no_zero|permit_empty',
'season_number' => 'is_natural_no_zero|permit_empty', 'season_number' => 'is_natural_no_zero|permit_empty',
'type' => 'required', 'type' => 'required',
'transcript_remote_url' => 'valid_url_strict|permit_empty', 'transcript_remote_url' => 'valid_url_strict|permit_empty',
'chapters_remote_url' => 'valid_url_strict|permit_empty', 'chapters_remote_url' => 'valid_url_strict|permit_empty',
'published_at' => 'valid_date|permit_empty', 'published_at' => 'valid_date|permit_empty',
'created_by' => 'required', 'created_by' => 'required',
'updated_by' => 'required', 'updated_by' => 'required',
]; ];
/** /**
@ -286,7 +284,7 @@ class EpisodeModel extends Model
$result = $this->builder() $result = $this->builder()
->select('MAX(season_number) as current_season_number') ->select('MAX(season_number) as current_season_number')
->where([ ->where([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'published_at IS NOT' => null, 'published_at IS NOT' => null,
]) ])
->get() ->get()
@ -300,8 +298,8 @@ class EpisodeModel extends Model
$result = $this->builder() $result = $this->builder()
->select('MAX(number) as next_episode_number') ->select('MAX(number) as next_episode_number')
->where([ ->where([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'season_number' => $seasonNumber, 'season_number' => $seasonNumber,
'published_at IS NOT' => null, 'published_at IS NOT' => null,
])->get() ])->get()
->getResultArray(); ->getResultArray();
@ -319,13 +317,13 @@ class EpisodeModel extends Model
'COUNT(DISTINCT season_number) as number_of_seasons, COUNT(*) as number_of_episodes, MIN(published_at) as first_published_at' 'COUNT(DISTINCT season_number) as number_of_seasons, COUNT(*) as number_of_episodes, MIN(published_at) as first_published_at'
) )
->where([ ->where([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'published_at IS NOT' => null, 'published_at IS NOT' => null,
])->get() ])->get()
->getResultArray(); ->getResultArray();
$stats = [ $stats = [
'number_of_seasons' => (int) $result[0]['number_of_seasons'], 'number_of_seasons' => (int) $result[0]['number_of_seasons'],
'number_of_episodes' => (int) $result[0]['number_of_episodes'], 'number_of_episodes' => (int) $result[0]['number_of_episodes'],
]; ];

View File

@ -52,7 +52,7 @@ class LikeModel extends UuidModel
$this->db->transStart(); $this->db->transStart();
$this->insert([ $this->insert([
'actor_id' => $actor->id, 'actor_id' => $actor->id,
'comment_id' => $comment->id, 'comment_id' => $comment->id,
]); ]);
@ -96,7 +96,7 @@ class LikeModel extends UuidModel
->decrement('likes_count'); ->decrement('likes_count');
$this->where([ $this->where([
'actor_id' => $actor->id, 'actor_id' => $actor->id,
'comment_id' => service('uuid') 'comment_id' => service('uuid')
->fromString($comment->id) ->fromString($comment->id)
->getBytes(), ->getBytes(),
@ -108,7 +108,7 @@ class LikeModel extends UuidModel
// FIXME: get like activity associated with the deleted like // FIXME: get like activity associated with the deleted like
$activity = model(ActivityModel::class) $activity = model(ActivityModel::class)
->where([ ->where([
'type' => 'Like', 'type' => 'Like',
'actor_id' => $actor->id, 'actor_id' => $actor->id,
]) ])
->first(); ->first();
@ -152,7 +152,7 @@ class LikeModel extends UuidModel
{ {
if ( if (
$this->where([ $this->where([
'actor_id' => $actor->id, 'actor_id' => $actor->id,
'comment_id' => service('uuid') 'comment_id' => service('uuid')
->fromString($comment->id) ->fromString($comment->id)
->getBytes(), ->getBytes(),

View File

@ -49,9 +49,8 @@ class PageModel extends Model
* @var array<string, string> * @var array<string, string>
*/ */
protected $validationRules = [ protected $validationRules = [
'title' => 'required', 'title' => 'required',
'slug' => 'slug' => 'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]|is_unique[pages.slug,id,{id}]',
'required|regex_match[/^[a-zA-Z0-9\-]{1,128}$/]|is_unique[pages.slug,id,{id}]',
'content_markdown' => 'required', 'content_markdown' => 'required',
]; ];

View File

@ -57,11 +57,10 @@ class PersonModel extends Model
* @var array<string, string> * @var array<string, string>
*/ */
protected $validationRules = [ protected $validationRules = [
'full_name' => 'required', 'full_name' => 'required',
'unique_name' => 'unique_name' => 'required|regex_match[/^[a-z0-9\-]{1,32}$/]|is_unique[persons.unique_name,id,{id}]',
'required|regex_match[/^[a-z0-9\-]{1,32}$/]|is_unique[persons.unique_name,id,{id}]', 'created_by' => 'required',
'created_by' => 'required', 'updated_by' => 'required',
'updated_by' => 'required',
]; ];
/** /**
@ -191,12 +190,12 @@ class PersonModel extends Model
public function addPerson(string $fullName, ?string $informationUrl, string $image): int | bool public function addPerson(string $fullName, ?string $informationUrl, string $image): int | bool
{ {
$person = new Person([ $person = new Person([
'full_name' => $fullName, 'full_name' => $fullName,
'unique_name' => slugify($fullName), 'unique_name' => slugify($fullName),
'information_url' => $informationUrl, 'information_url' => $informationUrl,
'image' => download_file($image), 'image' => download_file($image),
'created_by' => user_id(), 'created_by' => user_id(),
'updated_by' => user_id(), 'updated_by' => user_id(),
]); ]);
return $this->insert($person); return $this->insert($person);
@ -257,11 +256,11 @@ class PersonModel extends Model
): bool { ): bool {
return $this->db->table('episodes_persons') return $this->db->table('episodes_persons')
->insert([ ->insert([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'person_id' => $personId, 'person_id' => $personId,
'person_group' => $groupSlug, 'person_group' => $groupSlug,
'person_role' => $roleSlug, 'person_role' => $roleSlug,
]); ]);
} }
@ -269,10 +268,10 @@ class PersonModel extends Model
{ {
return $this->db->table('podcasts_persons') return $this->db->table('podcasts_persons')
->insert([ ->insert([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'person_id' => $personId, 'person_id' => $personId,
'person_group' => $groupSlug, 'person_group' => $groupSlug,
'person_role' => $roleSlug, 'person_role' => $roleSlug,
]); ]);
} }
@ -301,17 +300,17 @@ class PersonModel extends Model
if ($roles === []) { if ($roles === []) {
$data[] = [ $data[] = [
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'person_id' => $personId, 'person_id' => $personId,
]; ];
} }
foreach ($roles as $role) { foreach ($roles as $role) {
$groupRole = explode(',', $role); $groupRole = explode(',', $role);
$data[] = [ $data[] = [
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'person_id' => $personId, 'person_id' => $personId,
'person_group' => $groupRole[0], 'person_group' => $groupRole[0],
'person_role' => $groupRole[1], 'person_role' => $groupRole[1],
]; ];
} }
} }
@ -338,7 +337,7 @@ class PersonModel extends Model
return $this->db->table('podcasts_persons') return $this->db->table('podcasts_persons')
->delete([ ->delete([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'person_id' => $personId, 'person_id' => $personId,
]); ]);
} }
@ -369,18 +368,18 @@ class PersonModel extends Model
foreach ($groupsRoles as $groupRole) { foreach ($groupsRoles as $groupRole) {
$groupRole = explode(',', $groupRole); $groupRole = explode(',', $groupRole);
$data[] = [ $data[] = [
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'person_id' => $personId, 'person_id' => $personId,
'person_group' => $groupRole[0], 'person_group' => $groupRole[0],
'person_role' => $groupRole[1], 'person_role' => $groupRole[1],
]; ];
} }
} else { } else {
$data[] = [ $data[] = [
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'person_id' => $personId, 'person_id' => $personId,
]; ];
} }
} }
@ -406,7 +405,7 @@ class PersonModel extends Model
->delete([ ->delete([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'episode_id' => $episodeId, 'episode_id' => $episodeId,
'person_id' => $personId, 'person_id' => $personId,
]); ]);
} }

View File

@ -85,10 +85,10 @@ class PlatformModel extends Model
string $submitUrl = null string $submitUrl = null
): int | false { ): int | false {
$data = [ $data = [
'slug' => $slug, 'slug' => $slug,
'type' => $type, 'type' => $type,
'label' => $label, 'label' => $label,
'home_url' => $homeUrl, 'home_url' => $homeUrl,
'submit_url' => $submitUrl, 'submit_url' => $submitUrl,
]; ];
@ -195,7 +195,7 @@ class PlatformModel extends Model
return $this->db->table('podcasts_platforms') return $this->db->table('podcasts_platforms')
->delete([ ->delete([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'platform_slug' => $platformSlug, 'platform_slug' => $platformSlug,
]); ]);
} }

View File

@ -84,19 +84,18 @@ class PodcastModel extends Model
* @var array<string, string> * @var array<string, string>
*/ */
protected $validationRules = [ protected $validationRules = [
'title' => 'required', 'title' => 'required',
'handle' => 'handle' => 'required|regex_match[/^[a-zA-Z0-9\_]{1,32}$/]|is_unique[podcasts.handle,id,{id}]',
'required|regex_match[/^[a-zA-Z0-9\_]{1,32}$/]|is_unique[podcasts.handle,id,{id}]',
'description_markdown' => 'required', 'description_markdown' => 'required',
'cover_id' => 'required', 'cover_id' => 'required',
'language_code' => 'required', 'language_code' => 'required',
'category_id' => 'required', 'category_id' => 'required',
'owner_email' => 'required|valid_email', 'owner_email' => 'required|valid_email',
'new_feed_url' => 'valid_url_strict|permit_empty', 'new_feed_url' => 'valid_url_strict|permit_empty',
'type' => 'required', 'type' => 'required',
'published_at' => 'valid_date|permit_empty', 'published_at' => 'valid_date|permit_empty',
'created_by' => 'required', 'created_by' => 'required',
'updated_by' => 'required', 'updated_by' => 'required',
]; ];
/** /**
@ -249,8 +248,8 @@ class PodcastModel extends Model
->builder() ->builder()
->select('YEAR(published_at) as year, count(*) as number_of_episodes') ->select('YEAR(published_at) as year, count(*) as number_of_episodes')
->where([ ->where([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'season_number' => null, 'season_number' => null,
'published_at IS NOT' => null, 'published_at IS NOT' => null,
]) ])
->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false)
@ -286,9 +285,9 @@ class PodcastModel extends Model
->builder() ->builder()
->select('season_number, count(*) as number_of_episodes') ->select('season_number, count(*) as number_of_episodes')
->where([ ->where([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'season_number is not' => null, 'season_number is not' => null,
'published_at IS NOT' => null, 'published_at IS NOT' => null,
]) ])
->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false)
->groupBy('season_number') ->groupBy('season_number')
@ -409,15 +408,15 @@ class PodcastModel extends Model
$actorId = (new ActorModel())->insert( $actorId = (new ActorModel())->insert(
[ [
'uri' => url_to('actor', $username), 'uri' => url_to('actor', $username),
'username' => $username, 'username' => $username,
'domain' => $domain, 'domain' => $domain,
'private_key' => $privatekey, 'private_key' => $privatekey,
'public_key' => $publickey, 'public_key' => $publickey,
'display_name' => $data['data']['title'], 'display_name' => $data['data']['title'],
'summary' => $data['data']['description_html'], 'summary' => $data['data']['description_html'],
'inbox_url' => url_to('inbox', $username), 'inbox_url' => url_to('inbox', $username),
'outbox_url' => url_to('outbox', $username), 'outbox_url' => url_to('outbox', $username),
'followers_url' => url_to('followers', $username), 'followers_url' => url_to('followers', $username),
], ],
true, true,

View File

@ -63,8 +63,8 @@ class PostModel extends FediversePostModel
->select('p2.id, p1.episode_id') ->select('p2.id, p1.episode_id')
->where([ ->where([
'p2.in_reply_to_id IS NOT' => null, 'p2.in_reply_to_id IS NOT' => null,
'p2.episode_id' => null, 'p2.episode_id' => null,
'p1.episode_id IS NOT' => null, 'p1.episode_id IS NOT' => null,
]) ])
->get() ->get()
->getResultArray(); ->getResultArray();

View File

@ -31,37 +31,37 @@ class Button extends Component
'gap-x-2 flex-shrink-0 inline-flex items-center justify-center font-semibold shadow-xs rounded-full focus:ring-accent'; 'gap-x-2 flex-shrink-0 inline-flex items-center justify-center font-semibold shadow-xs rounded-full focus:ring-accent';
$variantClass = [ $variantClass = [
'default' => 'text-black bg-gray-300 hover:bg-gray-400', 'default' => 'text-black bg-gray-300 hover:bg-gray-400',
'primary' => 'text-accent-contrast bg-accent-base hover:bg-accent-hover', 'primary' => 'text-accent-contrast bg-accent-base hover:bg-accent-hover',
'secondary' => 'border-2 border-accent-base text-accent-base bg-white hover:border-accent-hover hover:text-accent-hover', 'secondary' => 'border-2 border-accent-base text-accent-base bg-white hover:border-accent-hover hover:text-accent-hover',
'success' => 'text-white bg-pine-500 hover:bg-pine-800', 'success' => 'text-white bg-pine-500 hover:bg-pine-800',
'danger' => 'text-white bg-red-600 hover:bg-red-700', 'danger' => 'text-white bg-red-600 hover:bg-red-700',
'warning' => 'text-black bg-yellow-500 hover:bg-yellow-600', 'warning' => 'text-black bg-yellow-500 hover:bg-yellow-600',
'info' => 'text-white bg-blue-500 hover:bg-blue-600', 'info' => 'text-white bg-blue-500 hover:bg-blue-600',
'disabled' => 'text-black bg-gray-300 cursor-not-allowed', 'disabled' => 'text-black bg-gray-300 cursor-not-allowed',
]; ];
$sizeClass = [ $sizeClass = [
'small' => 'text-xs leading-6', 'small' => 'text-xs leading-6',
'base' => 'text-sm leading-5', 'base' => 'text-sm leading-5',
'large' => 'text-base leading-6', 'large' => 'text-base leading-6',
]; ];
$iconSize = [ $iconSize = [
'small' => 'text-sm', 'small' => 'text-sm',
'base' => 'text-lg', 'base' => 'text-lg',
'large' => 'text-2xl', 'large' => 'text-2xl',
]; ];
$basePaddings = [ $basePaddings = [
'small' => 'px-3 py-1', 'small' => 'px-3 py-1',
'base' => 'px-3 py-2', 'base' => 'px-3 py-2',
'large' => 'px-4 py-2', 'large' => 'px-4 py-2',
]; ];
$squaredPaddings = [ $squaredPaddings = [
'small' => 'p-1', 'small' => 'p-1',
'base' => 'p-2', 'base' => 'p-2',
'large' => 'p-3', 'large' => 'p-3',
]; ];
@ -84,14 +84,14 @@ class Button extends Component
if ($this->iconLeft !== '') { if ($this->iconLeft !== '') {
$this->slot = (new Icon([ $this->slot = (new Icon([
'glyph' => $this->iconLeft, 'glyph' => $this->iconLeft,
'class' => 'opacity-75' . ' ' . $iconSize[$this->size], 'class' => 'opacity-75 ' . $iconSize[$this->size],
]))->render() . $this->slot; ]))->render() . $this->slot;
} }
if ($this->iconRight !== '') { if ($this->iconRight !== '') {
$this->slot .= (new Icon([ $this->slot .= (new Icon([
'glyph' => $this->iconRight, 'glyph' => $this->iconRight,
'class' => 'opacity-75' . ' ' . $iconSize[$this->size], 'class' => 'opacity-75 ' . $iconSize[$this->size],
]))->render(); ]))->render();
} }

View File

@ -18,8 +18,8 @@ class Checkbox extends FormComponent
public function render(): string public function render(): string
{ {
$attributes = [ $attributes = [
'id' => $this->value, 'id' => $this->value,
'name' => $this->name, 'name' => $this->name,
'class' => 'form-checkbox bg-elevated text-accent-base border-contrast border-3 focus:ring-accent w-6 h-6', 'class' => 'form-checkbox bg-elevated text-accent-base border-contrast border-3 focus:ring-accent w-6 h-6',
]; ];
if ($this->required) { if ($this->required) {

View File

@ -18,8 +18,8 @@ class ColorRadioButton extends FormComponent
public function render(): string public function render(): string
{ {
$data = [ $data = [
'id' => $this->value, 'id' => $this->value,
'name' => $this->name, 'name' => $this->name,
'class' => 'color-radio-btn', 'class' => 'color-radio-btn',
]; ];

View File

@ -24,7 +24,7 @@ class Field extends FormComponent
} }
$labelAttributes = [ $labelAttributes = [
'for' => $this->id, 'for' => $this->id,
'isOptional' => $this->required ? 'false' : 'true', 'isOptional' => $this->required ? 'false' : 'true',
]; ];
if ($this->hint) { if ($this->hint) {

View File

@ -29,55 +29,55 @@ class MarkdownEditor extends FormComponent
'mr-1 text-lg opacity-40' 'mr-1 text-lg opacity-40'
); );
$translations = [ $translations = [
'write' => lang('Common.forms.editor.write'), 'write' => lang('Common.forms.editor.write'),
'preview' => lang('Common.forms.editor.preview'), 'preview' => lang('Common.forms.editor.preview'),
'help' => lang('Common.forms.editor.help'), 'help' => lang('Common.forms.editor.help'),
]; ];
$toolbarGroups = [ $toolbarGroups = [
[ [
[ [
'name' => 'header', 'name' => 'header',
'tag' => 'md-header', 'tag' => 'md-header',
'icon' => icon('heading'), 'icon' => icon('heading'),
], ],
[ [
'name' => 'bold', 'name' => 'bold',
'tag' => 'md-bold', 'tag' => 'md-bold',
'icon' => icon('bold'), 'icon' => icon('bold'),
], ],
[ [
'name' => 'italic', 'name' => 'italic',
'tag' => 'md-italic', 'tag' => 'md-italic',
'icon' => icon('italic'), 'icon' => icon('italic'),
], ],
], ],
[ [
[ [
'name' => 'unordered-list', 'name' => 'unordered-list',
'tag' => 'md-unordered-list', 'tag' => 'md-unordered-list',
'icon' => icon('list-unordered'), 'icon' => icon('list-unordered'),
], ],
[ [
'name' => 'ordered-list', 'name' => 'ordered-list',
'tag' => 'md-ordered-list ', 'tag' => 'md-ordered-list ',
'icon' => icon('list-ordered'), 'icon' => icon('list-ordered'),
], ],
], ],
[ [
[ [
'name' => 'quote', 'name' => 'quote',
'tag' => 'md-quote', 'tag' => 'md-quote',
'icon' => icon('quote'), 'icon' => icon('quote'),
], ],
[ [
'name' => 'link', 'name' => 'link',
'tag' => 'md-link', 'tag' => 'md-link',
'icon' => icon('link'), 'icon' => icon('link'),
], ],
[ [
'name' => 'image', 'name' => 'image',
'tag' => 'md-image', 'tag' => 'md-image',
'icon' => icon('image-add'), 'icon' => icon('image-add'),
], ],
], ],

View File

@ -29,13 +29,13 @@ class MultiSelect extends FormComponent
public function render(): string public function render(): string
{ {
$defaultAttributes = [ $defaultAttributes = [
'data-class' => $this->attributes['class'], 'data-class' => $this->attributes['class'],
'multiple' => 'multiple', 'multiple' => 'multiple',
'data-select-text' => lang('Common.forms.multiSelect.selectText'), 'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'), 'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'), 'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'),
'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'), 'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'), 'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
]; ];
$this->attributes['class'] .= ' bg-elevated border-3 border-contrast rounded-lg'; $this->attributes['class'] .= ' bg-elevated border-3 border-contrast rounded-lg';
$extra = array_merge($defaultAttributes, $this->attributes); $extra = array_merge($defaultAttributes, $this->attributes);

View File

@ -17,8 +17,8 @@ class Radio extends FormComponent
{ {
$radioInput = form_radio( $radioInput = form_radio(
[ [
'id' => $this->value, 'id' => $this->value,
'name' => $this->name, 'name' => $this->name,
'class' => 'text-accent-base bg-elevated border-contrast border-3 focus:ring-accent w-6 h-6', 'class' => 'text-accent-base bg-elevated border-contrast border-3 focus:ring-accent w-6 h-6',
], ],
$this->value, $this->value,

View File

@ -18,8 +18,8 @@ class RadioButton extends FormComponent
public function render(): string public function render(): string
{ {
$data = [ $data = [
'id' => $this->value, 'id' => $this->value,
'name' => $this->name, 'name' => $this->name,
'class' => 'form-radio-btn bg-elevated', 'class' => 'form-radio-btn bg-elevated',
]; ];

View File

@ -21,13 +21,13 @@ class Select extends FormComponent
public function render(): string public function render(): string
{ {
$defaultAttributes = [ $defaultAttributes = [
'class' => 'focus:border-contrast focus:ring-accent border-3 rounded-lg bg-elevated border-contrast ' . $this->class, 'class' => 'focus:border-contrast focus:ring-accent border-3 rounded-lg bg-elevated border-contrast ' . $this->class,
'data-class' => $this->class, 'data-class' => $this->class,
'data-select-text' => lang('Common.forms.multiSelect.selectText'), 'data-select-text' => lang('Common.forms.multiSelect.selectText'),
'data-loading-text' => lang('Common.forms.multiSelect.loadingText'), 'data-loading-text' => lang('Common.forms.multiSelect.loadingText'),
'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'), 'data-no-results-text' => lang('Common.forms.multiSelect.noResultsText'),
'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'), 'data-no-choices-text' => lang('Common.forms.multiSelect.noChoicesText'),
'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'), 'data-max-item-text' => lang('Common.forms.multiSelect.maxItemText'),
]; ];
$extra = array_merge($this->attributes, $defaultAttributes); $extra = array_merge($this->attributes, $defaultAttributes);

View File

@ -30,7 +30,7 @@ class Toggler extends FormComponent
unset($this->attributes['class']); unset($this->attributes['class']);
$sizeClass = [ $sizeClass = [
'base' => 'form-switch-slider', 'base' => 'form-switch-slider',
'small' => 'form-switch-slider form-switch-slider--small', 'small' => 'form-switch-slider form-switch-slider--small',
]; ];

View File

@ -10,7 +10,7 @@ class XMLEditor extends FormComponent
* @var array<string, string> * @var array<string, string>
*/ */
protected array $attributes = [ protected array $attributes = [
'rows' => '5', 'rows' => '5',
'class' => 'textarea', 'class' => 'textarea',
]; ];

View File

@ -19,7 +19,7 @@ class Heading extends Component
{ {
$sizeClasses = [ $sizeClasses = [
'small' => 'tracking-wide text-base', 'small' => 'tracking-wide text-base',
'base' => 'text-xl', 'base' => 'text-xl',
'large' => 'text-3xl', 'large' => 'text-3xl',
]; ];

View File

@ -11,14 +11,14 @@ class IconButton extends Button
public function __construct(array $attributes) public function __construct(array $attributes)
{ {
$iconButtonAttributes = [ $iconButtonAttributes = [
'isSquared' => 'true', 'isSquared' => 'true',
'title' => $attributes['slot'], 'title' => $attributes['slot'],
'data-tooltip' => 'bottom', 'data-tooltip' => 'bottom',
]; ];
$glyphSize = [ $glyphSize = [
'small' => 'text-sm', 'small' => 'text-sm',
'base' => 'text-lg', 'base' => 'text-lg',
'large' => 'text-2xl', 'large' => 'text-2xl',
]; ];

View File

@ -27,7 +27,7 @@ class Pill extends Component
'default' => 'text-gray-800 bg-gray-100 border-gray-300', 'default' => 'text-gray-800 bg-gray-100 border-gray-300',
'primary' => 'text-accent-contrast bg-accent-base border-accent-base', 'primary' => 'text-accent-contrast bg-accent-base border-accent-base',
'success' => 'text-pine-900 bg-pine-100 border-pine-300', 'success' => 'text-pine-900 bg-pine-100 border-pine-300',
'danger' => 'text-red-900 bg-red-100 border-red-300', 'danger' => 'text-red-900 bg-red-100 border-red-300',
'warning' => 'text-yellow-900 bg-yellow-100 border-yellow-300', 'warning' => 'text-yellow-900 bg-yellow-100 border-yellow-300',
]; ];

2
builds
View File

@ -53,7 +53,7 @@ if (is_file($file)) {
if (! $found) { if (! $found) {
$array['repositories'][] = [ $array['repositories'][] = [
'type' => 'vcs', 'type' => 'vcs',
'url' => GITHUB_URL, 'url' => GITHUB_URL,
]; ];
} }

View File

@ -19,20 +19,20 @@
"adaures/podcast-persons-taxonomy": "^v1.0.0", "adaures/podcast-persons-taxonomy": "^v1.0.0",
"phpseclib/phpseclib": "~2.0.42", "phpseclib/phpseclib": "~2.0.42",
"michalsn/codeigniter4-uuid": "dev-develop", "michalsn/codeigniter4-uuid": "dev-develop",
"codeigniter4/settings": "^v2.1.0", "codeigniter4/settings": "v2.1.2",
"chrisjean/php-ico": "^1.0.4", "chrisjean/php-ico": "^1.0.4",
"melbahja/seo": "^v2.1.1", "melbahja/seo": "^v2.1.1",
"codeigniter4/shield": "v1.0.0-beta.3", "codeigniter4/shield": "v1.0.0-beta.3",
"aws/aws-sdk-php": "^3.269.7", "aws/aws-sdk-php": "^3.272.1",
"mpratt/embera": "^2.0.32" "mpratt/embera": "^2.0.33"
}, },
"require-dev": { "require-dev": {
"mikey179/vfsstream": "^v1.6.11", "mikey179/vfsstream": "^v1.6.11",
"phpunit/phpunit": "^10.1.2", "phpunit/phpunit": "^10.2.2",
"captainhook/captainhook": "^5.16.4", "captainhook/captainhook": "^5.16.4",
"symplify/easy-coding-standard": "^11.3.2", "symplify/easy-coding-standard": "^11.3.4",
"phpstan/phpstan": "^1.10.13", "phpstan/phpstan": "^1.10.18",
"rector/rector": "^0.16.0", "rector/rector": "^0.17.0",
"symplify/coding-standard": "^11.3.0" "symplify/coding-standard": "^11.3.0"
}, },
"autoload": { "autoload": {

374
composer.lock generated

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More