Hide directory on playlist and only show file names.

Feature requests for VLC.
JimmyRcom
Blank Cone
Blank Cone
Posts: 16
Joined: 02 Aug 2007 17:43

Hide directory on playlist and only show file names.

Postby JimmyRcom » 02 Aug 2007 18:41

Sometimes the directory listings are pretty long. It would be much more convenient to have the option to hide the directory and only show the filename.

CloudStalker
Big Cone-huna
Big Cone-huna
Posts: 2581
Joined: 14 Jan 2007 19:00
VLC version: OVER 9000!!!
Operating System: It's...blue screen
Location: Heaven? No no. What's that other place that starts with an "H"? Oh yes: Home. ^_^

Re: Hide directory on playlist and only show file names.

Postby CloudStalker » 02 Aug 2007 18:55

Improvments for this have been made in the nightly builds (trunk).

JimmyRcom
Blank Cone
Blank Cone
Posts: 16
Joined: 02 Aug 2007 17:43

Re: Hide directory on playlist and only show file names.

Postby JimmyRcom » 02 Aug 2007 19:01

Excellent, thank you. XD

JimmyRcom
Blank Cone
Blank Cone
Posts: 16
Joined: 02 Aug 2007 17:43

Re: Hide directory on playlist and only show file names.

Postby JimmyRcom » 02 Aug 2007 19:13

I downloaded the nightly build from yesterday 20070801. I can't find any options to hide the directory for the playlist items. Is it a command line option?

JimmyRcom
Blank Cone
Blank Cone
Posts: 16
Joined: 02 Aug 2007 17:43

Re: Hide directory on playlist and only show file names.

Postby JimmyRcom » 04 Aug 2007 08:06

ok I wrote a small php code that scans the videolan directory for m3u files and adds an "EXTINF" title based on the file name (to hide the directories). I can't really check how long the file is so I entered -1 so it hides the time, but that settings is intended for streams. I really don't expect this to be used but at least it will be a personal reference in case I forget where the file is.

Code: Select all

<? // Written by Jimmy Ruska (jimmyr.com) Aug 4 2007 // Backup your playlists before you use this. It's not recursive. // Because the directory structure is different in linux I added commented out code. /********************************************************************************************** This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. **********************************************************************************************/ // $dir="/home/you/playlists/"; $dir = "C:\\Program Files\\VideoLan\\VLC\\"; $dh = opendir($dir) or die ("could not open dir"); while ( !(($file = readdir($dh)) === false)){ if (!(eregi("\.m3u$",$file))) continue; $path="$dir\\$file"; @$handle = fopen("$path", "rb"); $contents = stream_get_contents($handle); if (ereg("EXTINF",$contents)){ echo "Already Processed - $path\n"; continue; } // preg_match_all('|.*[^/]+\n|i', $contents, $return); preg_match_all('|.*[^\\\]+\n|i', $contents, $return); $numElements = count($return[0]); $remade=""; for($counter=0; $counter < $numElements; $counter++) { if (ereg("^C\:",$return[0][$counter])) $remade.=ereg_replace("_"," ",preg_replace("|.*\\\([^\\\]+)\.[A-z]{2,4}|i","#EXTINF:-1,\\1",$return[0][$counter])); // $remade.=ereg_replace("_"," ",preg_replace("|.*/([^/]+)\.[A-z]{2,4}|i","#EXTINF:-1,\\1",$return[0][$counter])); $remade.=$return[0][$counter]; } $open = fopen($path, "wb"); fwrite($open, $remade); fclose($open); echo "Finished Processing - $path\n"; } ?>



you don't need apache installed just php.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests