| | |
| | | if (elems[5].equalsIgnoreCase(PL_CMD_ENDE)) { |
| | | response = naechsterTitel(fs, elems[4]); |
| | | } else if(elems[5].equalsIgnoreCase(PL_CMD_STOP)) { |
| | | spielt.remove(elems[4]); |
| | | response = kommandoSenden(fs, elems[4], PL_CMD_AVD_STOP); |
| | | } else if(elems[5].equalsIgnoreCase(PL_CMD_PAUSE)) { |
| | | response = kommandoSenden(fs, elems[4], PL_CMD_AVD_PAUSE); |
| | |
| | | } |
| | | break; |
| | | case 8: |
| | | response = ersterTitel(fs, elems[4], elems[7]); |
| | | if(elems[6].equalsIgnoreCase("liste")) { |
| | | response = ersterTitel(fs, elems[4], elems[7]); |
| | | } else { |
| | | response = urlAbspielen(fs, elems); |
| | | } |
| | | break; |
| | | default: |
| | | response = "Ungueltiger URL"; |
| | | break; |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | private String urlAbspielen(Storage s, String[] elems) { |
| | | String abspielerName = elems[4]; |
| | | StringBuilder url = new StringBuilder(); |
| | | url.append(url) |
| | | for(int i = 6; i < elems.length - 1; i++) { |
| | | url.append(Server.SLASH); |
| | | url.append(elems[i]); |
| | | } |
| | | } |
| | | |
| | | private String kommandoSenden(Storage s, String aName, String kommando) { |
| | |
| | | StringBuilder kmd = new StringBuilder(); |
| | | kmd.append(abspieler.getUrl()); |
| | | kmd.append(kommando); |
| | | return kommando + " gesendet."; |
| | | String signal = kmd.toString(); |
| | | abspielerKommandoSenden(signal); |
| | | return signal + " gesendet."; |
| | | } else { |
| | | return meldung("Abspielliste nicht gefunden.", AbstractHandler.RTC_NOT_FOUND); |
| | | } |