adds start_at
This commit is contained in:
@@ -30,6 +30,7 @@ const episode_attributes = derived<
|
|||||||
details: $details,
|
details: $details,
|
||||||
will_autoplay: $audio.autoplay,
|
will_autoplay: $audio.autoplay,
|
||||||
is_paused: $audio.paused,
|
is_paused: $audio.paused,
|
||||||
|
start_at: podcast_progress.get_episode($audio.src)?.start_at ?? 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,12 @@ const stash_episode_progress = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const get_episode_progress = (src: string): Pick<AudioLoadOptions, 'start_at'> | null => {
|
const get_episode_progress = (src: string): Pick<AudioLoadOptions, 'start_at'> | null => {
|
||||||
const start_at = _episode_progress_map.get(src);
|
const pathname = get_src_pathname(src);
|
||||||
|
const start_at = _episode_progress_map.get(pathname);
|
||||||
|
|
||||||
if (!start_at) return null;
|
if (!start_at) return null;
|
||||||
|
|
||||||
info('found saved progress: ', src, start_at);
|
info('found saved progress: ', pathname, start_at);
|
||||||
|
|
||||||
return { start_at: start_at };
|
return { start_at: start_at };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user