Search in sources :

Example 6 with DeviceMediaRenderer

use of com.biglybt.core.devices.DeviceMediaRenderer 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);
    }
}
Also used : Device(com.biglybt.core.devices.Device) DeviceMediaRenderer(com.biglybt.core.devices.DeviceMediaRenderer) TranscodeFile(com.biglybt.core.devices.TranscodeFile)

Aggregations

DeviceMediaRenderer (com.biglybt.core.devices.DeviceMediaRenderer)6 Device (com.biglybt.core.devices.Device)2 ContentDownload (com.biglybt.core.content.ContentDownload)1 ContentFile (com.biglybt.core.content.ContentFile)1 ContentFilter (com.biglybt.core.content.ContentFilter)1 DeviceManager (com.biglybt.core.devices.DeviceManager)1 DeviceTemplate (com.biglybt.core.devices.DeviceTemplate)1 TranscodeFile (com.biglybt.core.devices.TranscodeFile)1 IPCInterface (com.biglybt.pif.ipc.IPCInterface)1 TrackerWebPageRequest (com.biglybt.pif.tracker.web.TrackerWebPageRequest)1 IPCInterfaceImpl (com.biglybt.pifimpl.local.ipc.IPCInterfaceImpl)1 InetAddress (java.net.InetAddress)1 InetSocketAddress (java.net.InetSocketAddress)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1