Display play progress in human-readable format.
This commit is contained in:
@@ -365,7 +365,7 @@ final class Index
|
|||||||
}
|
}
|
||||||
|
|
||||||
$item['full_title'] = $entity->getName();
|
$item['full_title'] = $entity->getName();
|
||||||
$item['progress'] = $entity->hasPlayProgress() ? $entity->getPlayProgress() : null;
|
$item['progress'] = $entity->hasPlayProgress() ? formatDuration($entity->getPlayProgress()) : null;
|
||||||
$item['event'] = ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, null);
|
$item['event'] = ag($entity->getExtra($entity->via), iState::COLUMN_EXTRA_EVENT, null);
|
||||||
|
|
||||||
$item = [
|
$item = [
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ final class ListCommand extends Command
|
|||||||
'via' => $entity->via ?? '??',
|
'via' => $entity->via ?? '??',
|
||||||
'date' => makeDate($entity->updated)->format('Y-m-d H:i:s T'),
|
'date' => makeDate($entity->updated)->format('Y-m-d H:i:s T'),
|
||||||
'played' => $entity->isWatched() ? 'Yes' : 'No',
|
'played' => $entity->isWatched() ? 'Yes' : 'No',
|
||||||
'progress' => $entity->hasPlayProgress() ? $entity->getPlayProgress() : 'None',
|
'progress' => $entity->hasPlayProgress() ? formatDuration($entity->getPlayProgress()) : 'None',
|
||||||
'event' => ag($entity->extra[$entity->via] ?? [], iState::COLUMN_EXTRA_EVENT, '-'),
|
'event' => ag($entity->extra[$entity->via] ?? [], iState::COLUMN_EXTRA_EVENT, '-'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user