Ejemplo n.º 1
0
 public function __construct($FileName, $RootMenuNo = -1)
 {
     self::$NoInstances++;
     $this->Value[InstanceNo] = self::$NoInstances;
     $this->Value[File] = new SplFileInfo($FileName);
     $xml = simplexml_load_file(ProtectPath($this->Value[File]->getPathname()));
     foreach ($xml->children() as $info) {
         $this->Value[$info->getName()] = (string) $info;
     }
     $this->Value[Path] = explode("/", RelativePath($this->Value[Playlist]));
     $this->Value[RootMenuNo] = $RootMenuNo;
     //print_r($this->Value);
 }
Ejemplo n.º 2
0
 public function PresetURL($preset)
 {
     $this->PresetURLStmt()->bindValue(":q1", $preset);
     $result = $this->PresetURLStmt()->execute();
     $R = array();
     $i = 0;
     while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
         $R[$i] = $row;
         $i++;
     }
     $this->PresetURLStmt()->reset();
     return AbsolutePath(ProtectPath($R[0][URI]));
 }
Ejemplo n.º 3
0
 public function getDIDL()
 {
     $this->Arr[TrackURI] = ProtectPath(RelativePath($this->Arr[FileNamePath]));
     if (file_exists(pathinfo($this->Arr[FileNamePath], PATHINFO_DIRNAME) . "/folder.png")) {
         $this->Arr[AlbumArtURI] = ProtectPath(RelativePath(pathinfo($this->Arr[FileNamePath], PATHINFO_DIRNAME) . "/folder.png"));
     } else {
         $this->Arr[AlbumArtURI] = ProtectPath(RelativePath(pathinfo($this->Arr[FileNamePath], PATHINFO_DIRNAME) . "/folder.jpg"));
     }
     return DIDL_Song($this->Arr[TrackURI], $this->Arr[AlbumArtURI], $this->Arr[Artist], $this->Arr[AlbumArtist], $this->Arr[Album], $this->Arr[Title], $this->Arr[Date], $this->Arr[Genre], $this->Arr[TrackNo], $this->Arr[Duration], $this->Arr[DiscNo], $this->Arr[DiscCount], $this->Arr[BitRate], $this->Arr[SampleRate], $this->Arr[BitsPerSample], $this->Arr[FileSize]);
 }