You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple Books always stores some books back to the iCloud if we don't use them for a long time.
Is it possible to download and open the book automatically when it’s on the cloud (just like what happens when we click the book in the books app)? Now the workflow works nothing on the non-local books.
The text was updated successfully, but these errors were encountered:
So AFAIK it really depends on which part of the cloud it's on, but at least partially it seems, yes! Up to now I've intentionally added the message to ensure the user knows they can just go into the app and download the book locally first, which is accomplished simply by checking in the Books database if there's a path to the book or not, and then checking if the path actually exists (which it doesn't if it's on your iCloud Drive but hasn't been downloaded locally):
It is very interesting because using Spotlight search, you can actually open these books directly from iCloud; they will be downloaded and then have a path that exists; then Alfred Books will work as normal. I actually found a utility that can do this, which may be able to simulate or replicate the behavior of what is happening in Spotlight: brctl
It's a built-in utility which I've tested and works; it allows you to download an iCloud file using the path to it, which we have from the Books database. Unfortunately I don't yet know a good way to determine "when" the file is downloaded, meaning we may just need to poll for if the file exists for a certain time and then take an appropriate action... More info on this utility at this Stack Exchange link.
Now, this doesn't address an elephant in the room, which is if you have books that are stored in iCloud but aren't on your iCloud Drive. I believe this case pops up when you download from the iBooks Store from a separate computer; there is no book in your iCloud Drive because it's hosted on the iBooks Store. In this case, Spotlight will not find the books and Alfred Books currently won't either based on the logic it's currently using. There is a handy 'ZCANREDOWNLOAD' flag in the database which I assume allows you to know whether or not a book can be re-downloaded. In this case I think we need to push a message similar to the one currently displaying that Books needs to be opened first to be able to be opened in Alfred Books.
If we can get the iCloud Drive function working with the brctl command, that will probably take care of the common issue where you have a book on one device, stored in iCloud Drive, but not on the other. We can also just open the books app for books that are actioned but not downloaded and aren't stored on the user's iCloud Drive.
Apple Books always stores some books back to the iCloud if we don't use them for a long time.
Is it possible to download and open the book automatically when it’s on the cloud (just like what happens when we click the book in the books app)? Now the workflow works nothing on the non-local books.
The text was updated successfully, but these errors were encountered: