00001
00009 package org.rosmultimedia.player.xbmc.internal;
00010
00011 import java.util.ArrayList;
00012 import java.util.List;
00013
00014 import org.rosbuilding.common.media.ILibrary;
00015 import org.rosmultimedia.player.media.model.Album;
00016 import org.rosmultimedia.player.media.model.Media;
00017 import org.rosmultimedia.player.media.model.Movie;
00018 import org.rosmultimedia.player.media.model.Song;
00019 import org.rosmultimedia.player.media.model.Tvshow;
00020 import org.rosmultimedia.player.xbmc.IXbmcNode;
00021 import org.rosmultimedia.player.xbmc.XbmcNode;
00022 import org.rosmultimedia.player.xbmc.jsonrpc.XbmcJson;
00023 import org.xbmc.android.jsonrpc.api.call.AudioLibrary;
00024 import org.xbmc.android.jsonrpc.api.call.VideoLibrary.GetEpisodeDetails;
00025 import org.xbmc.android.jsonrpc.api.call.VideoLibrary.GetEpisodes;
00026 import org.xbmc.android.jsonrpc.api.call.VideoLibrary.GetMovieDetails;
00027 import org.xbmc.android.jsonrpc.api.call.VideoLibrary.GetMovies;
00028 import org.xbmc.android.jsonrpc.api.call.VideoLibrary.GetTVShows;
00029 import org.xbmc.android.jsonrpc.api.model.AudioModel.AlbumDetail;
00030 import org.xbmc.android.jsonrpc.api.model.AudioModel.SongDetail;
00031 import org.xbmc.android.jsonrpc.api.model.ListModel.AlbumFilter;
00032 import org.xbmc.android.jsonrpc.api.model.ListModel.AlbumFilterRule;
00033 import org.xbmc.android.jsonrpc.api.model.ListModel.EpisodeFilter;
00034 import org.xbmc.android.jsonrpc.api.model.ListModel.EpisodeFilterRule;
00035 import org.xbmc.android.jsonrpc.api.model.ListModel.FilterRule;
00036 import org.xbmc.android.jsonrpc.api.model.ListModel.FilterRule.Value;
00037 import org.xbmc.android.jsonrpc.api.model.ListModel.Limits;
00038 import org.xbmc.android.jsonrpc.api.model.ListModel.MovieFilter;
00039 import org.xbmc.android.jsonrpc.api.model.ListModel.MovieFilterRule;
00040 import org.xbmc.android.jsonrpc.api.model.ListModel.SongFilter;
00041 import org.xbmc.android.jsonrpc.api.model.ListModel.SongFilterRule;
00042 import org.xbmc.android.jsonrpc.api.model.ListModel.Sort;
00043 import org.xbmc.android.jsonrpc.api.model.ListModel.TVShowFilter;
00044 import org.xbmc.android.jsonrpc.api.model.ListModel.TVShowFilterRule;
00045 import org.xbmc.android.jsonrpc.api.model.VideoModel.EpisodeDetail;
00046 import org.xbmc.android.jsonrpc.api.model.VideoModel.FileDetail;
00047 import org.xbmc.android.jsonrpc.api.model.VideoModel.ItemDetail;
00048 import org.xbmc.android.jsonrpc.api.model.VideoModel.MovieDetail;
00049 import org.xbmc.android.jsonrpc.api.model.VideoModel.TVShowDetail;
00050
00051 import com.google.common.base.Strings;
00052 import com.google.common.collect.ObjectArrays;
00053
00054 import smarthome_media_msgs.MediaGetItemRequest;
00055 import smarthome_media_msgs.MediaGetItemResponse;
00056 import smarthome_media_msgs.MediaGetItemsRequest;
00057 import smarthome_media_msgs.MediaGetItemsResponse;
00058 import smarthome_media_msgs.MediaItem;
00059 import smarthome_media_msgs.MediaType;
00060
00067 public class XbmcLibrary implements ILibrary {
00071 private IXbmcNode xbmcNode;
00072
00076 private XbmcJson xbmcJson;
00077
00083 public XbmcLibrary(XbmcJson xbmcJson, IXbmcNode node) {
00084 this.xbmcJson = xbmcJson;
00085 this.xbmcNode = node;
00086 }
00087
00088 @Override
00089 public void handleMediaGetItem(MediaGetItemRequest request,
00090 MediaGetItemResponse response) {
00091 this.xbmcNode.logI("Service call MediaGetItem");
00092
00093 int mediaId = request.getItem().getMediaid();
00094 MediaType mediaType = request.getItem().getMediatype();
00095
00096 if (Strings.isNullOrEmpty(mediaType.getValue())) {
00097 mediaType = this.xbmcNode.getStateData().getPlayer().getMediatype();
00098 }
00099
00100 Media media = null;
00101
00102 if (mediaId < 0) {
00103 mediaId = 0;
00104 }
00105
00106 if (mediaType.getValue().equals(MediaType.VIDEO_MOVIE)) {
00107 media = this.getMovie(mediaId);
00108 } else if (mediaType.getValue().equals(MediaType.VIDEO_TVSHOW_EPISODE)) {
00109 media = this.getTvshowEpisode(mediaId);
00110 } else if (mediaType.getValue().equals(MediaType.AUDIO_SONG)) {
00111 media = this.getAudioSong(mediaId);
00112 } else if (mediaType.getValue().equals(MediaType.AUDIO_ALBUM)) {
00113 media = this.getAudioAlbum(mediaId);
00114 }
00115
00116 if (media == null) {
00117
00118 media = new Media();
00119 }
00120
00121 MediaItem result = this.xbmcNode.getNewMessageInstance(MediaItem._TYPE);
00122
00123 result.setMediaid(media.getMediaid());
00124 result.setMediatype(mediaType);
00125 result.setData(media.toJson());
00126
00127 response.setItem(result);
00128 }
00129
00130 @Override
00131 public void handleMediaGetItems(MediaGetItemsRequest request,
00132 MediaGetItemsResponse response) {
00133 this.xbmcNode.logI("Service call MediaGetItems");
00134
00135 int mediaId = request.getItem().getMediaid();
00136 MediaType mediaType = request.getItem().getMediatype();
00137 List<Media> medias = null;
00138
00139 if (mediaId < 0) {
00140 mediaId = 0;
00141 }
00142
00143 if (mediaType.getValue().equals(MediaType.VIDEO_MOVIE)) {
00144 Movie media = Movie.fromJson(request.getItem().getData());
00145 medias = this.getMovies(media, null);
00146 } else if (mediaType.getValue().equals(MediaType.VIDEO_TVSHOW_EPISODE)) {
00147 Tvshow media = Tvshow.fromJson(request.getItem().getData());
00148 medias = this.getTvshows(media, null);
00149 } else if (mediaType.getValue().equals(MediaType.VIDEO_TVSHOW)) {
00150 Tvshow media = Tvshow.fromJson(request.getItem().getData());
00151 medias = this.getTvshowEpisodes(media, null);
00152 } else if (mediaType.getValue().equals(MediaType.AUDIO_SONG)) {
00153 Song media = Song.fromJson(request.getItem().getData());
00154 medias = this.getAudioSongs(media, null);
00155 } else if (mediaType.getValue().equals(MediaType.AUDIO_ALBUM)) {
00156 Album media = Album.fromJson(request.getItem().getData());
00157 medias = this.getAudioAlbums(media, null);
00158 }
00159
00160 if (medias == null) {
00161
00162 medias = new ArrayList<Media>();
00163 }
00164
00165 List<MediaItem> result = new ArrayList<MediaItem>();
00166
00167 for (Media media : medias) {
00168 MediaItem item = this.xbmcNode.getNewMessageInstance(MediaItem._TYPE);
00169
00170 item.setMediaid(media.getMediaid());
00171 item.setMediatype(mediaType);
00172 item.setData(media.toJson());
00173
00174 result.add(item);
00175 }
00176
00177 response.setItems(result);
00178 }
00179
00185 private Media getMovie(int mediaId) {
00186 Media result = null;
00187
00188 if (mediaId > 0) {
00189 String[] properties = this.getMovieProperties();
00190 MovieDetail item = this.xbmcJson.getResult(new GetMovieDetails(
00191 mediaId, properties));
00192 result = this.getMovie(item);
00193 }
00194
00195 return result;
00196 }
00197
00203 private Media getTvshowEpisode(int mediaId) {
00204 Media result = null;
00205
00206 if (mediaId > 0) {
00207 String[] properties = this.getTvshowEpisodeProperties();
00208 EpisodeDetail item = this.xbmcJson.getResult(new GetEpisodeDetails(
00209 mediaId, properties));
00210 result = this.getTvshowEpisode(item);
00211 }
00212
00213 return result;
00214 }
00215
00221 private Media getAudioSong(int mediaId) {
00222 Media result = null;
00223
00224 if (mediaId > 0) {
00225 String[] properties = this.getAudioSongProperties();
00226 SongDetail item = this.xbmcJson.getResult(new AudioLibrary.GetSongDetails(
00227 mediaId, properties));
00228 result = this.getAudioSong(item);
00229 }
00230
00231 return result;
00232 }
00233
00239 private Media getAudioAlbum(int mediaId) {
00240 Media result = null;
00241
00242 if (mediaId > 0) {
00243 String[] properties = this.getAudioAlbumProperties();
00244 AlbumDetail item = this.xbmcJson.getResult(new AudioLibrary.GetAlbumDetails(
00245 mediaId, properties));
00246 result = this.getAudioAlbum(item);
00247 }
00248
00249 return result;
00250 }
00251
00258 private List<Media> getMovies(Movie item, Limits limits) {
00259 List<Media> result = new ArrayList<Media>();
00260 List<MovieFilter> filters = new ArrayList<MovieFilter>();
00261 MovieFilter filter = null;
00262 String title = item.getTitle();
00263
00264 if (!Strings.isNullOrEmpty(title)) {
00265 String[] titleParts = title.split(" ");
00266
00267 for (String part : titleParts) {
00268 filters.add(this.getMovieFilter(
00269 FilterRule.Operator.CONTAINS,
00270 part,
00271 MovieFilterRule.Field.TITLE));
00272 }
00273 }
00274
00275 if (item.getMediaid() > 0) {
00276 filters.add(this.getMovieFilter(
00277 FilterRule.Operator.IS,
00278 String.valueOf(item.getMediaid()),
00279 "movieid"));
00280 }
00281
00282 if (item.getYear() > 0) {
00283 filters.add(this.getMovieFilter(
00284 FilterRule.Operator.IS,
00285 String.valueOf(item.getYear()),
00286 MovieFilterRule.Field.YEAR));
00287 }
00288
00289 if (item.getCast() != null && !item.getCast().isEmpty()) {
00290 for (String actor : item.getCast()) {
00291 if (!Strings.isNullOrEmpty(actor)) {
00292 filters.add(this.getMovieFilter(
00293 FilterRule.Operator.CONTAINS,
00294 actor,
00295 MovieFilterRule.Field.ACTOR));
00296 }
00297 }
00298 }
00299
00300 if (!filters.isEmpty()) {
00301 filter = new MovieFilter(new MovieFilter.And(filters));
00302 }
00303
00304 Sort sort = new Sort(false, "label", "ascending");
00305 String[] properties = this.getMovieProperties();
00306
00307 List<MovieDetail> items = this.xbmcJson.getResults(new GetMovies(
00308 limits, sort, filter, properties));
00309
00310 if (items != null) {
00311 for (MovieDetail itemDetail : items) {
00312 result.add(this.getMovie(itemDetail));
00313 }
00314 }
00315
00316 return result;
00317 }
00318
00319 private MovieFilter getMovieFilter(String operator, String value, String field) {
00320 return new MovieFilter(new MovieFilterRule(
00321 operator,
00322 new Value(value),
00323 field));
00324 }
00325
00332 private List<Media> getTvshowEpisodes(Tvshow item, Limits limits) {
00333 List<Media> result = new ArrayList<Media>();
00334 List<EpisodeFilter> filters = new ArrayList<EpisodeFilter>();
00335 EpisodeFilter filter = null;
00336 String showtitle = item.getShowtitle();
00337 int season = item.getSeason();
00338 int episode = item.getEpisode();
00339 int playcount = item.getPlaycount();
00340
00341 if (!Strings.isNullOrEmpty(showtitle)) {
00342 String[] titleParts = showtitle.split(" ");
00343
00344 for (String part : titleParts) {
00345 filters.add(new EpisodeFilter(new EpisodeFilterRule("contains",
00346 new Value(part), "tvshow")));
00347 }
00348 }
00349
00350 if (season > 0) {
00351 filters.add(new EpisodeFilter(new EpisodeFilterRule("is",
00352 new Value(String.valueOf(season)), "season")));
00353 }
00354
00355 if (episode > 0) {
00356 filters.add(new EpisodeFilter(new EpisodeFilterRule("is",
00357 new Value(String.valueOf(season)), "episode")));
00358 }
00359
00360 if (playcount > 0) {
00361 filters.add(new EpisodeFilter(new EpisodeFilterRule("is",
00362 new Value(String.valueOf(playcount)), "playcount")));
00363 }
00364
00365 if (!filters.isEmpty()) {
00366 filter = new EpisodeFilter(new EpisodeFilter.And(filters));
00367 }
00368
00369 String[] properties = this.getTvshowEpisodeProperties();
00370 List<EpisodeDetail> items = this.xbmcJson.getResults(new GetEpisodes(
00371 limits, filter, properties));
00372
00373 if (items != null) {
00374 for (EpisodeDetail itemDetail : items) {
00375 result.add(this.getTvshowEpisode(itemDetail));
00376 }
00377 }
00378
00379 return result;
00380 }
00381
00388 private List<Media> getTvshows(Media item, Limits limits) {
00389 List<Media> result = new ArrayList<Media>();
00390 List<TVShowFilter> filters = new ArrayList<TVShowFilter>();
00391 TVShowFilter filter = null;
00392 String title = item.getTitle();
00393
00394 if (!Strings.isNullOrEmpty(title)) {
00395 String[] titleParts = title.split(" ");
00396
00397 for (String part : titleParts) {
00398 filters.add(new TVShowFilter(new TVShowFilterRule("contains",
00399 new Value(part), "title")));
00400 }
00401 }
00402
00403 if (!filters.isEmpty()) {
00404 filter = new TVShowFilter(new TVShowFilter.And(filters));
00405 }
00406
00407 Sort sort = new Sort(false, "label", "ascending");
00408 String[] properties = this.getTvshowProperties();
00409
00410 List<TVShowDetail> items = this.xbmcJson.getResults(new GetTVShows(
00411 limits, sort, filter, properties));
00412
00413 if (items != null) {
00414 for (TVShowDetail itemDetail : items) {
00415 result.add(this.getTvshow(itemDetail));
00416 }
00417 }
00418
00419 return result;
00420 }
00421
00428 private List<Media> getAudioSongs(Media item, Limits limits) {
00429 List<Media> result = new ArrayList<Media>();
00430 List<SongFilter> filters = new ArrayList<SongFilter>();
00431 SongFilter filter = null;
00432 String showtitle = item.getTitle();
00433 int playcount = item.getPlaycount();
00434
00435 if (!Strings.isNullOrEmpty(showtitle)) {
00436 String[] titleParts = showtitle.split(" ");
00437
00438 for (String part : titleParts) {
00439 filters.add(new SongFilter(new SongFilterRule("contains",
00440 new Value(part), "title")));
00441 }
00442 }
00443
00444 if (playcount > 0) {
00445 filters.add(new SongFilter(new SongFilterRule("is",
00446 new Value(String.valueOf(playcount)), "playcount")));
00447 }
00448
00449 if (!filters.isEmpty()) {
00450 filter = new SongFilter(new SongFilter.And(filters));
00451 }
00452
00453 String[] properties = this.getAudioSongProperties();
00454 List<SongDetail> items = this.xbmcJson.getResults(new AudioLibrary.GetSongs(
00455 limits, filter, properties));
00456
00457 if (items != null) {
00458 for (SongDetail itemDetail : items) {
00459 result.add(this.getAudioSong(itemDetail));
00460 }
00461 }
00462
00463 return result;
00464 }
00465
00472 private List<Media> getAudioAlbums(Album item, Limits limits) {
00473 List<Media> result = new ArrayList<Media>();
00474 List<AlbumFilter> filters = new ArrayList<AlbumFilter>();
00475 AlbumFilter filter = null;
00476 String showtitle = item.getAlbum();
00477 int playcount = item.getPlaycount();
00478
00479 if (!Strings.isNullOrEmpty(showtitle)) {
00480 String[] titleParts = showtitle.split(" ");
00481
00482 for (String part : titleParts) {
00483 filters.add(new AlbumFilter(new AlbumFilterRule("contains",
00484 new Value(part), "album")));
00485 }
00486 }
00487
00488 if (playcount > 0) {
00489 filters.add(new AlbumFilter(new AlbumFilterRule("is",
00490 new Value(String.valueOf(playcount)), "playcount")));
00491 }
00492
00493 if (!filters.isEmpty()) {
00494 filter = new AlbumFilter(new AlbumFilter.And(filters));
00495 }
00496
00497 String[] properties = this.getAudioAlbumProperties();
00498 List<AlbumDetail> items = this.xbmcJson.getResults(new AudioLibrary.GetAlbums(
00499 limits, filter, properties));
00500
00501 if (items != null) {
00502 for (AlbumDetail itemDetail : items) {
00503 result.add(this.getAudioAlbum(itemDetail));
00504 }
00505 }
00506
00507 return result;
00508 }
00509
00514 private String[] getItemProperties() {
00515 String[] properties = { "title", "plot", "votes", "rating", "writer",
00516 "playcount", "runtime", "director", "originaltitle", "cast",
00517 "streamdetails", "lastplayed", "fanart", "thumbnail", "file",
00518 "resume", "dateadded" };
00519
00520 return properties;
00521 }
00522
00527 private String[] getAudioItemProperties() {
00528
00529
00530
00531
00532
00533 String[] properties = { "genre", "artist", "artistid", "displayartist",
00534 "genreid", "musicbrainzalbumartistid", "musicbrainzalbumid",
00535 "rating", "title", "year", "fanart", "thumbnail",
00536 "playcount" };
00537
00538 return properties;
00539 }
00540
00545 private String[] getMovieProperties() {
00546 String[] properties = { "genre", "country", "year", "trailer",
00547 "tagline", "plotoutline", "studio", "mpaa", "imdbnumber",
00548 "set", "showlink", "top250", "sorttitle", "setid", "tag" };
00549
00550 return ObjectArrays.concat(this.getItemProperties(), properties,
00551 String.class);
00552 }
00553
00558 private String[] getTvshowProperties() {
00559 String[] properties = { "genre", "year", "plot", "studio", "mpaa",
00560 "episode", "imdbnumber", "premiered", "sorttitle",
00561 "episodeguide", "season", "watchedepisodes", "tag" };
00562
00563 return ObjectArrays.concat(this.getItemProperties(), properties,
00564 String.class);
00565 }
00566
00571 private String[] getTvshowEpisodeProperties() {
00572 String[] properties = { "firstaired", "art", "productioncode",
00573 "season", "episode", "showtitle", "tvshowid", "uniqueid" };
00574
00575 return ObjectArrays.concat(this.getItemProperties(), properties,
00576 String.class);
00577 }
00578
00583 private String[] getAudioSongProperties() {
00584 String[] properties = { "comment", "disc", "duration",
00585 "file", "lastplayed", "lyrics", "musicbrainzartistid",
00586 "musicbrainztrackid", "track", "album", "albumartist",
00587 "albumartistid", "albumid", };
00588
00589 return ObjectArrays.concat(this.getAudioItemProperties(), properties,
00590 String.class);
00591 }
00592
00597 private String[] getAudioAlbumProperties() {
00598 String[] properties = { "description", "mood", "style",
00599 "theme", "type"};
00600
00601 return ObjectArrays.concat(this.getAudioItemProperties(), properties,
00602 String.class);
00603 }
00604
00610 private void getItemBase(Media video, ItemDetail media) {
00611
00612 if (media != null) {
00613 video.setTitle(media.title);
00614 video.setPlot(media.plot);
00615 video.setPlaycount(media.playcount);
00616
00617
00618 video.setLastplayed(media.lastplayed);
00619 video.setFanart(XbmcUtils.getImageUrl(media.fanart));
00620 video.setThumbnail(XbmcUtils.getImageUrl(media.thumbnail));
00621 video.setFile(media.file);
00622
00623
00624 video.setDateadded(media.dateadded);
00625
00626 }
00627 }
00628
00634 private void getItem(Media media, FileDetail file) {
00635 if (file != null) {
00636 this.getItemBase(media, file);
00637 media.setRuntime(file.runtime);
00638 media.setDirector(file.director);
00639 }
00640 }
00641
00647 private Media getMovie(MovieDetail media) {
00648 Movie movie = new Movie();
00649
00650 if (media != null) {
00651 this.getItem(movie, media);
00652
00653 movie.setMediaid(media.movieid);
00654 movie.setSetid(media.setid);
00655 movie.setSet(media.set);
00656 movie.setPlotoutline(media.plotoutline);
00657 movie.setSorttitle(media.sorttitle);
00658 movie.setYear(media.year);
00659 movie.setShowlink(media.showlink);
00660 movie.setTop250(media.top250);
00661 movie.setTrailer(media.trailer);
00662 movie.setCountry(media.country);
00663 movie.setStudio(media.studio);
00664 movie.setGenre(media.genre);
00665 movie.setTag(media.tag);
00666 movie.setTagline(media.tagline);
00667 movie.setImdbnumber(media.imdbnumber);
00668 movie.setMpaa(media.mpaa);
00669 movie.setVotes(media.votes);
00670 movie.setRating(media.rating);
00671 movie.setWriter(media.writer);
00672 movie.setOriginaltitle(media.originaltitle);
00673 }
00674
00675 return movie;
00676 }
00677
00683 private Media getTvshow(TVShowDetail media) {
00684 Tvshow tvshow = new Tvshow();
00685
00686 if (media != null) {
00687 this.getItemBase(tvshow, media);
00688
00689 tvshow.setMediaid(media.tvshowid);
00690 tvshow.setEpisode(media.episode);
00691 tvshow.setSeason(media.season);
00692 }
00693
00694 return tvshow;
00695 }
00696
00702 private Media getTvshowEpisode(EpisodeDetail media) {
00703 Tvshow tvshow = new Tvshow();
00704
00705 if (media != null) {
00706 this.getItem(tvshow, media);
00707
00708 tvshow.setMediaid(media.episodeid);
00709 tvshow.setEpisode(media.episode);
00710 tvshow.setSeason(media.season);
00711 tvshow.setTvshowid(media.tvshowid);
00712
00713 tvshow.setShowtitle(media.showtitle);
00714 tvshow.setFirstaired(media.firstaired);
00715 tvshow.setProductioncode(media.productioncode);
00716 tvshow.setVotes(media.votes);
00717 tvshow.setRating(media.rating);
00718 tvshow.setWriter(media.writer);
00719 tvshow.setOriginaltitle(media.originaltitle);
00720 }
00721
00722 return tvshow;
00723 }
00724
00730 private Media getAudioSong(SongDetail media) {
00731 Song song = new Song();
00732
00733 if (media != null) {
00734
00735
00736 song.setMediaid(media.songid);
00737 song.setTitle(media.title);
00738 song.setFanart(media.fanart);
00739 song.setThumbnail(media.thumbnail);
00740 song.setFile(media.file);
00741 song.setAlbum(media.album);
00742
00743
00744 song.setAlbumid(media.albumid);
00745 song.setArtist(media.artist);
00746
00747 song.setComment(media.comment);
00748 song.setDisc(media.disc);
00749 song.setDisplayartist(media.displayartist);
00750 song.setDuration(media.duration);
00751 song.setGenre(media.genre);
00752
00753 song.setLabel(media.label);
00754 song.setLastplayed(media.lastplayed);
00755 song.setLyrics(media.lyrics);
00756 song.setMusicbrainzalbumartistid(media.musicbrainzalbumartistid);
00757 song.setMusicbrainzalbumid(media.musicbrainzalbumid);
00758 song.setMusicbrainzartistid(media.musicbrainzartistid);
00759 song.setMusicbrainztrackid(media.musicbrainztrackid);
00760 song.setPlaycount(media.playcount);
00761 song.setRating(media.rating);
00762 song.setTrack(media.track);
00763 song.setYear(media.year);
00764 song.setRating(media.rating);
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776 }
00777
00778 return song;
00779 }
00780
00786 private Media getAudioAlbum(AlbumDetail media) {
00787 Album album = new Album();
00788
00789 if (media != null) {
00790
00791
00792 album.setMediaid(media.albumid);
00793 album.setTitle(media.title);
00794 album.setLabel(media.label);
00795 album.setAlbum(media.label);
00796 album.setFanart(media.fanart);
00797 album.setThumbnail(media.thumbnail);
00798
00799 album.setDescription(media.description);
00800 album.setMood(media.mood);
00801 album.setStyle(media.style);
00802 album.setTheme(media.theme);
00803 album.setType(media.type);
00804
00805
00806 album.setAlbumid(media.albumid);
00807 album.setArtist(media.artist);
00808
00809 album.setDisplayartist(media.displayartist);
00810 album.setGenre(media.genre);
00811
00812 album.setLabel(media.label);
00813 album.setMusicbrainzalbumartistid(media.musicbrainzalbumartistid);
00814 album.setMusicbrainzalbumid(media.musicbrainzalbumid);
00815 album.setPlaycount(media.playcount);
00816 album.setRating(media.rating);
00817 album.setYear(media.year);
00818 album.setRating(media.rating);
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830 }
00831
00832 return album;
00833 }
00834 }