Java Code Examples for org.fourthline.cling.support.model.container.StorageFolder#setWriteStatus()
The following examples show how to use
org.fourthline.cling.support.model.container.StorageFolder#setWriteStatus() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RootUpnpProcessor.java From airsonic-advanced with GNU General Public License v3.0 | 6 votes |
public Container createRootContainer() { StorageFolder root = new StorageFolder(); root.setId(DispatchingContentDirectory.CONTAINER_ID_ROOT); root.setParentID("-1"); MediaLibraryStatistics statistics = indexManager.getStatistics(); // returning large storageUsed values doesn't play nicely with // some upnp clients //root.setStorageUsed(statistics == null ? 0 : statistics.getTotalLengthInBytes()); root.setStorageUsed(-1L); root.setTitle("Airsonic Media"); root.setRestricted(true); root.setSearchable(true); root.setWriteStatus(WriteStatus.NOT_WRITABLE); root.setChildCount(6); return root; }
Example 2
Source File: FolderBasedContentDirectory.java From airsonic-advanced with GNU General Public License v3.0 | 6 votes |
private BrowseResult browseRootMetadata() throws Exception { StorageFolder root = new StorageFolder(); root.setId(CONTAINER_ID_ROOT); root.setParentID("-1"); MediaLibraryStatistics statistics = indexManager.getStatistics(); root.setStorageUsed(statistics == null ? 0 : statistics.getTotalLengthInBytes()); root.setTitle("Airsonic Media"); root.setRestricted(true); root.setSearchable(false); root.setWriteStatus(WriteStatus.NOT_WRITABLE); List<MusicFolder> musicFolders = settingsService.getAllMusicFolders(); root.setChildCount(musicFolders.size() + 1); // +1 for playlists DIDLContent didl = new DIDLContent(); didl.addContainer(root); return createBrowseResult(didl, 1, 1); }
Example 3
Source File: RootUpnpProcessor.java From airsonic with GNU General Public License v3.0 | 6 votes |
public Container createRootContainer() { StorageFolder root = new StorageFolder(); root.setId(DispatchingContentDirectory.CONTAINER_ID_ROOT); root.setParentID("-1"); MediaLibraryStatistics statistics = indexManager.getStatistics(); // returning large storageUsed values doesn't play nicely with // some upnp clients //root.setStorageUsed(statistics == null ? 0 : statistics.getTotalLengthInBytes()); root.setStorageUsed(-1L); root.setTitle("Airsonic Media"); root.setRestricted(true); root.setSearchable(true); root.setWriteStatus(WriteStatus.NOT_WRITABLE); root.setChildCount(6); return root; }
Example 4
Source File: FolderBasedContentDirectory.java From airsonic with GNU General Public License v3.0 | 6 votes |
private BrowseResult browseRootMetadata() throws Exception { StorageFolder root = new StorageFolder(); root.setId(CONTAINER_ID_ROOT); root.setParentID("-1"); MediaLibraryStatistics statistics = indexManager.getStatistics(); root.setStorageUsed(statistics == null ? 0 : statistics.getTotalLengthInBytes()); root.setTitle("Airsonic Media"); root.setRestricted(true); root.setSearchable(false); root.setWriteStatus(WriteStatus.NOT_WRITABLE); List<MusicFolder> musicFolders = settingsService.getAllMusicFolders(); root.setChildCount(musicFolders.size() + 1); // +1 for playlists DIDLContent didl = new DIDLContent(); didl.addContainer(root); return createBrowseResult(didl, 1, 1); }
Example 5
Source File: FolderBasedContentDirectory.java From subsonic with GNU General Public License v3.0 | 6 votes |
private BrowseResult browseRootMetadata() throws Exception { StorageFolder root = new StorageFolder(); root.setId(CONTAINER_ID_ROOT); root.setParentID("-1"); MediaLibraryStatistics statistics = settingsService.getMediaLibraryStatistics(); root.setStorageUsed(statistics == null ? 0 : statistics.getTotalLengthInBytes()); root.setTitle("Subsonic Media"); root.setRestricted(true); root.setSearchable(false); root.setWriteStatus(WriteStatus.NOT_WRITABLE); List<MusicFolder> musicFolders = settingsService.getAllMusicFolders(); root.setChildCount(musicFolders.size() + 1); // +1 for playlists DIDLContent didl = new DIDLContent(); didl.addContainer(root); return createBrowseResult(didl, 1, 1); }