Java Code Examples for org.fourthline.cling.support.model.container.MusicAlbum#setDescription()
The following examples show how to use
org.fourthline.cling.support.model.container.MusicAlbum#setDescription() .
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: MediaFileUpnpProcessor.java From airsonic-advanced with GNU General Public License v3.0 | 6 votes |
public Container createContainer(MediaFile item) { MusicAlbum container = new MusicAlbum(); if (item.isAlbum()) { container.setAlbumArtURIs(new URI[] { getDispatcher().getAlbumProcessor().getAlbumArtURI(item.getId())}); if (item.getArtist() != null) { container.setArtists(getDispatcher().getAlbumProcessor().getAlbumArtists(item.getArtist())); } container.setDescription(item.getComment()); } container.setId(DispatchingContentDirectory.CONTAINER_ID_FOLDER_PREFIX + DispatchingContentDirectory.SEPARATOR + item.getId()); container.setTitle(item.getName()); List<MediaFile> children = getChildren(item); container.setChildCount(children.size()); if (! getMediaFileService().isRoot(item)) { MediaFile parent = getMediaFileService().getParentOf(item); if (parent != null) { container.setParentID(String.valueOf(parent.getId())); } } else { container.setParentID(DispatchingContentDirectory.CONTAINER_ID_FOLDER_PREFIX); } return container; }
Example 2
Source File: AlbumUpnpProcessor.java From airsonic-advanced with GNU General Public License v3.0 | 6 votes |
public Container createContainer(Album album) { MusicAlbum container = new MusicAlbum(); if (album.getId() == -1) { container.setId(getRootId() + DispatchingContentDirectory.SEPARATOR + album.getComment()); } else { container.setId(getRootId() + DispatchingContentDirectory.SEPARATOR + album.getId()); container.setAlbumArtURIs(new URI[] { getAlbumArtURI(album.getId()) }); container.setDescription(album.getComment()); } container.setParentID(getRootId()); container.setTitle(album.getName()); // TODO: correct artist? if (album.getArtist() != null) { container.setArtists(getAlbumArtists(album.getArtist())); } return container; }
Example 3
Source File: MediaFileUpnpProcessor.java From airsonic with GNU General Public License v3.0 | 6 votes |
public Container createContainer(MediaFile item) { MusicAlbum container = new MusicAlbum(); if (item.isAlbum()) { container.setAlbumArtURIs(new URI[] { getDispatcher().getAlbumProcessor().getAlbumArtURI(item.getId())}); if (item.getArtist() != null) { container.setArtists(getDispatcher().getAlbumProcessor().getAlbumArtists(item.getArtist())); } container.setDescription(item.getComment()); } container.setId(DispatchingContentDirectory.CONTAINER_ID_FOLDER_PREFIX + DispatchingContentDirectory.SEPARATOR + item.getId()); container.setTitle(item.getName()); List<MediaFile> children = getChildren(item); container.setChildCount(children.size()); if (! getMediaFileService().isRoot(item)) { MediaFile parent = getMediaFileService().getParentOf(item); if (parent != null) { container.setParentID(String.valueOf(parent.getId())); } } else { container.setParentID(DispatchingContentDirectory.CONTAINER_ID_FOLDER_PREFIX); } return container; }
Example 4
Source File: AlbumUpnpProcessor.java From airsonic with GNU General Public License v3.0 | 6 votes |
public Container createContainer(Album album) { MusicAlbum container = new MusicAlbum(); if (album.getId() == -1) { container.setId(getRootId() + DispatchingContentDirectory.SEPARATOR + album.getComment()); } else { container.setId(getRootId() + DispatchingContentDirectory.SEPARATOR + album.getId()); container.setAlbumArtURIs(new URI[] { getAlbumArtURI(album.getId()) }); container.setDescription(album.getComment()); } container.setParentID(getRootId()); container.setTitle(album.getName()); // TODO: correct artist? if (album.getArtist() != null) { container.setArtists(getAlbumArtists(album.getArtist())); } return container; }
Example 5
Source File: FolderBasedContentDirectory.java From airsonic-advanced with GNU General Public License v3.0 | 5 votes |
private Container createAlbumContainer(MediaFile album) { MusicAlbum container = new MusicAlbum(); container.setAlbumArtURIs(new URI[]{getAlbumArtUrl(album)}); // TODO: correct artist? if (album.getArtist() != null) { container.setArtists(new PersonWithRole[]{new PersonWithRole(album.getArtist())}); } container.setDescription(album.getComment()); return container; }
Example 6
Source File: FolderBasedContentDirectory.java From airsonic with GNU General Public License v3.0 | 5 votes |
private Container createAlbumContainer(MediaFile album) { MusicAlbum container = new MusicAlbum(); container.setAlbumArtURIs(new URI[]{getAlbumArtUrl(album)}); // TODO: correct artist? if (album.getArtist() != null) { container.setArtists(new PersonWithRole[]{new PersonWithRole(album.getArtist())}); } container.setDescription(album.getComment()); return container; }
Example 7
Source File: FolderBasedContentDirectory.java From subsonic with GNU General Public License v3.0 | 5 votes |
private Container createAlbumContainer(MediaFile album) throws Exception { MusicAlbum container = new MusicAlbum(); container.setAlbumArtURIs(new URI[]{getAlbumArtUrl(album)}); // TODO: correct artist? if (album.getArtist() != null) { container.setArtists(new PersonWithRole[]{new PersonWithRole(album.getArtist())}); } container.setDescription(album.getComment()); return container; }