Welcome, Guest
Python Scripts for ComicRack

TOPIC: ComicRack.App.GetComicPage()

ComicRack.App.GetComicPage() 7 years 7 months ago #6391

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
cYo, you're probably the only one that can answer this.

In my script, I use the follow method:

ComicRack.App.GetComicPage(book, 0)

to obtain and display a copy of the first page (0) of a comic book.

But sometimes that first page has been marked by the user as "deleted" or as an "advertisment" or "other". In that case, I'd like to get the second or third page of the book:

ComicRack.App.GetComicPage(book, 1)
or
ComicRack.App.GetComicPage(book, 2)
etc.

My question is, how can I tell if a particular page has been marked as an "advertisement", etc? I'm guessing that there's an easy method for me to call, but I don't know what it is.

(Also I suppose to use this safely, I would also need to know how many pages there are in a comic book, too...is there an easy way for me to find that out?)

Thanks in advance.
The administrator has disabled public write access.

Re:ComicRack.App.GetComicPage(​) 7 years 7 months ago #6392

  • Stonepaw
  • Stonepaw's Avatar
  • Offline
  • Moderator
  • Posts: 920
  • Thank you received: 267
  • Karma: 173
I think I can answer a couple of your questions.

I don't know how to find what a pagetype is marked as but you can use book.FrontCoverPageIndex to return the page index set to front cover. In the case of multiple covers, at least in my tests, it returns the cover index currently set to be viewed in the thumbnail.
(Also I suppose to use this safely, I would also need to know how many pages there are in a comic book, too...is there an easy way for me to find that out?)
Yep. book.PageCount returns the number of pages in a comicbook.
The administrator has disabled public write access.

Re:ComicRack.App.GetComicPage(​) 7 years 7 months ago #6396

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Thanks Stonepaw, that works perfectly for what I need.
The administrator has disabled public write access.
Time to create page: 0.165 seconds

Who's Online

We have 207 guests and 5 members online