![]() |
|
|||||||
| XBMC Development Developers forums for XBMC related development. Programmers/Coders only! No end-user support, no bug reports, and no feature/function requests here! Please, add platform prefix for suggestions that are not platform-independent!: Thread prefixes; "[LINUX]", "[LIVE]", "[MAC]", "[WINDOWS]", and "[XBOX]" |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
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.... |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
ok, i've decided to get it to sort by bitrate too...
i'm working on that right now and will post the change to get that to work... |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
hehe, ok, i have it sorting by bitrate now, wasn't that hard...
but, in doing so i discovered a parseing flaw in the script that prevented stations that don't have a "now playing" line from being grabbed, so i fixed the function responsible for this and now it seems to work... here's the function i changed: Quote:
and line 79 becomes: shoutcast_genre_path = 'http://www.shoutcast.com/directory/?...y=bitrate' this will sort the list with highest bitrate first. |
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
anyone know why the dialog.yesno doesn't autosize correctly?
the dialog.create seems to autosize correctly thanks! |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Feb 2004
Posts: 25
![]() |
i found this issue also. * i rewrote with regex. *no more counting lines. *grouping makes it easy to pull out the info from the html line without needing external functions to split strings.
Quote:
|
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
zinger, awesome, that was the next peice of code i wanted to rewrite.
i'm gunna merge this with my test tree and test it out. |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
zinger, i get a line error about
"for line in htmlcontent" as invalid syntax any ideas? maybe i did something wrong in pasting it? |
|
|
|
|
|
#8 | |
|
Junior Member
Join Date: Feb 2004
Posts: 25
![]() |
sorry, thats from a script i'm working on. not for shoutcast.py. i never fixed shoutcast_update after finding the issue. here is my modified version though. it adds the ability to specify bitrate min/max and channel number by genre. also creates pls with only one stream so xbmc will just play the stream instead of opening pls first.
Quote:
|
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Feb 2004
Posts: 25
![]() |
you should be able to use the code. with some changes. it pulls the title from the page not the pls and only grabs the rn number to build the link to the pls file. i've been working on a live player (does not download anything to hd) and provides all genre/station stuff in gui dialogs. but maybe you can port it into the updater script. good luck.
|
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Oct 2003
Posts: 195
![]() |
ah, ok, so i have to add the other info.
so should i continue working on this if your writing a cooler version? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| update | jmejiaa | XBMC for Xbox Specific Support | 2 | 2005-11-16 04:58 |
| Shoutcast playlist script update | BelleDesirePC | Plugin/Script (Python) Help and Support | 5 | 2005-03-08 19:48 |
| Shoutcast playlist script update | BelleDesirePC | Plugin/Script (Python) Development | 1 | 2005-03-05 12:47 |
| shoutcast update python script... | IndieRockSteve | XBMC for Xbox Specific Support | 0 | 2004-02-16 19:57 |
| Auto Update/Script Update | TheKillar | XBMC Feature Suggestions | 1 | 1970-01-01 02:00 |