2004-02-21, 20:58
i've made a couple changes to the script, this is my first time using python, so i didn't delve far in, but what i did was cause the numbers placed at the beginning of the filenames to show a leading zero to keep them listed in order on the screen and i also had it place the bitrate right after the count number so it was easy to see what bitrate the stream was at.
if i feel like teaching myself enough about python i'll set it up so the output file name follows a user-definable string. i'll also see if i can do some better parsing to get the station name out of the retreived field and seperate it from the description, but this is obviously a more difficult algorithm to implement, so it will prbly take me some time.
anyway, here's what i changed so someone can change the cvs copy if they want...
line 138 becomes:
filename = '%sk ' % bitrate + strip(filename, 0, xfs_file_length - 4 - 3 - 5 - 1) + '.pls'
and line 237 becomes:
filename = '%02d ' + get_filename(plsfilecontent, station.get_bitrate())
so now it looks like:
01 128k somafm....
if i feel like teaching myself enough about python i'll set it up so the output file name follows a user-definable string. i'll also see if i can do some better parsing to get the station name out of the retreived field and seperate it from the description, but this is obviously a more difficult algorithm to implement, so it will prbly take me some time.
anyway, here's what i changed so someone can change the cvs copy if they want...
line 138 becomes:
filename = '%sk ' % bitrate + strip(filename, 0, xfs_file_length - 4 - 3 - 5 - 1) + '.pls'
and line 237 becomes:
filename = '%02d ' + get_filename(plsfilecontent, station.get_bitrate())
so now it looks like:
01 128k somafm....