Skip to content

Commit

Permalink
Use the final URL (after following redirects) to determine the Dialog…
Browse files Browse the repository at this point in the history
… paths, fixes #169
  • Loading branch information
curiousdannii committed Jan 22, 2025
1 parent ba1e73c commit ed192dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class ParchmentLauncher {
cover_image_url,
play: this.load,
playing: !!this.options.autoplay,
title: story.title ?? /\/([^/]+)$/.exec((story.path || story.url)!)![1],
// At this point in time we don't know the final (after following redirects) URL of the storyfile. For Unboxer URLs we could have an ugly query string, so try to account for that by just cutting off the URL after the last =
title: story.title ?? /([/=])([^/=]+)$/.exec((story.path || story.url)!)![2],
},
})
if (this.options.autoplay) {
Expand Down
2 changes: 1 addition & 1 deletion src/upstream/asyncglk

0 comments on commit ed192dd

Please sign in to comment.