Hi !
@Davidfor : What do you think of something like that ?
Code:
create trigger myscreensaver
after insert on content
for each row
when ContentID like '%screensaver%'
and ContentType = '9'
and MimeType = 'application/x-cbz'
and BookID like '%screensaver%’
BEGIN
-- reseting all screensaver as read
update content
set DateLastRead = '2015-01-01T12:00:00Z', ReadStatus = '2'
where ContentID like '%screensaver%'
and ContentType = '6'
and MimeType = 'application/x-cbz'
and BookID is null;
-- set the read image as a screensaver
update content
set DateLastRead = '2032-01-01T12:00:00Z', ReadStatus = '1'
where ContentID = new.BookID
and ChapterIDBookmarked = new.ContentID
and ContentType = ‘6’
and ContentID like '%screensaver%’;
END
Assuming all my images are in /screensaver/ named screensaver1..5.png.
The idea is to set a screensaver only by «*read it*» on the kobo.
I’m not fond of adding triggers to a database, though (but i prefer that to add script which read endlessly a log file). Didn’t test it yet, was only thinking during lunchtime.