override protected void listActionDone() { int trackIndex; RendererVirtual renderer = (RendererVirtual)Global.getRendererManager().getRendererByZoneUDN(zoneUDN); base.listActionDone(); // search track in list trackIndex = this.getListPositionOfObjectId(objectIdTmp); if (trackIndex == -1) { if (this.list.Count == 0) { renderer.getRendererObject().Connections[0].SetAvTransportUri("", ""); currentTrackIndexPlaying = 0; } else { if (this.list.Count < currentTrackIndexPlaying) { currentTrackIndexPlaying = this.list.Count; } else if (currentTrackIndexPlaying < 0) { currentTrackIndexPlaying = 0; } // Track was not found. Play next one renderer.playTrack(currentTrackIndexPlaying); //this.setTrackNrPlaying((int)trackNrPlaying); } } else { currentTrackIndexPlaying = trackIndex; renderer.getRendererObject().Connections[0].BendAvTransportUri(this.buildAvTransportUri(), containerInfoMetaData); } this.setListItemSelectedForPlaying(); }
public void linkVirtualRendererToZone(RendererVirtual _virtualRenderer, Boolean _unlink = false, Boolean _crossLink = true) { Zone zone; ZoneManager zoneManager = Global.getZoneManager(); zone = zoneManager.getZoneUUID(_virtualRenderer.getRendererObject().UniqueDeviceName); if (zone != null) { if (_unlink) { zone.rendererUDN = String.Empty; } else { zone.rendererUDN = _virtualRenderer.udn; } zone.rendererLinked(); //zoneManager.updateZonesValue(zone); if (_crossLink) { zoneManager.linkZoneToVirtualRenderer(zone, _unlink, false); } if (_unlink == true) { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde von Zone '{0}' entfernt", zone.udn, _virtualRenderer.udn)); } else { this.writeLog(LogType.Info, String.Format("Renderer '{1}' wurde zu Zone '{0}' zugeordnet", zone.udn, _virtualRenderer.udn)); } } else { this.writeLog(LogType.Warning, String.Format("Keine Zone für virtuellen Renderer '{0}' für Zuordnung gefunden", _virtualRenderer.getRendererObject().UniqueDeviceName)); } }