DOWNLOADS EXAMPLES SKINS DOCS SUPPORT
 
 

Playlist Item Order

 

Option 1:

You can run Wimpy MP3 Player, and Wimpy AV off of an XML playlist rather than PHP / ASP / CFM. Use Playlister to generate a custom XML playlist or your can create an XML playlist manually. Click here for example XML playlists.

Option 2:

Rename your files so there is a number at the front of the name....

Example:
1-mysong-C.mp3
2-mysong-B.mp3
3-mysong-A.mp3

Option 3:

Wimpy PHP and Wimpy ASP offer two sorting options:

1. Ascending
2. Descending

By default, the playlist is sorted ascending according to alpha-numeric A-Z,  0-9 -- top to bottom based on the file name.  You can flip this so that the order is Descending, Z-A, 9-0 Bottom to top by editing the wimpy.php/asp variable named fileSortOrder. To do so, open wimpy.php/asp up in a text editor and set fileSortOrder to "des" -- there are additional instructions and examples into he comments of the wimpy.php/asp file. as:

// fileSortOrder
// Controls the sort order of how the files should be listed.
// Can be set to:
//"asc" - sort the files in alphabetically ascending order (A-Z)
//"des" - sort the files in alphabetically descending order (Z-A)
//
//$fileSortOrder = "des";
$fileSortOrder = "asc";

Option 4:

You can "mask" a portion of the file name that appears in Wimpy MP3 Player. This allows you to use a portion of the file name to establish an order, and the other part of the filename to display in the player.

The following file name examples...

20060831.mysong-C.mp3
20060815.mysong-B.mp3
20060801.mysong-A.mp3

... would appear within Wimpy MP3 Player as:

mysong-C
mysong-B
mysong-A

 

NOTES:

This feature can be confusing and may or may not work depending on how the web server, PHP are configured on the server. Also, this is dependent on whether ID3 tag information is extracted from each MP3 file.

If using the "ID3" reading option (where embedded ID3 information about the song, artist, album), then the items will appear within the player according to the filename order, not the title of the track. Hence, you will have to rename the filenames in order to achieve the proper order within the player.

One trick with is to use the "Masking filenames" feature. See "Masking Filenames".

When running Wimpy in automatic mode (where the list of files to be played are retrieved from the server automatically) the server returns the list in typical alpha-numeric order (e.g. A-Z, 1-9). The list is returned the same way that the list would appear in a folder on your local computer.

The weird thing is that each kind of machine will arrange A-Z and 1-9 differently. For example, some machines will recognize capital letters as having precedence over lower case, and so, file names that begin with upper case letters are sorted after lower case letters. The way sorting is handled varies from machine to machine and there is no way to automatically determine how sorting is handled.

Example:

a
b
c
A
B
C

Some machines will intermingle upper and lower case.

Example:

a
A
b
B
c
C

Another issue is with how the machine sorts numbers. When it comes to file names, the characters that constitute a filename are recognized as alphabetical characters -- not integer type numbers. So when a number appears in a filename, the machine evaluates numbers as individual characters, as you would expect it to evaluate individual letters.

When sorting alphabetically, each character is evaluated in order, one character at a time.
Example:

aa
aaa
ab
abb

As you can see, each character is evaluated in order to determine the proper sorting. If numbers are used within the filename, each character is evaluated one at a time:

On some machines, the order would appear as:

11
112
12
122

... because each number character is evaluated using alphabet type characters for the numbers, not integer, math-like characters.

One way to overcome this type of behavior is to use the same number of characters for each number as:

011
012
112
122

By using a zero in front of the lower numbers.

Some machine take into consideration the "human" recognition that the number 12 is lower than 112, and subsequently sort the list for humans as:

11
12
112
122

 

 

See Also:

Masking Filenames

 

 

 

 

 

 

 

  ©Copyright Plaino LLC. All rights reserved.