It is working quit fine but the place where I have implemented it is no the best place posssibly. It is working with another open source project called Mediathekview (http://sourceforge.net/projects/zdfmediathk/) . My code is bridging the two.
Do have an idea where to put the code, something about a plugin I have found but it doesn't seems much helpful for my case....
-----Code ---snipllets----
- Code: Select all
private void addMediathekVideoFeeds(RendererConfiguration renderer) {
ListeFilme filme = (ListeFilme) StartMediathekReader.daten.listeFilme;
for (int i = 0; i < filme.size(); i++) {
DLNAResource node = getRootFolder(renderer);
node = goDownToTopic(node, "videostream.Web");
node = goDownToTopic(node, "Video");
DatenFilm film = filme.get(i);
node = goDownToTopic(node, film.arr[Konstanten.FILM_SENDER_NR]);
node = goDownToTopic(node, film.arr[Konstanten.FILM_THEMA_NR]);
String titel = film.arr[Konstanten.FILM_TITEL_NR];
// String url = film.arr[Konstanten.FILM_URL_HD_NR];
String url = film.arr[Konstanten.FILM_URL_NR];
DLNAResource titleNode = node.searchByName(titel);
if(titleNode == null) {
// WebVideoStream(String fluxName, String URL, String thumbURL)
node.addChild(new WebVideoStream(titel, url, ""));
}
node = getRootFolder(renderer);
node = goDownToTopic(node, "videofeed.Web");
node = goDownToTopic(node, "Video");
node = goDownToTopic(node, film.arr[Konstanten.FILM_SENDER_NR]);
node = goDownToTopic(node, film.arr[Konstanten.FILM_THEMA_NR]);
titleNode = node.searchByName(titel);
if(titleNode == null) {
// WebVideoStream(String fluxName, String URL, String thumbURL)
node.addChild(new WebVideoStream(titel, url, ""));
}
}
}
private DLNAResource goDownToTopic(DLNAResource parent, String topic) {
DLNAResource node = parent.searchByName(topic);
if(node != null)
return node;
node = new VirtualFolder(topic, "");
parent.addChild(node);
return node;
}
RendererConfig:
public RootFolder getRootFolder() {
if (rootFolder == null) {
...
} else {
PMS.get().addMediaLibraryFolder(this);
}
return rootFolder;
}
