View Single Post
Posts: 1,048 | Thanked: 1,127 times | Joined on Jan 2010 @ Amsterdam
#10
Originally Posted by zzzchainzzz View Post
Is there a way to make media player scan SPECIFIC folders eg. music and video folders only?

I wrote a bit of a terminal script, for a friend that loves the playlists. It's rudimentary, at best, but it works.

Place it somewhere convenient.

Code:
#!/bin/sh

LOCATIE="${PWD}"
        clear
        echo -n "What editor would you like to use to view the playlist? "
        
    read var1  # Opmerking, GÉÉN '$' voor var1, want deze wordt aangemaakt.

        echo
        echo -n "What type of playlist would you like to create? (lst, pls, m3u, etc3)"

    read var2 

        echo
        echo
        echo -n "     Caution, only one                                             "
        echo
        echo -n "     choice can be                                          "
        echo
        echo -n "     made.                                            "
        echo
        echo
        echo -n " What file format do you wish to include? e.g. mp3, wma, wav, mid, *  "
    
    read var3 

    clear

        echo " "
        echo "DONE!"
        echo " "
        echo "Script results"
        echo " "
        echo " "
        printf "· Current directory · " && pwd
        echo " "
        echo " Editor = $var1"
        echo " Type playlist = $var2"
        echo " Type of file = $var3"
        echo
        echo

    find "${LOCATIE}" -type f -name "*.$var3" ! -name "*.txt" ! -name "*.jpg" ! -name "*.png" ! -name "*.gif" ! -name "*.doc"  ! -name "*.rtf"| sort > playlist.$var2

    echo "The playlist has been generated: "
    ls *.$var2 
        
#    echo "$PLAYLISTBESTAAT"
            echo
        echo
        echo
        echo "Press any key to open the playlist" 
        echo
    read

    $var1 playlist.$var2 &

exit 0
 

The Following User Says Thank You to anthonie For This Useful Post: