[Feature Request]: Add OneDrive Compatibility
Preflight Checklist
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe your suggested feature
Currently, whenever I open OpenComic, OneDrive immediately spams me with automatic download notifications of all files in my manga folder that happen to currently be stored remotely, not on the disk. I then have to manually cancel all the files that I don't want to download right now. I assume this is because OpenComic (or maybe the underlying 7zip) is accessing the files in a way that triggers the download. If possible, please have it only query the metadata of the files without triggering the OneDrive download to disk until I actually click on a file to read it. Even just ignoring files currently not on disk (making them invisible in OpenComic until I manually download them) would be very helpful to me.
Additional Information
No response
Sample file
No response
OpenComic has to read the compressed file (With 7zip or other libraries, depending of the file) to detect if it has a cover image or thumbnails, and also to get the list of files inside it and cache it. Once it has done this, it should not download the file again until you open it.
I'm not really sure how OneDrive works on Windows, so I don't know if it's possible to fix/mitigate this, but I'll take a look at it.
What you can do for now to mitigate this is as follows:
Wait for OpenComic to have all file information cached Once OpenComic has the list of the file cached, it will not reopen the file again.
Structure in folders/subfolders If you structure your OneDrive in folders and subfolders, OpenComic will only download the first 4 files in each folder to generate the thumbnails and the file cache.
@ollm I'm building OneDrive folder that is used to synchronise Mihon manga folder across device and planned to use OpenComic to read that collection on Windows. Each folder has CBZ file(s), ComicInfo.xml, and cover.jpg. I have this "master folder" set as online-only, which means OpenComic will try to download it to generate thumbnail.
I want to use my cover.jpg image as thumbnail but don't want to have it show up as it will neglect ignore single folder navigation. If I hide the cover.jpg to ignore file list, it will not being use as thumbnail. My question is
- Is it possible to use image file in the folder as thumbnail but still hide it from navigation?
- Is it possible to use image file in the folder as thumbnail without triggering reading of compressed file? So Use the first image as poster option will prioritizing finding image file first before resorting to scan compressed file to generate thumbnail.
- Is it possible to disable thumbnail image for compressed file altogether? In my use case, aside from single folders that I will provide cover image, I will set folder with hundread of chapters to show up at list any way so chapter thumbnail is not really neccessary.
Overall, I think what I want is option for OpenComic to only use image file as thumbnail for folder and not scanning any compressed files to generate chapter thumbnail, all in all to avoid triggering reading compressed file that will make OneDrive download it to local machine.
Hi @KrisadaFantasy.
@ollm I'm building OneDrive folder that is used to synchronise Mihon manga folder across device and planned to use OpenComic to read that collection on Windows. Each folder has
CBZfile(s),ComicInfo.xml, andcover.jpg. I have this "master folder" set as online-only, which means OpenComic will try to download it to generate thumbnail.I want to use my
cover.jpgimage as thumbnail but don't want to have it show up as it will neglect ignore single folder navigation. If I hide thecover.jpgto ignore file list, it will not being use as thumbnail. My question is
I believe this might be a bug, the Ignore Regex/Pattern shouldn't be used when searching for posters.
- Is it possible to use image file in the folder as thumbnail but still hide it from navigation?
It is indeed possible, if the image has the .tbn extension, it will be used as a poster but will not appear in the file list.
- Is it possible to use image file in the folder as thumbnail without triggering reading of compressed file? So Use the first image as poster option will prioritizing finding image file first before resorting to scan compressed file to generate thumbnail.
If there is an image in the same folder as the compressed file with the same name, it will be used as the poster image. Ideally, the image should have the .tbn extension if you don't want it to appear in the file list.
However, the compressed file will still be read, since it's currently not properly optimized and reads the compressed file first and then the parent folder. I will submit some changes to fix this.
https://opencomic.app/docs/guides/navigation/local-artwork-assets https://komga.org/docs/guides/local-artwork-assets/
- Is it possible to disable thumbnail image for compressed file altogether? In my use case, aside from single folders that I will provide cover image, I will set folder with hundread of chapters to show up at list any way so chapter thumbnail is not really neccessary. Overall, I think what I want is option for OpenComic to only use image file as thumbnail for folder and not scanning any compressed files to generate chapter thumbnail, all in all to avoid triggering reading compressed file that will make OneDrive download it to local machine.
Currently, it is not possible to completely disable thumbnail generation, although I do plan to implement soon that thumbnails are only generated for the files currently shown on screen, creating the others progressively as you scroll. When this is available, I will send you a build from the master branch.
I made some changes to improve poster retrieval and avoid unnecessary reads 53b5c42ee98ade28ad72c492bd9f6e67b119cd50. I also added progressive thumbnail generation based on scroll position 1d22f2290e81785f3c785af9d2eef132cea2935f which should also reduce OneDrive downloads.
If you'd like to try it, I'll leave you a build from the master branch.
Build: https://mega.nz/file/ffoQgJRb#pN4E6UUi8C1ZY9uDRjUCGGnWyaITz0xECVrUtFSh9rY
Thank you for your hard works! I will test it and report the result soon.
@ollm Thank you for taking the time to work on this! The build you sent seems to work fine WRT thumbnails and download requests. Strangely, the issue of OneDrive spam recently (within the past 2 weeks) stopped occurring, even though I didn't change my directory configuration and remained using OpenComic 1.2.0 as always. Maybe a OneDrive or Windows update?
(I usually stay on 1.2.0 because the auto-hide of the header bar is erratic on newer versions for me-- I'll look into opening a new issue for it, but I just turned off hiding the header for now lol)
Strangely, the issue of OneDrive spam recently (within the past 2 weeks) stopped occurring, even though I didn't change my directory configuration and remained using OpenComic 1.2.0 as always. Maybe a OneDrive or Windows update?
This is probably because OpenComic has finished generating thumbnails for all the files. As long as you don't clear OpenComic's cache, they shouldn't be generated again.
@ollm I test with folder on OneDrive set as online only. I think I can confirm @n-n-naomi case above that if there's already cache OpenComic will not try to generate thumbnail again. This is test on remove and then re-add library without clearing cache.
Back on to my case! I made 4 folders inside main folder;
- 10
CBZandcover.jpg - 10
CBZ - 1
CBZandcover.jpg - 1
CBZ
This is the results:
- Upon adding the main folder as library, OpenComic downloads either
cover.jpgor firstCBZand show 2*2 library thumbnail. - Open the library, the second folder downloads another 3
CBZand show 2*2 library thumbnails. - Folder with
cover.jpgwill not download anything unless directly open to generate chapter thumbnail.
This is great! We can keep downloading to minimum if the cache is not gone, I can set the files on OneDrive back to online only state again after first scanning.
I think because the nature as "library" make it assume that user might making folder as bookcase first instead of folder as single series so thumbnail is 22. It's not much if it's just 4 chapters being download but if the files are manga volume instead of just chapter then we can easily have half gigabyte of file download to generate 22 thumbnail. Would it be better to use just one image for thumbnail in any case instead of 2*2? Both have its good point so I will just leave it as possible topic of disscussion.
I believe this might be a bug, the Ignore Regex/Pattern shouldn't be used when searching for posters.
After I exclude my cover file, the folder with cover.jpg download 4 CBZ to generates 2*2 library thumbnails. I think this is indeed a bug that excluded poster. This issue happen to both newly added library and existing library. I try both cover.jpg and your example of /^(poster|cover|folder|thumbnail|default|series)\./iu
I think because the nature as "library" make it assume that user might making folder as bookcase first instead of folder as single series so thumbnail is 2_2. It's not much if it's just 4 chapters being download but if the files are manga volume instead of just chapter then we can easily have half gigabyte of file download to generate 2_2 thumbnail. Would it be better to use just one image for thumbnail in any case instead of 2*2? Both have its good point so I will just leave it as possible topic of disscussion.
To avoid downloading from subfolders, you can place a cover.jpg also in the series folder. This will be used as the poster.
Additionally, in the settings under Folders, there's an option to Use the first image as a poster. However, this only works if the folder contains a single subfolder or images, so it may not be useful in this case for now.
After I exclude my cover file, the folder with
cover.jpgdownload 4CBZto generates 2*2 library thumbnails. I think this is indeed a bug that excluded poster. This issue happen to both newly added library and existing library. I try bothcover.jpgand your example of/^(poster|cover|folder|thumbnail|default|series)\./iu
I've submitted a fix for this 7b52b28952cf2b6140541087c88e6278de32824c
Build: https://mega.nz/file/zDxA2BrQ#E-zXQtGEMOP-qijcAA6LAnO1M9rMiG3_vwQE30ueI8w
I've submitted a fix for this 7b52b28
It's not working. I can add/remove cover.jpg or /^(poster|cover|folder|thumbnail|default|series)\./iu to the list and watch my cover.jpg file being use or not use as poster.
I already have Use the first image as a poster enabled. I also try reinstalling the preogram.
I've sent this other fix 822f4d1f2b4d32359ec90f86ced5eb669211d46d. In my tests it seems to be working fine, but let me know if you find any issues, it ended up being a bit trickier to fix than I initially expected.
Build: https://mega.nz/file/LLoBjbiJ#zxwO7Maf53x9PVKE20T0gcrjnesDjqThuS5bVfkIY0I
It works now! Thank you so much for your hard work!
Closing this, since the fix is now available in v1.6.0