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; }
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; }