diff --git a/src/lib/components/ui/player/keybinds.svelte b/src/lib/components/ui/player/keybinds.svelte index 932e1b5..512b6e2 100644 --- a/src/lib/components/ui/player/keybinds.svelte +++ b/src/lib/components/ui/player/keybinds.svelte @@ -5,8 +5,6 @@ import { keys, layout, type KeyCode, codeMap } from './maps.ts' - import { SUPPORTS } from '$lib/modules/settings' - type Bind = Record> = T & { fn: (e: MouseEvent | KeyboardEvent) => void id: string diff --git a/src/lib/components/ui/player/subtitles.ts b/src/lib/components/ui/player/subtitles.ts index d2864bf..2a43ffa 100644 --- a/src/lib/components/ui/player/subtitles.ts +++ b/src/lib/components/ui/player/subtitles.ts @@ -350,7 +350,7 @@ export default class Subtitles { // replace all html special tags with normal ones Text = Text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/ /g, '\\h').replace(/\r?\n/g, '\\N') } else { - Text = Text.replace('\r', '') // some bad subbers put \n in the text, which breaks the rendering + Text = Text.replace(/\r?\n/g, '') } return { Start: subtitle.time, diff --git a/src/lib/components/ui/torrentclient/files/table.svelte b/src/lib/components/ui/torrentclient/files/table.svelte index 28fbb3d..51ac4c2 100644 --- a/src/lib/components/ui/torrentclient/files/table.svelte +++ b/src/lib/components/ui/torrentclient/files/table.svelte @@ -33,7 +33,7 @@ id: 'progress', cell: ({ value }) => createRender(ProgressCell, { value }) }), - table.column({ accessor: 'selections', header: 'Selections', id: 'selections' }) + table.column({ accessor: 'selections', header: 'Streams', id: 'selections' }) ]) const tableModel = table.createViewModel(columns) @@ -41,7 +41,7 @@ const { headerRows, pageRows, tableAttrs, tableBodyAttrs } = tableModel -
+
{#each $headerRows as headerRow, i (i)} @@ -77,7 +77,7 @@ {#each row.cells as cell (cell.id)} - + diff --git a/src/lib/components/ui/torrentclient/library/cells/name.svelte b/src/lib/components/ui/torrentclient/library/cells/name.svelte index 42b8a1d..bff3a47 100644 --- a/src/lib/components/ui/torrentclient/library/cells/name.svelte +++ b/src/lib/components/ui/torrentclient/library/cells/name.svelte @@ -2,4 +2,4 @@ export let value: string -
{value}
+
{value}
diff --git a/src/lib/components/ui/torrentclient/library/table.svelte b/src/lib/components/ui/torrentclient/library/table.svelte index dda6d38..764bac1 100644 --- a/src/lib/components/ui/torrentclient/library/table.svelte +++ b/src/lib/components/ui/torrentclient/library/table.svelte @@ -25,12 +25,14 @@ accessor: 'mediaID', header: 'Series', id: 'series', + plugins: { sort: { getSortValue: e => e ?? 0 } }, cell: ({ value }) => value ? createRender(MediaCell, { value }) : '?' }), table.column({ accessor: 'episode', header: 'Episode', id: 'episode', + plugins: { sort: { getSortValue: e => e ?? 0 } }, cell: ({ value }) => value?.toString() ?? '?' }), table.column({ accessor: 'files', header: 'Files', id: 'files' }), @@ -38,24 +40,28 @@ accessor: 'size', header: 'Size', id: 'size', + plugins: { sort: { getSortValue: e => e ?? 0 } }, cell: ({ value }) => value ? fastPrettyBytes(value) : '?' }), table.column({ accessor: 'progress', header: 'Status', id: 'completed', + plugins: { sort: { getSortValue: e => e ?? 0 } }, cell: ({ value }) => value ? createRender(StatusCell, { value: value === 1 }) : '?' }), table.column({ accessor: 'date', header: 'Date', id: 'date', + plugins: { sort: { getSortValue: e => e ?? 0 } }, cell: ({ value }) => value ? new Date(value).toLocaleDateString() : '?' }), table.column({ accessor: e => e?.name ?? e.hash, header: 'Torrent Name', id: 'name', + plugins: { sort: { getSortValue: e => e ?? '' } }, cell: ({ value }) => createRender(NameCell, { value }) }) ]) @@ -76,7 +82,7 @@ // $: allIDsPromise = client.multiple($lib.map(e => e.mediaID)) -
+
{#each $headerRows as headerRow, i (i)} @@ -88,16 +94,10 @@ props={cell.props()} let:attrs let:props> - - {#if cell.id !== 'flags'} - - - - {:else} -
- -
- {/if} + + + + {/each} @@ -109,10 +109,10 @@ {#if $pageRows.length} {#each $pageRows as row (row.id)} - { if (row instanceof DataBodyRow) playEntry(row.original) }}> + { if (row instanceof DataBodyRow) playEntry(row.original) }}> {#each row.cells as cell (cell.id)} - + diff --git a/src/lib/components/ui/torrentclient/overview.svelte b/src/lib/components/ui/torrentclient/overview.svelte index 578eba2..6b89fdb 100644 --- a/src/lib/components/ui/torrentclient/overview.svelte +++ b/src/lib/components/ui/torrentclient/overview.svelte @@ -31,7 +31,7 @@ const forwarding = safeLocalStorage('torrent-port-forwarding') ?? false -
+

{torrent.name || 'No Name Provided'}

diff --git a/src/lib/components/ui/torrentclient/peers/table.svelte b/src/lib/components/ui/torrentclient/peers/table.svelte index 7053900..6ce9c83 100644 --- a/src/lib/components/ui/torrentclient/peers/table.svelte +++ b/src/lib/components/ui/torrentclient/peers/table.svelte @@ -86,7 +86,7 @@ const { headerRows, pageRows, tableAttrs, tableBodyAttrs } = tableModel -
+
{#each $headerRows as headerRow, i (i)} diff --git a/src/lib/modules/extensions/extensions.ts b/src/lib/modules/extensions/extensions.ts index f3f5bd9..fc7689b 100644 --- a/src/lib/modules/extensions/extensions.ts +++ b/src/lib/modules/extensions/extensions.ts @@ -122,7 +122,7 @@ export function makeEpisodeList (media: Media, episodesRes?: EpisodesResponse | const { image, summary, overview, rating, title, length, airdate, anidbEid } = resolvedEpisode ?? {} const res = { - episode, image, summary: summary ?? overview, rating, title, length, airdate, airingAt, filler: !!fillerEpisodes[media.id]?.includes(episode + 1), anidbEid + episode, image, summary: summary ?? overview, rating, title, length, airdate, airingAt, filler: !!fillerEpisodes[media.id]?.includes(episode), anidbEid } episodeList.push(res) }