Search in sources :

Example 1 with TagFeatureTranscode

use of com.biglybt.core.tag.TagFeatureTranscode in project BiglyBT by BiglySoftware.

the class ColumnTagXCode method refresh.

@Override
public void refresh(TableCell cell) {
    Tag tag = (Tag) cell.getDataSource();
    if (tag instanceof TagFeatureTranscode) {
        TagFeatureTranscode xcode = (TagFeatureTranscode) tag;
        if (xcode.supportsTagTranscode()) {
            String[] target_details = xcode.getTagTranscodeTarget();
            String target;
            if (target_details == null || target_details.length < 2) {
                target = "";
            } else {
                target = target_details[1];
            }
            if (!cell.setSortValue(target) && cell.isValid()) {
                return;
            }
            if (!cell.isShown()) {
                return;
            }
            cell.setText(target);
        }
    }
}
Also used : TagFeatureTranscode(com.biglybt.core.tag.TagFeatureTranscode) Tag(com.biglybt.core.tag.Tag)

Aggregations

Tag (com.biglybt.core.tag.Tag)1 TagFeatureTranscode (com.biglybt.core.tag.TagFeatureTranscode)1