mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-20 15:54:42 +01:00
fix: offline playback using player component
This commit is contained in:
@@ -34,13 +34,10 @@ export const useDownloadedFileOpener = () => {
|
||||
const openFile = useCallback(
|
||||
async (item: BaseItemDto) => {
|
||||
try {
|
||||
const url = await getDownloadedFileUrl(item.Id!);
|
||||
|
||||
setOfflineSettings({
|
||||
item,
|
||||
});
|
||||
setPlayUrl(url);
|
||||
|
||||
console.log(
|
||||
"Go to offline movie",
|
||||
"/player?offline=true&itemId=" + item.Id
|
||||
);
|
||||
// @ts-expect-error
|
||||
router.push("/player?offline=true&itemId=" + item.Id);
|
||||
} catch (error) {
|
||||
|
||||
@@ -71,10 +71,7 @@ export const useRemuxHlsToMp4 = () => {
|
||||
id: "",
|
||||
deviceId: "",
|
||||
inputUrl: "",
|
||||
item: {
|
||||
item,
|
||||
mediaSource,
|
||||
},
|
||||
item: item,
|
||||
itemId: item.Id!,
|
||||
outputPath: "",
|
||||
progress: 0,
|
||||
@@ -119,7 +116,7 @@ export const useRemuxHlsToMp4 = () => {
|
||||
|
||||
if (returnCode.isValueSuccess()) {
|
||||
if (!item) throw new Error("Item is undefined");
|
||||
await saveDownloadedItemInfo(item, mediaSource);
|
||||
await saveDownloadedItemInfo(item);
|
||||
toast.success("Download completed");
|
||||
writeToLog(
|
||||
"INFO",
|
||||
|
||||
Reference in New Issue
Block a user