Go Back   Winamp Forums > Winamp > Winamp Bug Reports

Reply
Thread Tools Search this Thread Display Modes
Old 18th July 2008, 18:59   #1
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
metadata not returned for long filenames by Pledit..x

When a filename (name+path) exceeds about 64 characters Pledit.getmetadata does not properly return the data.

This was found after a clean install and is fully reproduceable.

To reproduce:
1. Insert into pledit-normal.xml
<text
id="PLtest"
default="TEST"
x="174" y="4" w="64" h="16"
font="ariel"
align="left"
valign="top"
fontsize="16"
color="font.display"
/>
after
<button
id="pl.misc" ...
2. Modify pledit.m
---------------------------------------------
#include <lib/std.mi>
#include <lib/pldir.mi>
#include "attribs.m"

Global Layout pl_normal;
Global Layout pl_shade;
Global text PLtest;
Global PlEdit PeListener;
Global Group frameGroup;

System.onScriptLoaded() {
initAttribs();
menubar_pe_attrib.onDataChanged();
pl_normal = getScriptGroup().getParentLayout();
PeListener = new PlEdit;
frameGroup = getScriptGroup();
PLtest = frameGroup.findObject("PLtest");
}
PLtest.onLeftButtonUp(int x, int y) {
int ccount = System.getPlaylistLength()-1;
int cIndex = 0;
while (cIndex <= ccount) { // For all tracks
string metadata = PlEdit.getFileName(cindex);
System.debugString("file ["+metadata+"] ",9);
metadata = PlEdit.getMetaData(cindex,"length");
string ctitle = PlEdit.getMetaData(cindex,"title");
System.debugString(" "+integertostring(cindex)+" length ["+metadata+"] "+ctitle,9);
metadata = PlEdit.getMetaData(cindex,"stereo");
System.debugString(" stereo ["+metadata+"] ",9);
cindex = cindex + 1;
}

}

menubar_pe_attrib.onDataChanged() {
.........
---------------------------------------------
3. compile pledit
4. load several music tracks (any format) into the playlist editor. Some should have very short names, and some names longer than 80 character.
5. Click on the word TEST at the bottom of the playlist editor and then examine the resulting wasabi.txt file.
6. You will readily see that long file names do not work, and short ones are AOK.
clementj is offline   Reply With Quote
Old 18th July 2008, 21:26   #2
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,240
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
i've noted it down
maybe i have time to fix it (if i can repro) for next release, otherwise PM me

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 19th July 2008, 13:55   #3
clementj
Senior Member
 
Join Date: Oct 2006
Posts: 353
Thank you. Also I counted the number of characters and it seems that if the full path is longer than 129 characters, the file name is truncated to 129 and the metadata is not returned. This should be a relatively simple fix, but then you never know.
clementj is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Winamp > Winamp Bug Reports

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump