View Single Post
Old 04-19-2021, 02:05 AM   #2228
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
By the way, now that the Edit ToC function is in place, updating my fanfics goes pretty smoothly. Here's my method:
  1. When finished an in-progress fanfic, stop on the last page and return to the menu. Connect Kobo and run Mark as Read on Device action chain:
    • Template to increment #kobobookmark by one and reset spans.
    • Set #read:true and #percentread:100
    • Restore bookmark (including reading status) to Kobo.
    This marks it as read on the device.
For me, I leave the book on the last page, and then remove it from the home screen. It will show up in the "Reading" list on the device, but, not occupy space on the home screen.

You could also just set the percent read to 100 and restore that. That should have it open to the last page if you do open it.
Quote:
  1. Fanfic is updated! Hooray! So now I run the Send to Device action chain:
    • Check that #fanficstatus is 'in-progress' and #percentread is 100. If it is, set #percentread:99%.
    • Either send to device or add to the 'send to device' reading list.'
Have you considered doing the #bookmark update here as part of this? Doing it in the previous change seems to be premature. You don't know that the book will be updated but yet you have set the current chapter to the next one and that doesn't exist. Doing it here means that it is a valid location to read from.
Quote:
  1. When the book is on the device, then run the Update Fanfic on Device action chain:
    • Update ToC for book.
    • Update reading status so it appears as currently reading on device.
    • Re-upload covers (mostly because I re-generate covers based on the fanfic status).

Aside from accidentally trying to run my chain while the book is still in the process of sending I've had no problems with it.
I have updated the ToC updater to give an error if there is a device job running. And I will be adding it to other functions where that could cause a problem. I think that will include the reading status restore.

Checking this isn't hard. The code the plugin calls is:

Code:
self.gui.job_manager.has_device_jobs(queued_also=True)
I haven't looked at the Actions Chains plugin enough to know if the above would be accessible. It probably needs a template function.

And I was sort of thinking of adding a "set reading location to first new chapter" for FFF produced books. But, something like what you are doing should work well.
davidfor is offline