Skip to content

Commit

Permalink
✨ feat: Add list view to list
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Aug 26, 2024
1 parent 9f1a24d commit cd7d074
Show file tree
Hide file tree
Showing 3 changed files with 343 additions and 94 deletions.
9 changes: 7 additions & 2 deletions src/lib/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export function transformResolution(
if (rowData["Height"] && rowData["Width"]) {
return `${rowData["Width"]}x${rowData["Height"]}`;
}
if (rowData["Video:Height"] && rowData["Video:Width"]) {
return `${rowData["Video:Width"]}x${rowData["Video:Height"]}`;
}
return "";
}

Expand Down Expand Up @@ -106,8 +109,10 @@ export function transformTime(
rowData: Record<string, string>,
_rowIndex: number
): string {
if (rowData["Duration"]) {
const duration = parseInt(rowData["Duration"]);
if (rowData["Duration"] || rowData["General:Duration"]) {
const duration = parseInt(
rowData["Duration"] ?? rowData["General:Duration"]
);
const totalSeconds = Math.floor(duration / 1000.0);
const totalMinutes = Math.floor(totalSeconds / 60.0);
const totalHours = Math.floor(totalMinutes / 60.0);
Expand Down
Loading

0 comments on commit cd7d074

Please sign in to comment.