Auto Playlist

An alternative to creating playlists manually is to use the "autoplaylist.php" file, which (as the name implies) automatically creates playlists based on the contents of a directory.

Simply upload the autoplaylist.php file to a fodler full of media files. The autoplaylist.php file will automatically discover any media files that are located in the same folder as autoplaylist.php.

Click here to download auto playlist.

The autoplaylist.php file is used in the same manor that a text-based playlist or an XML playlist is used within Pickle. Simply set data-media to the location of "autoplaylist.php"

Example:

<div data-media="http://path/to/autoplaylist.php"></div>

 

NOTE: Currently, autoplaylist.php is only available for servers that are PHP enabled. If you don't understand what a PHP enabled server is, contact your web hosting provider and ask them if your website runs PHP.

Use autoplaylist.php to create static files

If you don't plan on changing the contents of a given directory often, or to reduce server processing load, you can use autoplaylist.php to create static XML or text-based playlist files.

Simply navigate to autoplaylist.php on your server, then save the results as an XML file and upload to your server.

Example: Using a web browser, enter the URL to autoplaylist.php and add the query string:

http://path/to/autoplaylist.php

 

Features and Options

There are a number of options and cool features available within autoplaylist.php.

Folder Navigation
If there are sub-folders located in the same folder as autoplaylist, these sub-folders will appear within Pickle, and users can navigate through the sub-folders.

Poster Art Discovery
Auto Playlist can automatically discover poster images associated with your media files. Simply upload a JPG file that has the same "base name" as the media file.

Example

Let say your media file is located here:

http://www.yoursite.com/media/track1.mp3

If you upload a JPG image to the same folder and use the same "base name" of "track1" as follows:

http://www.yoursite.com/media/track1.jpg

... Then Auto Playlist will automatically incorporate the image into the playlist and Pickle will display that image as the poster graphic or cover art.

You can change the default extension from JPG to PNG by edting the "defaultVisualExt" option within autoplaylist.php.

Playlist Kind
There are two kinds of playlists autoplaylist.php can generate: XML or Text-based playlists. The benefit of XML playlists is that more information, such as poster image, artist, and track title can be included and displayed within Pickle. When using a text-based playlist, Pickle only has the file name to work with, hence, the track title that is displayed in the player will be the filename.

There are two methods for setting the playlist kind.
1) Edit the configuration variable "playlistKind" within autoplaylist.php
2) Tack on a query string to the end of the filename.

Example:

<div data-media="http://path/to/autoplaylist.php?kind=xml"></div>

--OR--


<div data-media="http://path/to/autoplaylist.php?kind=txt"></div>

 

Configuration Options

The following options can be sonfigured by editing the autoplaylist.php file's configuration variables, which are located toward th top of the autoplaylist.php file.

Default Image Extension
The default poster (cover art) image extension to search for:
$defaultVisualExt = "jpg";

Media Types
The kinds of files to search for:
$media_types = "mp4,m4a,m4p,aac,mp3";

Hide Keywords
Files containing these keywords will be ignored.
$hide_keywords = "skin,pickle,config,customizer,source,plugin";

Hide Folders
A list of folder names to ignore.
$hide_folders = "_notes,skins,getid3,_private,_private,_vti_bin,_vti_cnf,_vti_pvt,_vti_txt,cgi-bin";

Hide Files
A list of file names to ignore.
$hide_files = "";

Find All Media
This will cause autoplaylist.php to recursively search through all subdirectoies. To enable this feature, "findAllMedia" must be set to "false"
$findAllMediaBlock = false;

HTTP Option
Allows you to run pickle in "https" mode;
$httpOption = "http";

Get ID3 Info
Will extract ID3 information from MP3 files. Requires the getid3 library.
$getMyid3info = "no";

Sorting
Two options: sortOrder (ascending or descending) and sortIndex (sort on filename, date, artist or title).