Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

4.1.1.1 Media and File

Jose Erick Carreon edited this page Apr 22, 2019 · 4 revisions

How access to Media and File?

Access to Media

// First get media instantiate.
$media = $server->getLibrary()->getSection('TV Shows')->get('Breaking Bad')->getMedia();

$media->getId();
$media->getDuration();
$media->getBitrate();
$media->getWidth();
$media->getHeight();
$media->getAspectRatio();
$media->getVideoResolution();
$media->getContainer();
$media->getVideoFrameRate();
$media->getFiles();

Access to File

// First get file instantiate.
$file = $server->getLibrary()->getSection('TV Shows')->get('Breaking Bad')->getMedia()->getFiles()[0];

$file->getId();
$file->getKey();
$file->getDuration();
$file->getFile();
$file->getSize();
$file->getContainer();
Clone this wiki locally