use of com.biglybt.core.devices.TranscodeFile in project BiglyBT by BiglySoftware.
the class ColumnTJ_Category method refresh.
// @see com.biglybt.pif.ui.tables.TableCellRefreshListener#refresh(com.biglybt.pif.ui.tables.TableCell)
@Override
public void refresh(TableCell cell) {
TranscodeFile tf = (TranscodeFile) cell.getDataSource();
if (tf == null) {
return;
}
String[] cats = tf.getCategories();
String str = "";
for (String cat : cats) {
str += (str.length() == 0 ? "" : ",") + cat;
}
cell.setText(str);
}
use of com.biglybt.core.devices.TranscodeFile in project BiglyBT by BiglySoftware.
the class ColumnTJ_CopiedToDevice method refresh.
@Override
public void refresh(TableCell cell) {
TranscodeFile tf = (TranscodeFile) cell.getDataSource();
if (tf == null) {
return;
}
Device d = tf.getDevice();
String value = null;
if (d instanceof DeviceMediaRenderer) {
DeviceMediaRenderer dmr = (DeviceMediaRenderer) d;
if (!(dmr.canCopyToDevice() || dmr.canCopyToFolder())) {
value = na_text;
}
}
if (value == null) {
value = DisplayFormatters.getYesNo(tf.isCopiedToDevice());
}
if (cell.setSortValue(value) || !cell.isValid()) {
cell.setText(value);
}
}
use of com.biglybt.core.devices.TranscodeFile in project BiglyBT by BiglySoftware.
the class DeviceMediaRendererManual method initialise.
@Override
protected void initialise() {
super.initialise();
if (getPersistentBooleanProperty(PP_COPY_OUTSTANDING, false)) {
setCopyOutstanding();
}
addListener(new TranscodeTargetListener() {
@Override
public void fileAdded(TranscodeFile file) {
updateStatus(file);
}
@Override
public void fileChanged(TranscodeFile file, int type, Object data) {
updateStatus(file);
}
@Override
public void fileRemoved(TranscodeFile file) {
// do this to pick up change in copy-to-device state caused by removal
setCopyOutstanding();
}
private void updateStatus(TranscodeFile file) {
if (file.isComplete() && !file.isCopiedToDevice()) {
setCopyOutstanding();
}
}
});
}
use of com.biglybt.core.devices.TranscodeFile in project BiglyBT by BiglySoftware.
the class ColumnTJ_Resolution method refresh.
// @see com.biglybt.pif.ui.tables.TableCellRefreshListener#refresh(com.biglybt.pif.ui.tables.TableCell)
@Override
public void refresh(TableCell cell) {
TranscodeFile tf = (TranscodeFile) cell.getDataSource();
if (tf == null) {
return;
}
long width = tf.getVideoWidth();
long height = tf.getVideoHeight();
cell.setText((width == 0 || height == 0) ? "" : (width + "x" + height));
}
Aggregations