Skip to content
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

[Feature] Download only missing images when anabling offline mode #228

Open
SebiderSushi opened this issue Jun 17, 2020 · 6 comments
Open

Comments

@SebiderSushi
Copy link

Use case

I regularly back up my easy xkcd folder, partly because i like to prevent that i have to download them again, partly because i also manually fixed a few images by manually downloading comics Easy xkcd didn't fetch properly for me.
If needed, i simply restore that folder from a backup.
While setting up Easy xkcd on a new device, i see no option to prevent downloading exisiting images again.

I would like to have a way to tell the app to look for existing files in the offline directory (also for what-if) and re-use them instead of forcibly reloading all comics. I know that i can replace the easy xkcd directory after that but there might be situations where downloading ~200MB can be a problem, and at the very least is it unnecessary in my case and also takes up a few minutes.

@markolo25
Copy link

@tom-anders is this something you agree with and something i can start work on?

@markolo25 markolo25 mentioned this issue Oct 2, 2020
@tom-anders
Copy link
Owner

@markolo25 Definitely, go for it!

@nogarcia
Copy link
Contributor

nogarcia commented Oct 2, 2020

I had started to work on a patch yesterday and I'm in the middle of finishing it up; I guess we can see how our implementations differ.

@tom-anders
Copy link
Owner

Closing this along with the PR

@SebiderSushi
Copy link
Author

Thanks! This works very well now.

One thing i noticed is that Easy xkcd version 8.0.4 allows enabling the offline modes even without internet access. I'm not sure in which state the internal index is after doing that. What i observed was that Easy xkcd would open up and poperly load the current comic and swiping would work to some extent (maybe on the comics that had cached metadata from before enabling offline mode?), but especially when picking comics from the overview screen Easy xkcd would keep showing the loading animation even on comics that i had put into the offlineData directory.

I went ahead and wiped Easy xkcd's app data, copied the comic files i had to the offlineData directory again, then re-enabled offline mode while being connected to the internet. The notification appeared, showing that Easy xkcd would fetch the index. None of the image files were overwritten and everything works as expected now.

@tom-anders
Copy link
Owner

Thanks for pointing that out, I think enabling offline mode should be blocked when offline.

@tom-anders tom-anders reopened this Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants