Skip to content

fix: properly handle protocol URLs and file associations on Windows #3076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bjnoel
Copy link

@bjnoel bjnoel commented Jul 23, 2025

  • Fix protocol registration to specify electron path and app path in development mode

  • Add URL detection in second-instance handler to capture Windows command-line arguments

  • Extract protocol URLs (opds://, thorium://, http://, https://) from argv array

  • Improve OPDS feed title extraction using hostname or path segments

  • Remove unnecessary initialization delay in OPDS URL processing

    This fixes two related issues on Windows:

    1. OPDS protocol URLs (opds://) not being imported when clicked in browsers
    2. LCPL files not opening when double-clicked while Thorium is running

    Both issues were caused by Windows command-line arguments not being properly
    passed to the second instance handler. The fix ensures argv is correctly
    processed for both protocol URLs and file paths.

    Fixes the issue where clicking opds:// links would open Thorium but fail to
    import the catalog. Also fixes the issue where double-clicking .lcpl files
    would focus Thorium but not open the file.

Fixes #3075

- Fix protocol registration to specify electron path and app path in development mode
- Add URL detection in second-instance handler to capture Windows command-line arguments
- Extract protocol URLs (opds://, thorium://, http://, https://) from argv array
- Improve OPDS feed title extraction using hostname or path segments
- Remove unnecessary initialization delay in OPDS URL processing

  This fixes two related issues on Windows:
  1. OPDS protocol URLs (opds://) not being imported when clicked in browsers
  2. LCPL files not opening when double-clicked while Thorium is running

  Both issues were caused by Windows command-line arguments not being properly
  passed to the second instance handler. The fix ensures argv is correctly
  processed for both protocol URLs and file paths.

  Fixes the issue where clicking opds:// links would open Thorium but fail to
  import the catalog. Also fixes the issue where double-clicking .lcpl files
  would focus Thorium but not open the file.
@danielweck
Copy link
Member

very interesting, thank you for taking the time to troubleshoot and propose a PR.
we will look into this asap, we need to run tests on Mac and Linux to ensure no regressions.

danielweck added a commit that referenced this pull request Jul 28, 2025
@danielweck
Copy link
Member

Could you please merge develop into your branch, you will have conflicts but please simply adopt:

39d736f

As you can see I copy/pasted your code, thank you very much! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OPDS protocol URLs and LCPL file associations not working on Windows
2 participants