Skip to content

feat: displaying remote pdfs#405

Open
azfoo wants to merge 1 commit intoTimeLineAnnotator:fix-empty-media-pathfrom
azfoo:online-pdf
Open

feat: displaying remote pdfs#405
azfoo wants to merge 1 commit intoTimeLineAnnotator:fix-empty-media-pathfrom
azfoo:online-pdf

Conversation

@azfoo
Copy link
Collaborator

@azfoo azfoo commented Mar 18, 2026

No description provided.

@azfoo azfoo requested a review from FelipeDefensor March 18, 2026 01:43
Copy link
Collaborator

@FelipeDefensor FelipeDefensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant for v0.6?

This is complex functionality, I think we need a bunch of tests. Some edge cases we need to handle/test:

  • PDF is corrupted
  • URL does not point to a file with the PDF extension
  • Internet connection is down
  • Request to download returns failure

I would bet there are some more. I imagine some of those are already handled, but without tests it is not so easy to tell.

Also, Python has the tempfile module to handle temporary files and directories. Have you considered using that?

I have not reviewed the code yet.

@azfoo
Copy link
Collaborator Author

azfoo commented Mar 18, 2026

Is this meant for v0.6?

Not sure, but it would probably be nice to have, especially when loading files directly off imslp or when downloading from the online database.

Also, Python has the tempfile module to handle temporary files and directories. Have you considered using that?

The idea is that we save the files locally, but hidden, so that we keep the offline functionality after the first load, while keeping the original file links. There is a clear cache on exit option, but at the moment it doesn't delete the last opened pdfs, possibly because the files are in the process of being released by the closing app. I did consider tempfile, but that doesn't seem to persist between sessions.

@FelipeDefensor
Copy link
Collaborator

Is this meant for v0.6?
Not sure, but it would probably be nice to have, especially loading files directly off imslp or when downloading from the online database.

Definitely. Let's schedule this for v0.6.x, then?

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.

2 participants