use of com.frostwire.gui.library.LibraryPlaylistsTableTransferable.Item in project frostwire by frostwire.
the class LibraryUtils method convertToPlaylistItems.
static PlaylistItem[] convertToPlaylistItems(LibraryPlaylistsTableTransferable.Item[] items) {
List<PlaylistItem> playlistItems = new ArrayList<>(items.length);
for (LibraryPlaylistsTableTransferable.Item item : items) {
PlaylistItem playlistItem = new PlaylistItem(null, item.id, item.filePath, item.fileName, item.fileSize, item.fileExtension, item.trackTitle, item.trackDurationInSecs, item.trackArtist, item.trackAlbum, item.coverArtPath, item.trackBitrate, item.trackComment, item.trackGenre, item.trackNumber, item.trackYear, item.starred);
playlistItems.add(playlistItem);
}
return playlistItems.toArray(new PlaylistItem[0]);
}
use of com.frostwire.gui.library.LibraryPlaylistsTableTransferable.Item in project frostwire by frostwire.
the class LibraryUtils method convertToPlaylistItems.
static PlaylistItem[] convertToPlaylistItems(LibraryPlaylistsTableTransferable.PlaylistItemContainer itemContainer) {
List<PlaylistItem> playlistItems = new ArrayList<>(itemContainer.items.size());
for (LibraryPlaylistsTableTransferable.Item item : itemContainer.items) {
PlaylistItem playlistItem = new PlaylistItem(null, item.id, item.filePath, item.fileName, item.fileSize, item.fileExtension, item.trackTitle, item.trackDurationInSecs, item.trackArtist, item.trackAlbum, item.coverArtPath, item.trackBitrate, item.trackComment, item.trackGenre, item.trackNumber, item.trackYear, item.starred);
playlistItems.add(playlistItem);
}
return playlistItems.toArray(new PlaylistItem[0]);
}
use of com.frostwire.gui.library.LibraryPlaylistsTableTransferable.Item in project frostwire by frostwire.
the class LibraryUtils method convertToItems.
static List<LibraryPlaylistsTableTransferable.Item> convertToItems(List<PlaylistItem> playlistItems) {
List<LibraryPlaylistsTableTransferable.Item> items = new ArrayList<>(playlistItems.size());
for (PlaylistItem playlistItem : playlistItems) {
Item item = new LibraryPlaylistsTableTransferable.Item();
item.id = playlistItem.getId();
item.filePath = playlistItem.getFilePath();
item.fileName = playlistItem.getFileName();
item.fileSize = playlistItem.getFileSize();
item.fileExtension = playlistItem.getFileExtension();
item.trackTitle = playlistItem.getTrackTitle();
item.trackDurationInSecs = playlistItem.getTrackDurationInSecs();
item.trackArtist = playlistItem.getTrackArtist();
item.trackAlbum = playlistItem.getTrackAlbum();
item.coverArtPath = playlistItem.getCoverArtPath();
item.trackBitrate = playlistItem.getTrackBitrate();
item.trackComment = playlistItem.getTrackComment();
item.trackGenre = playlistItem.getTrackGenre();
item.trackNumber = playlistItem.getTrackNumber();
item.trackYear = playlistItem.getTrackYear();
item.starred = playlistItem.isStarred();
items.add(item);
}
return items;
}
Aggregations