Fix video does not continuing from previous progress when opened
This commit is contained in:
1 parent
f681a7024c
commit
d2fbd59d6a
6 files changed
+31
-2
No files matched your search
@@ -78,6 +78,13 @@ export class PlayletApi {
|
||||
args.timestamp = parseInt(args.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.percentDurationWatched !== undefined) {
|
||||
if (typeof args.percentDurationWatched === "string") {
|
||||
args.percentDurationWatched = parseFloat(args.percentDurationWatched);
|
||||
}
|
||||
}
|
||||
|
||||
await PlayletApi.postJson(`${PlayletApi.host()}/api/queue/play`, args);
|
||||
}
|
||||
|
||||
@@ -99,6 +106,13 @@ export class PlayletApi {
|
||||
args.timestamp = parseInt(args.timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.percentDurationWatched !== undefined) {
|
||||
if (typeof args.percentDurationWatched === "string") {
|
||||
args.percentDurationWatched = parseFloat(args.percentDurationWatched);
|
||||
}
|
||||
}
|
||||
|
||||
await PlayletApi.postJson(`${PlayletApi.host()}/api/queue`, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
export let viewCount: number | undefined = undefined;
|
||||
export let isUpcoming: boolean = undefined;
|
||||
export let premiereTimestamp: number | undefined = undefined;
|
||||
export let percentDurationWatched: number | undefined = undefined;
|
||||
|
||||
export let videoStartAtChecked;
|
||||
export let videoStartAtTimestamp;
|
||||
@@ -69,6 +70,7 @@
|
||||
liveNow,
|
||||
viewCount,
|
||||
timestamp,
|
||||
percentDurationWatched,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,6 +105,7 @@
|
||||
bind:isUpcoming
|
||||
bind:premiereTimestamp
|
||||
bind:invidiousInstance
|
||||
bind:percentDurationWatched
|
||||
/>
|
||||
</div>
|
||||
<div class="m-4">{title || ""}</div>
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
bind:isUpcoming
|
||||
bind:premiereTimestamp
|
||||
bind:viewCount
|
||||
bind:percentDurationWatched
|
||||
videoStartAtChecked={false}
|
||||
videoStartAtTimestamp={0}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user