Hello,
as promissed I made a little perl script to import Shoutcast Streams for Playback in LMCE.
WARNING!
This is one big hack, and writes directly into your LMCE Database. It is poorly tested and poorly coded, hence will possibly mess up your system. If you are not prepared to mess up your system, don't try this. Please don't ask me how to fix your database if it's broken. You have been warned!
Features:
Import Shoutcast streams by shoutcast genre, with the ability to import multiple Shoutcast genres into one LMCE genre and removing duplicates within each shoutcast genre, keeping only the highest bitrate stream for each duplicate station. Also has the ability to add generic album and performer tags for better sorting of the Shoutcast streams in the LMCE Media file browser.
Other warning:
Shoutcast does not permit the continuous querying of a large number of playlist files and will quickly block your IP address if you do so.
You should try to limit yourself to a few interesting categories, limit the number of streams per category to something reasonable and don't run the script more than once per week
The perl script needs to run on the Core. It requires the following perl packages:
XML::DOM
LWP::Simple
Mysql
List::Util
To install them, run on your core:
perl -e shell -MCPAN
Then "install nameofpackage" using the package names above including the double colon.
At the beginning of the script are a few options, including the part where you customize the Genres you want to import.
Note that shoutcast seems to limit the number of queries you can do in a given time from your IP, so when you run the script, it will stop every once in a while (when shoutcast blocks you) and then resume. So if you see it stop, just wait for a while...
Enjoy!
Jean