protected virtual MediaItem_Playlist createPlaylistQueue(String _playlistName) { System.String givenName, queueIdCreated, containerInfoMetaData; CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory(); contentDirectory.CreateQueueSync(_playlistName, PlaylistRootContainerId, out givenName, out queueIdCreated, out containerInfoMetaData); UPNPMediaList dummyList = new UPNPMediaList(); dummyList.createItemsFromMetaData(containerInfoMetaData); MediaItem_Playlist mediaItem = (MediaItem_Playlist)dummyList.list[0]; /*Regex regex = new Regex(@"<dc:title>(?<command>.+)</dc:title>"); * Match match = regex.Match(containerInfoMetaData); * if (match.Success) * { * givenName = match.Groups["command"].Value; * }*/ if (playlistCreated != null) { playlistCreated(givenName); } return(mediaItem); }
public String getMetaDataForObjectId(String _objectId) { uint dummy; String metaData; Global.getMediaServerManager().getContentDirectory().BrowseSyncMeta(_objectId, "*", 0, 0, "", out metaData, out dummy, out dummy, out dummy); return(metaData); }
public void deletePlaylist(String _playlistObjectId) { CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory(); contentDirectory.DestroyObjectSync(_playlistObjectId); if (playlistDeleted != null) { playlistDeleted(_playlistObjectId); } }
public void renamePlaylist(String _playlistObjectId, String _desiredName) { String givenName; CpContentDirectory contentDirectory = Global.getMediaServerManager().getContentDirectory(); contentDirectory.RenameQueueSync(_playlistObjectId, _desiredName, out givenName); if (playlistRenamed != null) { playlistRenamed(_playlistObjectId, givenName); } }
public void dropRoomFromZone(String _roomUDN) { Dictionary <String, String> dropRoomJobParms = new Dictionary <String, String>(); string dropRoomJobRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + dropRoomJobUri; if (!String.IsNullOrEmpty(_roomUDN)) { dropRoomJobParms.Add("roomUDN", _roomUDN); } webRequestHelper.httpPostRequest(dropRoomJobRequestUri, dropRoomJobParms, null); }
public void connectRoomToZone(String _roomUDN, String _zoneUDN = "") { Dictionary <String, String> connectRoomToZoneParms = new Dictionary <String, String>(); string connectRoomToZoneRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + connectRoomToZoneUri; if (!String.IsNullOrEmpty(_roomUDN)) { connectRoomToZoneParms.Add("roomUDN", _roomUDN); } if (!String.IsNullOrEmpty(_zoneUDN)) { connectRoomToZoneParms.Add("zoneUDN", _zoneUDN); } webRequestHelper.httpPostRequest(connectRoomToZoneRequestUri, connectRoomToZoneParms, null); }
public void retrieveZones(String _updateId = "") { Dictionary <String, String> retrieveZonesParms = null; string retrieveZonesRequestUri = Global.getMediaServerManager().mediaServerRequestUriBase + retrieveZonesUri; this.writeLog(LogType.Info, String.Format("Starte Zonen Request mit updateId: '{0}'", _updateId)); // set parameters for "long polling" if (!String.IsNullOrEmpty(_updateId)) { retrieveZonesParms = new Dictionary <String, String>(); retrieveZonesParms.Add("updateId", _updateId); } webRequestHelper.httpPostRequestAsync(retrieveZonesRequestUri, null, retrieveZonesParms, retrieveZonesResponseSink); }
public UPNPMediaList(String _listId = "") : base(_listId) { contentDirectory = Global.getMediaServerManager().getContentDirectory(); }