A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
Add Meta Data to Videos Job
aminnausin73a0a19bf8dd
diff --git a/app/Http/Controllers/DirectoryController.php b/app/Http/Controllers/DirectoryController.phpindex 7b9c8385..68889d71 100644--- a/app/Http/Controllers/DirectoryController.php+++ b/app/Http/Controllers/DirectoryController.php@@ -7,6 +7,7 @@ use App\Http\Resources\FolderResource;use App\Http\Resources\VideoResource;use App\Jobs\IndexFiles;use App\Jobs\SyncFiles;+use App\Jobs\VerifyFiles;use App\Models\Category;use App\Models\Folder;use App\Models\Video;@@ -150,6 +151,16 @@ class DirectoryController extends Controllerdump($th);}}++ public function verifyFiles(Request $request){+ try {+ VerifyFiles::dispatch();+ dump('success');+ } catch (\Throwable $th) {+ dump('Error cannot index files');+ dump($th);+ }+ }// public function generateDirectory(Request $request) {// $dir = $request->dir;// $mediaRoot = '/media/';diff --git a/app/Jobs/VerifyFiles.php b/app/Jobs/VerifyFiles.phpnew file mode 100644index 00000000..fbb760cd--- /dev/null+++ b/app/Jobs/VerifyFiles.php@@ -0,0 +1,88 @@+<?php++namespace App\Jobs;++use App\Models\Record;+use App\Models\Video;+use Illuminate\Bus\Queueable;+use Illuminate\Contracts\Queue\ShouldQueue;+use Illuminate\Foundation\Bus\Dispatchable;+use Illuminate\Queue\InteractsWithQueue;+use Illuminate\Queue\SerializesModels;+use FFMpeg\FFProbe as FFMpegFFProbe;++class VerifyFiles implements ShouldQueue+{+ use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;++ /**+ * Create a new job instance.+ */+ public function __construct()+ {+ //+ }++ /**+ * Execute the job.+ */+ public function handle(): void+ {+ //+ Video::orderBy('id')->chunk(100, function ($videos) {+ $transactions = array();+ foreach ($videos as $video) {+ try {+ $stored = array();+ $changes = array();++ $stored = $video->toArray();++ preg_match('![sS][0-9]+!', $stored['name'], $seasonRaw);+ preg_match('![eE][0-9]+!', $stored['name'], $episodeRaw);+ preg_match('![0-9]+!', $seasonRaw[0] ?? '', $season);+ preg_match('![0-9]+!', $episodeRaw[0] ?? '', $episode);+++ if(is_null($video->duration)){+ $ffprobe = FFMpegFFProbe::create();+ $duration = ceil($ffprobe+ ->format($video->path) // extracts file informations+ ->get('duration'));+ $changes['duration'] = $duration;+ }+++ if(is_null($video->season) && count($season) == 1) $changes['season'] = (int)$season;+ if(is_null($video->episode) && count($episode) == 1) $changes['episode'] = (int)$episode;+ if(is_null($video->season) && count($season) == 1) $changes['season'] = (int)$season;++ if(is_null($video->title)){+ $newTitle = count($season) == 1 ? 'S' . $season[0] : '';+ $newTitle .= count($episode) == 1 ? 'E' . $episode[0] : '';++ if($newTitle != '') $changes['title'] = $newTitle;+ }++ is_null($video->view_count) ? $changes['view_count'] = Record::where('video_id', $video->id)->count() : $stored['view_count'] = $video->view_count;+++ // $video->update($changes);+ if(count($changes) > 0){+ array_push($transactions, [...$stored, ...$changes]);+ dump([...$stored, ...$changes]);+ dump($changes);+ }++ } catch (\Throwable $th) {+ //throw $th;+ dump('errir ' . $th->getMessage());+ break;+ }+ }++ Video::upsert($transactions, 'id', ['title','duration','season','episode','view_count']);+ });+ }+}+diff --git a/app/Models/Video.php b/app/Models/Video.phpindex 18b6fb5d..03bcfaac 100644--- a/app/Models/Video.php+++ b/app/Models/Video.php@@ -12,6 +12,13 @@ class Video extends Modelpublic $timestamps = false;+ protected $fillable = [+ 'title',+ 'duration',+ 'episode',+ 'season',+ 'view_count'+ ];public function folder(): BelongsTo{return $this->belongsTo(Folder::class);}diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.phpindex 7ae26b96..f4186133 100644--- a/bootstrap/cache/packages.php+++ b/bootstrap/cache/packages.php@@ -59,6 +59,17 @@0 => 'Termwind\\Laravel\\TermwindServiceProvider',),),+ 'pbmedia/laravel-ffmpeg' =>+ array (+ 'providers' =>+ array (+ 0 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',+ ),+ 'aliases' =>+ array (+ 'FFMpeg' => 'ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg',+ ),+ ),'spatie/laravel-ignition' =>array ('providers' =>diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.phpindex 9113711b..8e2f79ec 100644--- a/bootstrap/cache/services.php+++ b/bootstrap/cache/services.php@@ -31,11 +31,13 @@27 => 'Carbon\\Laravel\\ServiceProvider',28 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',29 => 'Termwind\\Laravel\\TermwindServiceProvider',- 30 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',- 31 => 'App\\Providers\\AppServiceProvider',- 32 => 'App\\Providers\\AuthServiceProvider',- 33 => 'App\\Providers\\EventServiceProvider',- 34 => 'App\\Providers\\RouteServiceProvider',+ 30 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',+ 31 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',+ 32 => 'App\\Providers\\AppServiceProvider',+ 33 => 'App\\Providers\\AuthServiceProvider',+ 34 => 'App\\Providers\\EventServiceProvider',+ 35 => 'App\\Providers\\RouteServiceProvider',+ 36 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',),'eager' =>array (@@ -55,11 +57,13 @@13 => 'Carbon\\Laravel\\ServiceProvider',14 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',15 => 'Termwind\\Laravel\\TermwindServiceProvider',- 16 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',- 17 => 'App\\Providers\\AppServiceProvider',- 18 => 'App\\Providers\\AuthServiceProvider',- 19 => 'App\\Providers\\EventServiceProvider',- 20 => 'App\\Providers\\RouteServiceProvider',+ 16 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',+ 17 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',+ 18 => 'App\\Providers\\AppServiceProvider',+ 19 => 'App\\Providers\\AuthServiceProvider',+ 20 => 'App\\Providers\\EventServiceProvider',+ 21 => 'App\\Providers\\RouteServiceProvider',+ 22 => 'ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider',),'deferred' =>array (diff --git a/composer.json b/composer.jsonindex d10b8573..dff9156e 100644--- a/composer.json+++ b/composer.json@@ -10,7 +10,8 @@"guzzlehttp/guzzle": "^7.2","laravel/framework": "^11.10.0","laravel/sanctum": "^4.0.2",- "laravel/tinker": "^2.8"+ "laravel/tinker": "^2.8",+ "pbmedia/laravel-ffmpeg": "^8.5"},"require-dev": {"barryvdh/laravel-debugbar": "^3.13.5",diff --git a/composer.lock b/composer.lockindex 6d4a5b58..1f485873 100644--- 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": "bc71f492bbf8177354e8baa36f48005e",+ "content-hash": "41ef1c1e1c445d8795738c0a60ee9804","packages": [{"name": "appstract/laravel-opcache",@@ -568,6 +568,53 @@],"time": "2023-10-06T06:47:41+00:00"},+ {+ "name": "evenement/evenement",+ "version": "v3.0.2",+ "source": {+ "type": "git",+ "url": "https://github.com/igorw/evenement.git",+ "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc",+ "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc",+ "shasum": ""+ },+ "require": {+ "php": ">=7.0"+ },+ "require-dev": {+ "phpunit/phpunit": "^9 || ^6"+ },+ "type": "library",+ "autoload": {+ "psr-4": {+ "Evenement\\": "src/"+ }+ },+ "notification-url": "https://packagist.org/downloads/",+ "license": [+ "MIT"+ ],+ "authors": [+ {+ "name": "Igor Wiedler",+ "email": "[email protected]"+ }+ ],+ "description": "Événement is a very simple event dispatching library for PHP",+ "keywords": [+ "event-dispatcher",+ "event-emitter"+ ],+ "support": {+ "issues": "https://github.com/igorw/evenement/issues",+ "source": "https://github.com/igorw/evenement/tree/v3.0.2"+ },+ "time": "2023-08-08T05:53:35+00:00"+ },{"name": "fruitcake/php-cors","version": "v1.3.0",@@ -2442,6 +2489,173 @@],"time": "2024-03-06T16:17:14+00:00"},+ {+ "name": "pbmedia/laravel-ffmpeg",+ "version": "8.5.0",+ "source": {+ "type": "git",+ "url": "https://github.com/protonemedia/laravel-ffmpeg.git",+ "reference": "44f260839e68ce8c785d502f99b998729cdb5321"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/protonemedia/laravel-ffmpeg/zipball/44f260839e68ce8c785d502f99b998729cdb5321",+ "reference": "44f260839e68ce8c785d502f99b998729cdb5321",+ "shasum": ""+ },+ "require": {+ "illuminate/contracts": "^10.0|^11.0",+ "php": "^8.1|^8.2|^8.3",+ "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": {+ "providers": [+ "ProtoneMedia\\LaravelFFMpeg\\Support\\ServiceProvider"+ ],+ "aliases": {+ "FFMpeg": "ProtoneMedia\\LaravelFFMpeg\\Support\\FFMpeg"+ }+ }+ },+ "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.5.0"+ },+ "funding": [+ {+ "url": "https://github.com/pascalbaljet",+ "type": "github"+ }+ ],+ "time": "2024-03-12T11:20:32+00:00"+ },+ {+ "name": "php-ffmpeg/php-ffmpeg",+ "version": "v1.2.0",+ "source": {+ "type": "git",+ "url": "https://github.com/PHP-FFMpeg/PHP-FFMpeg.git",+ "reference": "785a5ba05dd88b3b8146f85f18476b259b23917c"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/zipball/785a5ba05dd88b3b8146f85f18476b259b23917c",+ "reference": "785a5ba05dd88b3b8146f85f18476b259b23917c",+ "shasum": ""+ },+ "require": {+ "evenement/evenement": "^3.0",+ "php": "^8.0 || ^8.1 || ^8.2 || ^8.3",+ "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"+ },+ "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.2.0"+ },+ "time": "2024-01-02T10:37:01+00:00"+ },{"name": "phpoption/phpoption","version": "1.9.2",@@ -2517,6 +2731,55 @@],"time": "2023-11-12T21:59:55+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",@@ -3233,6 +3496,240 @@],"time": "2024-04-27T21:32:50+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.1.3",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/cache.git",+ "reference": "8ac37acee794372f9732fe8a61a8221f6762148e"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/cache/zipball/8ac37acee794372f9732fe8a61a8221f6762148e",+ "reference": "8ac37acee794372f9732fe8a61a8221f6762148e",+ "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/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.1.3"+ },+ "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-07-17T06:10:24+00:00"+ },+ {+ "name": "symfony/cache-contracts",+ "version": "v3.5.0",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/cache-contracts.git",+ "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/df6a1a44c890faded49a5fca33c2d5c5fd3c2197",+ "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197",+ "shasum": ""+ },+ "require": {+ "php": ">=8.1",+ "psr/cache": "^3.0"+ },+ "type": "library",+ "extra": {+ "branch-alias": {+ "dev-main": "3.5-dev"+ },+ "thanks": {+ "name": "symfony/contracts",+ "url": "https://github.com/symfony/contracts"+ }+ },+ "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.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-04-18T09:32:20+00:00"+ },{"name": "symfony/clock","version": "v7.1.1",@@ -5534,6 +6031,82 @@],"time": "2024-05-31T14:57:53+00:00"},+ {+ "name": "symfony/var-exporter",+ "version": "v7.1.2",+ "source": {+ "type": "git",+ "url": "https://github.com/symfony/var-exporter.git",+ "reference": "b80a669a2264609f07f1667f891dbfca25eba44c"+ },+ "dist": {+ "type": "zip",+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c",+ "reference": "b80a669a2264609f07f1667f891dbfca25eba44c",+ "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.1.2"+ },+ "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-06-28T08:00:31+00:00"+ },{"name": "tijsverkoyen/css-to-inline-styles","version": "v2.2.7",diff --git a/config/app.php b/config/app.phpindex acc66db5..ded9818c 100644--- a/config/app.php+++ b/config/app.php@@ -168,6 +168,7 @@ return [// App\Providers\BroadcastServiceProvider::class,App\Providers\EventServiceProvider::class,App\Providers\RouteServiceProvider::class,+ ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider::class,])->toArray(),/*@@ -183,6 +184,7 @@ return ['aliases' => Facade::defaultAliases()->merge([// 'Example' => App\Facades\Example::class,+ 'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class])->toArray(),];diff --git a/config/laravel-ffmpeg.php b/config/laravel-ffmpeg.phpnew file mode 100644index 00000000..25b8913a--- /dev/null+++ b/config/laravel-ffmpeg.php@@ -0,0 +1,21 @@+<?php++return [+ 'ffmpeg' => [+ 'binaries' => env('FFMPEG_BINARIES', 'ffmpeg'),++ 'threads' => 12, // set to false to disable the default 'threads' filter+ ],++ 'ffprobe' => [+ 'binaries' => env('FFPROBE_BINARIES', 'ffprobe'),+ ],++ 'timeout' => 3600,++ 'log_channel' => env('LOG_CHANNEL', 'stack'), // set to false to completely disable logging++ 'temporary_files_root' => env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir()),++ 'temporary_files_encrypted_hls' => env('FFMPEG_TEMPORARY_ENCRYPTED_HLS', env('FFMPEG_TEMPORARY_FILES_ROOT', sys_get_temp_dir())),+];diff --git a/database/migrations/2024_07_28_222604_add_meta_data_to_videos_table.php b/database/migrations/2024_07_28_222604_add_meta_data_to_videos_table.phpindex 92ecdf34..e5f4bfc0 100644--- a/database/migrations/2024_07_28_222604_add_meta_data_to_videos_table.php+++ b/database/migrations/2024_07_28_222604_add_meta_data_to_videos_table.php@@ -13,8 +13,7 @@ return new class extends Migration{Schema::table('videos', function (Blueprint $table) {//- $table->integer('date_raw')->nullable()->after('date');- $table->string('title')->nullable();+ $table->string('title')->nullable()->after('date');$table->integer('duration')->nullable();$table->integer('episode')->nullable();$table->integer('season')->nullable();@@ -29,7 +28,6 @@ return new class extends Migration{Schema::table('videos', function (Blueprint $table) {//- $table->dropColumn('date_raw');$table->dropColumn('title');$table->dropColumn('duration');$table->dropColumn('episode');diff --git a/routes/web.php b/routes/web.phpindex 5ec10261..470cd241 100644--- a/routes/web.php+++ b/routes/web.php@@ -17,12 +17,13 @@ use App\Http\Controllers\DirectoryController;Route::get('login', [AuthController::class, 'create'])->name('login');Route::post('login', [AuthController::class, 'login'])->name('login');+Route::get('/jobs/verifyFiles', [DirectoryController::class, 'verifyFiles']);+Route::get('/jobs/syncFiles', [DirectoryController::class, 'syncFiles']);// privateRoute::middleware('auth')->group(function () {Route::get('/jobs/indexFiles', [DirectoryController::class, 'indexFiles']);- Route::get('/jobs/syncFiles', [DirectoryController::class, 'syncFiles']);});// public