mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- update shoutcast API to Version 2.0 and disable shoutcast menu entry until cs-tech gets a proper shoutcast dev-id
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1104 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -681,11 +681,11 @@ int CAudioPlayerGui::show()
|
||||
LOCALE_AUDIOPLAYER_ADD_LOC, true, NULL, InetRadioInputChanger,
|
||||
cnt, CRCInput::convertDigitToKey(count + 1)), old_select == count);
|
||||
|
||||
sprintf(cnt, "%d", ++count);
|
||||
/* sprintf(cnt, "%d", ++count);
|
||||
InputSelector.addItem(new CMenuForwarder(
|
||||
LOCALE_AUDIOPLAYER_ADD_SC, true, NULL, InetRadioInputChanger,
|
||||
cnt, CRCInput::convertDigitToKey(count + 1)), old_select == count);
|
||||
|
||||
*/
|
||||
sprintf(cnt, "%d", ++count);
|
||||
InputSelector.addItem(new CMenuForwarder(
|
||||
LOCALE_AUDIOPLAYER_ADD_IC, true, NULL, InetRadioInputChanger,
|
||||
@@ -703,9 +703,9 @@ int CAudioPlayerGui::show()
|
||||
paintLCD();
|
||||
break;
|
||||
case 1:
|
||||
openSCbrowser();
|
||||
/* openSCbrowser();
|
||||
break;
|
||||
case 2:
|
||||
case 2:*/
|
||||
readDir_ic();
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_AUDIO);
|
||||
paintLCD();
|
||||
@@ -1392,8 +1392,7 @@ bool CAudioPlayerGui::openFilebrowser(void)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
#define SC_BASE_DIR "http://www.shoutcast.com"
|
||||
#define SC_INIT_DIR "/sbin/newxml.phtml"
|
||||
|
||||
bool CAudioPlayerGui::openSCbrowser(void)
|
||||
{
|
||||
bool result = false;
|
||||
|
@@ -708,7 +708,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
CFile file;
|
||||
file.Mode = S_IFDIR + 0777 ;
|
||||
file.Name = " Top500"; // use space to have it at the beginning of the list
|
||||
file.Url = "/sbin/newxml.phtml?genre=Top500";
|
||||
file.Url = SC_GET_TOP500;
|
||||
file.Size = 0;
|
||||
file.Time = 0;
|
||||
flist->push_back(file);
|
||||
@@ -716,7 +716,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
CFile file2;
|
||||
file2.Mode = S_IFDIR + 0777 ;
|
||||
file2.Name = "..";
|
||||
file2.Url = "/sbin/newxml.phtml";
|
||||
file2.Url = SC_INIT_DIR;
|
||||
file2.Size = 0;
|
||||
file2.Time = 0;
|
||||
flist->push_back(file2);
|
||||
@@ -726,7 +726,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
if (xml_decode == 1) {
|
||||
file.Mode = S_IFDIR + 0777 ;
|
||||
file.Name = xmlGetAttribute(element, "name");
|
||||
file.Url = "/sbin/newxml.phtml?genre=" + file.Name;
|
||||
file.Url = (std::string)SC_GET_GENRE + file.Name;
|
||||
file.Size = 0;
|
||||
file.Time = 0;
|
||||
flist->push_back(file);
|
||||
@@ -743,7 +743,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
if (ptr && (strcmp(ptr, "audio/mpeg")==0)) {
|
||||
file.Mode = S_IFREG + 0777 ;
|
||||
file.Name = xmlGetAttribute(element, "name");
|
||||
file.Url = base + tunein_base + (std::string)"?id=" + xmlGetAttribute(element, "id");
|
||||
file.Url = (std::string)SC_TUNE_IN_BASE + tunein_base + (std::string)"?id=" + xmlGetAttribute(element, "id") + (std::string)"&k=" + SC_DEV_ID;
|
||||
//printf("adding %s (%s)\n", file.Name.c_str(), file.Url.c_str());
|
||||
ptr = xmlGetAttribute(element, "br");
|
||||
if (ptr) {
|
||||
|
@@ -56,6 +56,18 @@
|
||||
#define ENABLE_INTERNETRADIO
|
||||
#define VLC_URI "vlc://"
|
||||
|
||||
#if 0
|
||||
#define SC_BASE_DIR "http://www.shoutcast.com"
|
||||
#define SC_INIT_DIR "/sbin/newxml.phtml"
|
||||
#else
|
||||
#define SC_DEV_ID "XXXXXXXXXXXXXXXX"
|
||||
#define SC_BASE_DIR "http://api.shoutcast.com"
|
||||
#define SC_TUNE_IN_BASE "http://yp.shoutcast.com"
|
||||
#define SC_INIT_DIR "/legacy/genrelist?k="SC_DEV_ID
|
||||
#define SC_GET_GENRE "/legacy/stationsearch?k="SC_DEV_ID"&search="
|
||||
#define SC_GET_TOP500 "/legacy/Top500?k="SC_DEV_ID
|
||||
#endif
|
||||
|
||||
bool chooserDir(std::string &setting_dir, bool test_dir, const char *action_str);
|
||||
bool chooserDir(char *setting_dir, bool test_dir, const char *action_str, size_t str_leng);
|
||||
|
||||
|
Reference in New Issue
Block a user