Пример #1
0
 private String getArtistForTrackList() {
   Music song;
   String lastArtist = null;
   boolean differentArtists = false;
   for (Item item : items) {
     song = (Music) item;
     if (lastArtist == null) {
       lastArtist = song.getAlbumArtist();
       continue;
     }
     if (!lastArtist.equalsIgnoreCase(song.getAlbumArtist())) {
       differentArtists = true;
       break;
     }
   }
   if (differentArtists || lastArtist == null || lastArtist.equals("")) {
     differentArtists = false;
     for (Item item : items) {
       song = (Music) item;
       if (lastArtist == null) {
         lastArtist = song.getArtist();
         continue;
       }
       if (!lastArtist.equalsIgnoreCase(song.getArtist())) {
         differentArtists = true;
         break;
       }
     }
     if (differentArtists || lastArtist == null || lastArtist.equals("")) {
       return getString(R.string.variousArtists);
     }
     return lastArtist;
   }
   return lastArtist;
 }
Пример #2
0
 public PlaylistSong(Music m) {
   super(
       m.getAlbum(),
       m.getArtist(),
       m.getAlbumArtist(),
       m.getFullpath(),
       m.getDisc(),
       m.getDate(),
       m.getTime(),
       m.getParentDirectory(),
       m.getTitle(),
       m.getTotalTracks(),
       m.getTrack(),
       m.getSongId(),
       m.getPos(),
       m.getName());
 }