Пример #1
0
 public static SongListItem makeSongListItem(Song song) {
   SongListItem songlistitem;
   songlistitem = new SongListItem();
   songlistitem.title = song.mTrack;
   songlistitem.contentid = song.mContentId;
   songlistitem.groupcode = song.mGroupCode;
   songlistitem.singer = song.mArtist;
   songlistitem.point = Integer.toString(song.mPoint);
   songlistitem.img = song.mArtUrl;
   songlistitem.mMusicType = song.mMusicType;
   String s;
   Log.d("Utils", "song.mTrack = " + song.mTrack);
   Log.d("Utils", "song.mContentId = " + song.mContentId);
   Log.d("Utils", "song.mGroupCode" + song.mGroupCode);
   Log.d("Utils", "song.mArtist" + song.mArtist);
   Log.d("Utils", "song.mMusicType" + song.mMusicType);
   Log.d("Utils", "song.mArtUrl" + song.mArtist);
   Log.d("Utils", "song.mPoint" + song.mPoint);
   Log.d("Utils", "song.isDolby" + song.isDolby);
   if (song.isDolby) s = "1";
   else s = "0";
   songlistitem.isdolby = s;
   if (songlistitem.mMusicType != MusicType.LOCALMUSIC.ordinal()) {
     if (isDolby(song)) songlistitem.isdolby = "1";
   } else {
     songlistitem.url = song.mUrl;
   }
   return songlistitem;
 }
Пример #2
0
 public static Song makeDownloadItemToSong(DownloadItem downloaditem) {
   Song song = new Song();
   song.mId = downloaditem.getItemId();
   song.mTrack = downloaditem.getShowName();
   song.mContentId = downloaditem.getContentId();
   song.mGroupCode = downloaditem.getGroupCode();
   song.mArtist = downloaditem.getArtist();
   song.mMusicType = MusicType.LOCALMUSIC.ordinal();
   song.mUrl = downloaditem.getFilePath();
   song.mSize = downloaditem.getFileSize();
   return song;
 }
Пример #3
0
 public static Song makeSong2(SongListItem songlistitem) {
   Song song = new Song();
   song.mUrl = songlistitem.url;
   Log.d("song", "song.mUrl" + songlistitem.url);
   song.crbtValidity = songlistitem.crbtValidity;
   song.ringSongPrice = songlistitem.price;
   song.mTrack = songlistitem.songName;
   song.mContentId = songlistitem.songName;
   song.mGroupCode = songlistitem.musicid;
   song.mArtist = songlistitem.singerName;
   song.mMusicType = songlistitem.mMusicType;
   song.mArtUrl = songlistitem.img;
   song.mPoint = Integer.parseInt(songlistitem.point);
   song.isDolby = songlistitem.isdolby.equals("1");
   Log.d("Util", "song.mTrack = " + song.mTrack);
   Log.d("Util", "song.mContentId = " + song.mContentId);
   Log.d("Util", "song.mGroupCode" + song.mGroupCode);
   Log.d("Util", "song.mArtist" + song.mArtist);
   Log.d("Util", "song.mMusicType" + song.mMusicType);
   Log.d("Util", "song.mArtUrl" + song.mArtist);
   Log.d("Util", "song.mPoint" + song.mPoint);
   Log.d("Util", "song.isDolby" + song.isDolby);
   if (songlistitem.url1 != null
       && !songlistitem.url1.equals("")
       && !songlistitem.url1.equals("<unknown>")) {
     song.mUrl = songlistitem.url1;
     song.mSize = Long.valueOf(songlistitem.filesize1).longValue();
   }
   if (songlistitem.url2 != null
       && !songlistitem.url2.equals("")
       && !songlistitem.url2.equals("<unknown>")) {
     song.mUrl2 = songlistitem.url2;
     song.mSize2 = Long.valueOf(songlistitem.filesize2).longValue();
   }
   if (songlistitem.url3 != null
       && !songlistitem.url3.equals("")
       && !songlistitem.url3.equals("<unknown>")) {
     song.mUrl3 = songlistitem.url3;
     song.mSize3 = Long.valueOf(songlistitem.filesize3).longValue();
   }
   if (song.mMusicType == MusicType.LOCALMUSIC.ordinal()) song.mUrl = songlistitem.url;
   return song;
 }