function NetPlayer_LoadFiles ($cd_path) {
	  	//Get Directory to Load
	  	SetValue(NP_ID_CDDIRECTORYPATH, $cd_path);

	  	// Get PlayList
	  	$playlist = array();
	  	NetPlayer_GetPlayList ($cd_path, $playlist);
	  	NetPlayer_CopyCoverFile ($cd_path);

	  	// Leeren der vorher bestehenden Playlist:
		$player = NetPlayer_GetIPSComponentPlayer();
		$player->ClearPlaylist();
	  	$tracklist = "";

	   // Durchlaufen des Playlist-Arrays und anhängen an die Mediaplayer-Instanz-Playlist
	   $idx = 1;
	   foreach($playlist as $data)
	   {
	      IPSLogger_Dbg(__file__, "Add File=".$data);
			$player->AddPlaylist($data);
	      $tracklist.='<tr><td><div id="rc_mp_track'.$idx.'" track="'.$idx.'" class="containerControlTrack">'.convert(basename($data))."</div></td></tr>";
	      $idx++;
	   }
	   SetValue(NP_ID_CDTRACKLISTHTML, $tracklist);
		$player->Play();

	   $Directory = basename($cd_path);
	   SetValue(NP_ID_CDINTERPRET, substr($Directory,0,strpos($Directory, "[")));
	   SetValue(NP_ID_CDALBUM, substr($Directory,strpos($Directory, "[")+1, strpos($Directory, "]")-strpos($Directory, "[")-1));
   }
Esempio n. 2
0
	function NetPlayer_GetTrackList() {
		$directory = GetValue(NP_ID_CDDIRECTORYPATH);
		$fileList = array();
		NetPlayer_GetPlayList($directory, $fileList);
		$trackList = array();
		foreach ($fileList as $idx=>$file) {
			$trackList[] = NetPlayer_GetTrackName($file);
		}

		return $trackList;
	}