havenstd06 / laravel-jellyfin
A Laravel package that allows access to the API of your Jellyfin server.
v0.1
2023-01-04 00:10 UTC
Requires
- php: ^8.0
- ext-curl: *
- guzzlehttp/guzzle: ~7.0
- illuminate/support: ~6.0|~7.0|~8.0|~9.0
- nesbot/carbon: ~2.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
- symfony/var-dumper: ~5.0
This package is not auto-updated.
Last update: 2025-01-30 08:35:41 UTC
README
A Laravel package that allows access to the API of your Jellyfin server.
Features
The only sections available at the moment are:
- Library
- System
- User
Refer to Jellyfin API Doc
Installation
composer require havenstd06/laravel-jellyfin
Publish Assets
php artisan vendor:publish --provider="Havenstd06\LaravelJellyfin\Providers\JellyfinServiceProvider"
Configuration
After publishing the assets, add the following to your .env files .
# Jellyfin API JELLYFIN_SERVER_URL= JELLYFIN_TOKEN= JELLYFIN_APPLICATION= JELLYFIN_VALIDATE_SSL=true
Configuration File
The configuration file jellyfin.php is located in the config folder. Following are its contents when published:
return [ 'server_url' => env('JELLYFIN_SERVER_URL', ''), // Jellyfin Server URL (ex: https://[IP address]:8096 or https://domain.com) 'token' => env('JELLYFIN_TOKEN', ''), 'application' => env('JELLYFIN_APPLICATION', 'Laravel Jellyfin / v1.0'), // Jellyfin application name 'version' => env('JELLYFIN_VERSION', '10.8.8'), // (Jellyfin application version number) 'validate_ssl' => env('JELLYFIN_VALIDATE_SSL', true), // Validate SSL when creating api client. ];
Usage
Initialization
use Havenstd06\LaravelJellyfin\Services\Jellyfin as JellyfinClient; $provider = new JellyfinClient;
Override Configuration
You can override Jellyfin API configuration by calling setApiCredentials method:
$config = [ 'server_url' => 'https://example.com', 'token' => 'your-token', 'application' => 'your-client-application-name', // optional 'version' => 'your-version', // optional 'validate_ssl' => true, ]; $provider->setApiCredentials($config);
Acknowledgements
License
Contributing
Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.