Skip to content

A self-hosted media server and file management system

Minor optimisations in folder and category resources + removing old ffmpeg php package

aminnausin603514150097
diff --git a/app/Http/Controllers/Api/V1/CategoryController.php b/app/Http/Controllers/Api/V1/CategoryController.php
index 2af0b4e1..9fae7252 100755
--- a/app/Http/Controllers/Api/V1/CategoryController.php
+++ b/app/Http/Controllers/Api/V1/CategoryController.php
@@ -21,7 +21,9 @@ class CategoryController extends Controller {
abort(403, 'Unauthorized action.');
}
try {
- $categories = Category::orderBy('name');
+ $categories = Category::withCount('videos')->orderBy('name');
+
+
if (Auth::user()->id !== 1) {
$categories->where('is_private', false);
}
diff --git a/app/Http/Resources/CategoryResource.php b/app/Http/Resources/CategoryResource.php
index 8b7c526f..7e517d5f 100755
--- a/app/Http/Resources/CategoryResource.php
+++ b/app/Http/Resources/CategoryResource.php
@@ -2,6 +2,7 @@
namespace App\Http\Resources;
+use App\Models\Folder;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\DB;
@@ -19,7 +20,7 @@ class CategoryResource extends JsonResource {
'default_folder_id' => $this->default_folder_id,
'folders_count' => $this->folders_count ?? 0,
'folders' => FolderResource::collection($this->folders),
- 'videos_count' => $this->when(true, function () {
+ 'videos_count' => $this->videos_count ?? $this->when(true, function () {
return DB::table('videos')->join('folders', 'videos.folder_id', '=', 'folders.id')->join('categories', 'folders.category_id', '=', 'categories.id')->where('categories.id', $this->id)->count('videos.id');
}),
'created_at' => $this->created_at,
diff --git a/app/Http/Resources/FolderResource.php b/app/Http/Resources/FolderResource.php
index 27f1054e..84cd275b 100755
--- a/app/Http/Resources/FolderResource.php
+++ b/app/Http/Resources/FolderResource.php
@@ -17,7 +17,7 @@ class FolderResource extends JsonResource {
'name' => $this->name,
'path' => $this->path,
'file_count' => $this->videos_count ?? 0, // $videos->count(),
- 'total_size' => (int) $this->total_size,
+ 'total_size' => $this->series->total_size,
'category_id' => $this->category_id,
'videos' => $this->when($request->videos, function () {
return VideoResource::collection($this->videos);
diff --git a/app/Jobs/VerifyFolders.php b/app/Jobs/VerifyFolders.php
index 82bb6e57..359df5b9 100644
--- a/app/Jobs/VerifyFolders.php
+++ b/app/Jobs/VerifyFolders.php
@@ -109,6 +109,11 @@ class VerifyFolders implements ShouldQueue {
}
}
+ $totalSize = $series->folder->total_size;
+ if ($stored['total_size'] !== $totalSize) {
+ $changes['total_size'] = $totalSize;
+ }
+
if (count($changes) > 0) {
array_push($transactions, [...$stored, ...$changes]);
// dump([...$stored, ...$changes]);
@@ -135,7 +140,7 @@ class VerifyFolders implements ShouldQueue {
return 'No Changes Found';
}
- Series::upsert($transactions, 'id', ['folder_id', 'title', 'episodes', 'thumbnail_url']);
+ Series::upsert($transactions, 'id', ['folder_id', 'title', 'episodes', 'thumbnail_url', 'total_size']);
$summary = 'Updated ' . count($transactions) . ' folders from id ' . ($transactions[0]['folder_id']) . ' to ' . ($transactions[count($transactions) - 1]['folder_id']);
dump($summary);
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 5bbe5cae..210ad61e 100755
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -6,6 +6,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Database\Eloquent\Relations\HasManyThrough;
class Category extends Model {
use HasFactory;
@@ -18,6 +19,10 @@ class Category extends Model {
return $this->hasMany(Folder::class);
}
+ public function videos(): HasManyThrough {
+ return $this->hasManyThrough(Video::class, Folder::class);
+ }
+
public function editor(): BelongsTo {
return $this->belongsTo(User::class);
}
diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php
index 0576bfe9..26d95cb4 100755
--- a/bootstrap/cache/packages.php
+++ b/bootstrap/cache/packages.php
@@ -136,17 +136,6 @@
0 => 'PauloHortelan\\RequestsGraphPulse\\RequestsGraphServiceProvider',
),
),
- 'pbmedia/laravel-ffmpeg' =>
- array (
- 'aliases' =>
- array (
- 'FFMpeg' => 'ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg',
- ),
- 'providers' =>
- array (
- 0 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',
- ),
- ),
'robertogallea/pulse-api' =>
array (
'providers' =>
diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php
index c2c10202..d7268f25 100755
--- a/bootstrap/cache/services.php
+++ b/bootstrap/cache/services.php
@@ -41,11 +41,9 @@
37 => 'Termwind\\Laravel\\TermwindServiceProvider',
38 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
39 => 'PauloHortelan\\RequestsGraphPulse\\RequestsGraphServiceProvider',
- 40 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',
- 41 => 'Robertogallea\\PulseApi\\PulseAPIServiceProvider',
+ 40 => 'Robertogallea\\PulseApi\\PulseAPIServiceProvider',
+ 41 => 'App\\Providers\\AppServiceProvider',
42 => 'App\\Providers\\AppServiceProvider',
- 43 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',
- 44 => 'App\\Providers\\AppServiceProvider',
),
'eager' =>
array (
@@ -72,11 +70,9 @@
20 => 'Termwind\\Laravel\\TermwindServiceProvider',
21 => 'Opcodes\\LogViewer\\LogViewerServiceProvider',
22 => 'PauloHortelan\\RequestsGraphPulse\\RequestsGraphServiceProvider',
- 23 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',
- 24 => 'Robertogallea\\PulseApi\\PulseAPIServiceProvider',
+ 23 => 'Robertogallea\\PulseApi\\PulseAPIServiceProvider',
+ 24 => 'App\\Providers\\AppServiceProvider',
25 => 'App\\Providers\\AppServiceProvider',
- 26 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',
- 27 => 'App\\Providers\\AppServiceProvider',
),
'deferred' =>
array (
diff --git a/composer.json b/composer.json
index 8eb6d1dc..765e43a0 100755
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,6 @@
"laravel/tinker": "^2.9",
"opcodesio/log-viewer": "^3.12",
"paulo-hortelan/requests-graph-pulse": "^1.2",
- "pbmedia/laravel-ffmpeg": "^8.6",
"robertogallea/pulse-api": "^1.0"
},
"require-dev": {
diff --git a/composer.lock b/composer.lock
index 28a0e588..2246a539 100755
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "905a97ccfec72c95c93ad360237a668d",
+ "content-hash": "ed59a779ade75a34d8ac0a9fae0324c9",
"packages": [
{
"name": "brick/math",
@@ -3638,173 +3638,6 @@
],
"time": "2024-08-12T20:14:15+00:00"
},
- {
- "name": "pbmedia/laravel-ffmpeg",
- "version": "8.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/protonemedia/laravel-ffmpeg.git",
- "reference": "f14efc53e8a52b53a237a9910b32e795dafcf8bc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/protonemedia/laravel-ffmpeg/zipball/f14efc53e8a52b53a237a9910b32e795dafcf8bc",
- "reference": "f14efc53e8a52b53a237a9910b32e795dafcf8bc",
- "shasum": ""
- },
- "require": {
- "illuminate/contracts": "^10.0|^11.0",
- "php": "^8.1|^8.2|^8.3|^8.4",
- "php-ffmpeg/php-ffmpeg": "^1.2",
- "ramsey/collection": "^2.0"
- },
- "require-dev": {
- "league/flysystem-memory": "^3.10",
- "mockery/mockery": "^1.4.4",
- "nesbot/carbon": "^2.66|^3.0",
- "orchestra/testbench": "^8.0|^9.0",
- "phpunit/phpunit": "^10.4",
- "spatie/image": "^2.2|^3.3",
- "spatie/phpunit-snapshot-assertions": "^5.0"
- },
- "type": "library",
- "extra": {
- "laravel": {
- "aliases": {
- "FFMpeg": "ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg"
- },
- "providers": [
- "ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "ProtoneMedia\\LaravelFFMpeg\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Pascal Baljet",
- "email": "[email protected]",
- "homepage": "https://protone.media",
- "role": "Developer"
- }
- ],
- "description": "FFMpeg for Laravel",
- "homepage": "https://github.com/protonemedia/laravel-ffmpeg",
- "keywords": [
- "ffmpeg",
- "laravel",
- "laravel-ffmpeg",
- "protone media",
- "protonemedia"
- ],
- "support": {
- "issues": "https://github.com/protonemedia/laravel-ffmpeg/issues",
- "source": "https://github.com/protonemedia/laravel-ffmpeg/tree/8.6.0"
- },
- "funding": [
- {
- "url": "https://github.com/pascalbaljet",
- "type": "github"
- }
- ],
- "time": "2024-11-12T16:12:23+00:00"
- },
- {
- "name": "php-ffmpeg/php-ffmpeg",
- "version": "v1.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/PHP-FFMpeg/PHP-FFMpeg.git",
- "reference": "5e7b15710a8607e8a3a2d9fbe2c150a99b924fa5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/zipball/5e7b15710a8607e8a3a2d9fbe2c150a99b924fa5",
- "reference": "5e7b15710a8607e8a3a2d9fbe2c150a99b924fa5",
- "shasum": ""
- },
- "require": {
- "evenement/evenement": "^3.0",
- "php": "^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4",
- "psr/log": "^1.0 || ^2.0 || ^3.0",
- "spatie/temporary-directory": "^2.0",
- "symfony/cache": "^5.4 || ^6.0 || ^7.0",
- "symfony/process": "^5.4 || ^6.0 || ^7.0"
- },
- "require-dev": {
- "mockery/mockery": "^1.5",
- "phpunit/phpunit": "^9.5.10 || ^10.0"
- },
- "suggest": {
- "php-ffmpeg/extras": "A compilation of common audio & video drivers for PHP-FFMpeg"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "FFMpeg\\": "src/FFMpeg",
- "Alchemy\\BinaryDriver\\": "src/Alchemy/BinaryDriver"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Romain Neutron",
- "email": "[email protected]",
- "homepage": "http://www.lickmychip.com/"
- },
- {
- "name": "Phraseanet Team",
- "email": "[email protected]",
- "homepage": "http://www.phraseanet.com/"
- },
- {
- "name": "Patrik Karisch",
- "email": "[email protected]",
- "homepage": "http://www.karisch.guru"
- },
- {
- "name": "Romain Biard",
- "email": "[email protected]",
- "homepage": "https://www.strime.io/"
- },
- {
- "name": "Jens Hausdorf",
- "email": "[email protected]",
- "homepage": "https://jens-hausdorf.de"
- },
- {
- "name": "Pascal Baljet",
- "email": "[email protected]",
- "homepage": "https://protone.media"
- }
- ],
- "description": "FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg",
- "keywords": [
- "audio",
- "audio processing",
- "avconv",
- "avprobe",
- "ffmpeg",
- "ffprobe",
- "video",
- "video processing"
- ],
- "support": {
- "issues": "https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues",
- "source": "https://github.com/PHP-FFMpeg/PHP-FFMpeg/tree/v1.3.0"
- },
- "time": "2024-11-12T15:39:52+00:00"
- },
{
"name": "phpoption/phpoption",
"version": "1.9.3",
@@ -3927,55 +3760,6 @@
},
"time": "2024-10-13T11:29:49+00:00"
},
- {
- "name": "psr/cache",
- "version": "3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/cache.git",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
- "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
- "shasum": ""
- },
- "require": {
- "php": ">=8.0.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Cache\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for caching libraries",
- "keywords": [
- "cache",
- "psr",
- "psr-6"
- ],
- "support": {
- "source": "https://github.com/php-fig/cache/tree/3.0.0"
- },
- "time": "2021-02-03T23:26:27+00:00"
- },
{
"name": "psr/clock",
"version": "1.0.0",
@@ -5450,241 +5234,6 @@
],
"time": "2024-12-30T13:13:39+00:00"
},
- {
- "name": "spatie/temporary-directory",
- "version": "2.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/spatie/temporary-directory.git",
- "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
- "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
- "shasum": ""
- },
- "require": {
- "php": "^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.5"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Spatie\\TemporaryDirectory\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Alex Vanderbist",
- "email": "[email protected]",
- "homepage": "https://spatie.be",
- "role": "Developer"
- }
- ],
- "description": "Easily create, use and destroy temporary directories",
- "homepage": "https://github.com/spatie/temporary-directory",
- "keywords": [
- "php",
- "spatie",
- "temporary-directory"
- ],
- "support": {
- "issues": "https://github.com/spatie/temporary-directory/issues",
- "source": "https://github.com/spatie/temporary-directory/tree/2.2.1"
- },
- "funding": [
- {
- "url": "https://spatie.be/open-source/support-us",
- "type": "custom"
- },
- {
- "url": "https://github.com/spatie",
- "type": "github"
- }
- ],
- "time": "2023-12-25T11:46:58+00:00"
- },
- {
- "name": "symfony/cache",
- "version": "v7.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/cache.git",
- "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/cache/zipball/e7e983596b744c4539f31e79b0350a6cf5878a20",
- "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2",
- "psr/cache": "^2.0|^3.0",
- "psr/log": "^1.1|^2|^3",
- "symfony/cache-contracts": "^2.5|^3",
- "symfony/deprecation-contracts": "^2.5|^3.0",
- "symfony/service-contracts": "^2.5|^3",
- "symfony/var-exporter": "^6.4|^7.0"
- },
- "conflict": {
- "doctrine/dbal": "<3.6",
- "symfony/dependency-injection": "<6.4",
- "symfony/http-kernel": "<6.4",
- "symfony/var-dumper": "<6.4"
- },
- "provide": {
- "psr/cache-implementation": "2.0|3.0",
- "psr/simple-cache-implementation": "1.0|2.0|3.0",
- "symfony/cache-implementation": "1.1|2.0|3.0"
- },
- "require-dev": {
- "cache/integration-tests": "dev-master",
- "doctrine/dbal": "^3.6|^4",
- "predis/predis": "^1.1|^2.0",
- "psr/simple-cache": "^1.0|^2.0|^3.0",
- "symfony/clock": "^6.4|^7.0",
- "symfony/config": "^6.4|^7.0",
- "symfony/dependency-injection": "^6.4|^7.0",
- "symfony/filesystem": "^6.4|^7.0",
- "symfony/http-kernel": "^6.4|^7.0",
- "symfony/messenger": "^6.4|^7.0",
- "symfony/var-dumper": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Cache\\": ""
- },
- "classmap": [
- "Traits/ValueWrapper.php"
- ],
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Provides extended PSR-6, PSR-16 (and tags) implementations",
- "homepage": "https://symfony.com",
- "keywords": [
- "caching",
- "psr6"
- ],
- "support": {
- "source": "https://github.com/symfony/cache/tree/v7.2.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-12-07T08:08:50+00:00"
- },
- {
- "name": "symfony/cache-contracts",
- "version": "v3.5.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/cache-contracts.git",
- "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b",
- "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b",
- "shasum": ""
- },
- "require": {
- "php": ">=8.1",
- "psr/cache": "^3.0"
- },
- "type": "library",
- "extra": {
- "thanks": {
- "url": "https://github.com/symfony/contracts",
- "name": "symfony/contracts"
- },
- "branch-alias": {
- "dev-main": "3.5-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Cache\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Generic abstractions related to caching",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "support": {
- "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-09-25T14:20:29+00:00"
- },
{
"name": "symfony/clock",
"version": "v7.2.0",
@@ -7913,82 +7462,6 @@
],
"time": "2024-11-08T15:48:14+00:00"
},
- {
- "name": "symfony/var-exporter",
- "version": "v7.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/var-exporter.git",
- "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d",
- "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d",
- "shasum": ""
- },
- "require": {
- "php": ">=8.2"
- },
- "require-dev": {
- "symfony/property-access": "^6.4|^7.0",
- "symfony/serializer": "^6.4|^7.0",
- "symfony/var-dumper": "^6.4|^7.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\VarExporter\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Allows exporting any serializable PHP data structure to plain PHP code",
- "homepage": "https://symfony.com",
- "keywords": [
- "clone",
- "construct",
- "export",
- "hydrate",
- "instantiate",
- "lazy-loading",
- "proxy",
- "serialize"
- ],
- "support": {
- "source": "https://github.com/symfony/var-exporter/tree/v7.2.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-10-18T07:58:17+00:00"
- },
{
"name": "thecodingmachine/safe",
"version": "v2.5.0",
diff --git a/config/app.php b/config/app.php
index 1a79e6f9..4d5576fb 100755
--- a/config/app.php
+++ b/config/app.php
@@ -146,7 +146,7 @@ return [
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
- ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider::class,
+ // ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider::class,
])->toArray(),
/*
@@ -162,6 +162,6 @@ return [
'aliases' => Facade::defaultAliases()->merge([
// 'Example' => App\Facades\Example::class,
- 'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class,
+ // 'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class,
])->toArray(),
];
diff --git a/database/migrations/2025_01_25_203705_add_total_size_to_series.php b/database/migrations/2025_01_25_203705_add_total_size_to_series.php
new file mode 100644
index 00000000..6b922edb
--- /dev/null
+++ b/database/migrations/2025_01_25_203705_add_total_size_to_series.php
@@ -0,0 +1,25 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration {
+ /**
+ * Run the migrations.
+ */
+ public function up(): void {
+ Schema::table('series', function (Blueprint $table) {
+ $table->unsignedBigInteger('total_size')->default(0);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void {
+ Schema::table('series', function (Blueprint $table) {
+ $table->dropColumn('total_size');
+ });
+ }
+};