Display player list

ioda

09-09-2007 00:18:01

Hi, I would like to delete column "Artist" in player file list and I want to appear file name in column Song name

Now I'm ok to delete column D but if I want to appear FIle name I have problem ?

this code in Process_updatetrack

<script src="jscript/directory.js"></script>
<script src="jscript/functions.js"></script>

<script>

<?
var id = request_querystring("id");

var id3info = get_id3info(id);
var files = get_files(id);

if ( id3info!=NULL )
{
if ( count(&files) > 0 ) /* <--- HERE ! */
{
var file = &files[0];
var jssafe_name = str_jsafe(file.Name);

print("parent.update_track('" + jssafe_name + "','" + id3info.Time + "')");
}
else
{
print("parent.update_track('Error loading Track. File could not be found.')");
}
}
else
{
print("parent.update_track('Error loading Track. File could not be found.')");
}
?>

parent.g_bThreadFrameIsBusy = false;

</script>



the problem is, the count of "files" is always 0 and I don't know why ? ? ? . If someone can resolve my probleme, please say me how...

Thanks

ioda

11-09-2007 04:57:52

YESSS D D

I find my error
this is my new code and work very fine

<script>
<?
var id3info = get_id3info(request_querystring("id"));
var filename = str_jsafe(request_querystring("id"));

filename = str_substr(filename, str_findlast(filename,"/")+1);
filename = str_replace(filename, ".mp3", "");
var time = 0;

if ( id3info!=NULL )
{
time = id3info.Time;
}

print("parent.update_track('" + filename + "','" + time + "')");
?>

parent.g_bThreadFrameIsBusy = false;

</script>

the error is get_files function return all file in directory. But the value of ID variable is directory + file name.
Now i clear directory and i return only the file name