public SelectedContentV3 createSelectedContentObject()
throws Exception {
boolean ourContent = DataSourceUtils.isPlatformContent(this);
SelectedContentV3 sc = new SelectedContentV3();
if (assetHash == null) {
// Contains no content
return sc;
}
dm = getDownloadManger();
if (dm != null) {
sc.setDisplayName(PlatformTorrentUtils.getContentTitle2(dm));
sc.setDownloadManager(dm);
return sc;
}else{
if ( torrent != null ){
sc.setTorrent( torrent );
}
}
sc.setDisplayName(getTorrentName());
if (sc.getDisplayName() == null) {
TOTorrent torrent = getTorrent();
if (torrent != null) {
sc.setDisplayName(TorrentUtils.getLocalisedName(torrent));
sc.setHash(torrent.getHashWrapper().toBase32String(), ourContent);
}
}
if (sc.getHash() == null ){
if ( assetHash != null ){
sc.setHash(assetHash, true);
}
}
sc.setThumbURL(assetImageURL);
sc.setImageBytes(imageBytes);
return sc;
}