coryo / ComicReader.bundle

Plex Media Server channel for comic archives.
137 stars 8 forks source link

[Request] try to save data to a database file #3

Open Bart274 opened 8 years ago

Bart274 commented 8 years ago

Hi,

Do you think it would be possible to add a database file in which you keep the read status of the comics and somehow make this visible in the channel? For example: read comics have their normal name, unread comics have an asterix before their name?

coryo commented 8 years ago

I think this could be accomplished.

Do you think adding a link before the 1st page of a comic with a toggle button be good?

example comic view:

I could also have it attempt to figure out when you reach the last page of a comic (or ~3rd last maybe) and mark it as read automatically. Having the button in the listing would probably still be necessary.

Bart274 commented 8 years ago

That would be awesome! :D Trying to detect when a comic is read automatically would be nice

Op 9 mei 2016 om 22:50 heeft Cory Parsons notifications@github.com het volgende geschreven:

I think this could be accomplished.

Do you think adding a link before the 1st page of a comic with a toggle button be good?

example comic view:

Mark as Read/Unread Comic-001.png Comic-002.png I could also have it attempt to figure out when you reach the last page of a comic (or ~3rd last maybe) and mark it as read automatically. Having the button in the listing would probably still be necessary.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

coryo commented 8 years ago

I've got a sort of working implementation of this in the master branch.

Plex clients don't like it when you add non-photos into a photo album, so I had to add an extra menu.

When you enter a comic from the main listing, you now end up in the Comic Menu which currently has two options view comic and mark read/unread. It costs an extra click to get into the comic, but it allows for more features to be added later. (maybe things like add to queue or favourites etc..)

Some plex clients also handle caching differently, so any status indicators may not update until you back out of the channel and go back in.

Bart274 commented 8 years ago

@coryo I have an issue with the read statusses: I've read a few comics now using the iOS app on my iphone and the status is saved nicely. When I opened the web app yesterday, I could see the read status and I could continu reading a comic that I have started and the status was also saved nicely. Now, yesterday evening, I wanted to continue reading on my ipad using the iOS app, but there all my comics were unread? Any idea how to solve this? I'm using the same account on all my devices?

coryo commented 8 years ago

The user management is a custom thing I had to make since plex channels don't normally have multi-user support.

I have a new branch where I've added a user switching menu: https://github.com/coryo/ComicReader.bundle/archive/users.zip

When you enter the main menu, it will tell you who it thinks you are. You can enter that menu and switch your username to any of the other usernames that the channel knows of. And it should remember that you've made the switch for the next time you come back.

Bart274 commented 8 years ago

Just wanted to tell you this: f'ing genius! :) it works perfectly! :)

Bart274 commented 8 years ago

@coryo I don't know if it is an issue with the switch users branch, don't now the read status of my folders didn't change anymore. I've read a comic this morning, it was the first of the series but the complete directory is still marked as new. 2016-06-07 06 42 43 2016-06-07 06 42 45

Bart274 commented 8 years ago

Looking at the log, I suspect the directory state keeps getting read from the cache but the cache never gets updated...

com.plexapp.plugins.comicreader.log.txt

coryo commented 8 years ago

Is this happening with all comics or just this one folder?

Can you manually cycle mark unread and mark read and get it to update the folder state?

Bart274 commented 8 years ago

@coryo I just tried it with the problem directory and there cycling through unread and read manually still didn't work. In another directory that did work

coryo commented 8 years ago

can you give me some of the plugin log when you do a mark read/unread?

you should have something like this happen:

INFO (logkit:16) - Mark unread. a=e:/comics\J.Rom Force Of Gold (2014)\J.Rom Force Of Gold 001 (2014).cbr
DEBUG (logkit:13) - updating tree e:/comics\J.Rom Force Of Gold (2014)\J.Rom Force Of Gold 001 (2014).cbr
DEBUG (logkit:13) - archive root: e:/comics\J.Rom Force Of Gold (2014)
DEBUG (logkit:13) - Calculating new series state. e:/comics\J.Rom Force Of Gold (2014)
coryo commented 8 years ago

I think I fixed it. Try out the users branch.