diff --git a/src/Folders/AnalyzeDcp.php b/src/Folders/AnalyzeDcp.php index 5c4cd0b..971350d 100644 --- a/src/Folders/AnalyzeDcp.php +++ b/src/Folders/AnalyzeDcp.php @@ -74,17 +74,8 @@ private static function detectType(DcpFile $dcpFile): Type if (stripos($dcpFile->name, 'pcm') !== false) { return Type::Sound; } - if (stripos($dcpFile->name, 'video') !== false) { - return Type::Picture; - } - if (stripos($dcpFile->name, 'image') !== false) { - return Type::Picture; - } - if (stripos($dcpFile->name, 'j2c') !== false) { - return Type::Picture; - } - return Type::Picture; + } if ($extension === 'cpl') { return Type::CPL; diff --git a/tests/Folders/AnalyzeDcpTest.php b/tests/Folders/AnalyzeDcpTest.php index 49e4fd7..11284a3 100644 --- a/tests/Folders/AnalyzeDcpTest.php +++ b/tests/Folders/AnalyzeDcpTest.php @@ -22,4 +22,20 @@ public function testSimple() $this->assertNotEmpty($dcpObject->AssetMap); $this->assertNotEmpty($dcpObject->VolIndex); } + + /** + * @throws InputMissingException + */ + public function testWeirdCase1() + { + $dcpFolder = '/mnt/c/Users/forretp/Dropbox/Spottix/Ingest/Examples/Brightfish/DCP_LargoWinch3'; + $dcpObject = AnalyzeDcp::simple($dcpFolder); + $this->assertNotEmpty($dcpObject->mxfVideo); + $this->assertNotEmpty($dcpObject->mxfAudio); + $this->assertNotEmpty($dcpObject->cplFile); + $this->assertNotEmpty($dcpObject->pklFile); + $this->assertNotEmpty($dcpObject->AssetMap); + $this->assertNotEmpty($dcpObject->VolIndex); + + } }