Esempio n. 1
0
 /**
  * Fetches the NFO for the movie id $AllocineId
  *
  * @param string AllocineId
  * @return array(nfo => string))
  */
 public function doSaveNfo($allocineId, $movieFolder)
 {
     $scraper = new MkvManagerScraperAllocine();
     $infos = $scraper->getMovieDetails($allocineId);
     $writer = new \mm\Xbmc\Nfo\Writers\Movie($infos);
     $nfoPath = ezcConfigurationManager::getInstance()->getSetting('movies', 'GeneralSettings', 'SourcePath') . DIRECTORY_SEPARATOR . $movieFolder . DIRECTORY_SEPARATOR . "{$movieFolder}.nfo";
     return array('nfo' => $writer->write($nfoPath));
 }
Esempio n. 2
0
    public function testWrite()
    {
        $file = 'tmp/tests/' . __METHOD__ . '.nfo';

        $info = $this->getInfoObject();
        $nfoWriter = new mm\Xbmc\Nfo\Writers\Movie( $info );
        $nfoWriter->write( $file );

        self::assertFileEquals( $this->referenceFile, $file );
    }