Welcome, Guest
Python Scripts for ComicRack

TOPIC: Series Info Panel

Re:Series Info Panel 7 years 4 days ago #10686

  • freMea
  • freMea's Avatar
  • Offline
  • Junior Boarder
  • Posts: 38
  • Thank you received: 5
  • Karma: 1
hi,

With v0.11, infos related to a selected serie containing more than one book are not translated in locale language (french). If a lonely book is selected, it's ok.
The administrator has disabled public write access.

Re: Series Info Panel 7 years 3 days ago #10695

  • matrixik
  • matrixik's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Karma: 1
Hello, thank you for that excellent script.

Found one bug:
* even if I don't have checked "Cover" in "Series fields" I still see them (I must remove image cover line from default_series.html)
* about fileless eComics you know already then I don't count it

Some questions:
* is any way to display date in ISO format? Like published date but without hours and eventually without days, months if not set (YYYY-MM-DD, 2010-01-01) (btw. where I can put release day?)
* is it possible to display only first two lines from "Info Text" field? In format:
File name
Size in MB (Page Count)
Feature request:
* if link set to "example.com" then show it as clickable "example.com" instead of simple "Link"
* if possible: option to open link in default system browser (too bad info panel use trident instead of webkit)

Excellent idea with custom styles :) created new one already

Cheers
I am what I am.
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11346

  • cmk100
  • cmk100's Avatar
  • Offline
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
Hello,

Cover images do not dispay for me.
They do display with the Metadata info panel but not with this Series Info Panel.

I found the reason.

I right clicked the panel and did a view source.

The code shows the path to the temp images as:
<div style="text-align: center"><img src="C:\Documents%20and%20Settings\Administrator\Local%20Settings\Temp\tmp3A4.tmp.jpg" width="100px" alt="Cover"></div>

The temp image file does actually exist in the directory however the problem is that windows does not recognize the %20.

The plugin seems to put these %20 in automatically for blank spaces.


There are other lines in the source file that Do just have a blank space instead of the %20 such as the one for the rating stars:
<img src="C:\Documents and Settings\Administrator\Application Data\cYo\ComicRack\Scripts\Series Info Panel\com_rating_star_full.png" style="width: 24px; height: 24px;" alt="">

This type of line Does show the image.

Maybe that's a fixed path right. Hmm, I wonder why it puts in the %20 automatically for the dynamic image type.

I'm not a python coder so would you be able to help me fix this?
Last Edit: 6 years 10 months ago by cmk100.
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11347

  • pescuma
  • pescuma's Avatar
  • Offline
  • Expert Boarder
  • Posts: 115
  • Thank you received: 16
  • Karma: 21
Do one test for me, please: Edit file smallwide_series.html and replace the line:
<div style="text-align: center"><img src="$volume.Cover | url$" width="100px" alt="$translate('Cover')$"></div>

with
<div style="text-align: center"><img src="file:///$volume.Cover | url$" width="100px" alt="$translate('Cover')$"></div>
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11348

  • cmk100
  • cmk100's Avatar
  • Offline
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
Hello,

I did the test.

I replaced that line in smallwide_series.html with the new one and it still doesn't show the cover.

I also notice that I don't see the 1st page.

Ok so, when I right click on the image placeholder and go to properties it shows me this:
file:///C:/Documents%2520and%2520Settings/Administrator/Local%2520Settings/Temp/tmp30.tmp.jpg

however if I do a view source on the whole page it shows me the path with just the %20.


Attachment image001.jpg not found



just let me know if you want me to do anymore tests
Last Edit: 6 years 10 months ago by cmk100.
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11350

  • pescuma
  • pescuma's Avatar
  • Offline
  • Expert Boarder
  • Posts: 115
  • Thank you received: 16
  • Karma: 21
Ok, try with those two:
<div style="text-align: center"><img src="file:///$volume.Cover$" width="100px" alt="$translate('Cover')$"></div>
<div style="text-align: center"><img src="$volume.Cover$" width="100px" alt="$translate('Cover')$"></div>
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11351

  • cmk100
  • cmk100's Avatar
  • Offline
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
Ok, what I was testing before was actually only for a single issue selection as shown in my last screenshot.

So I went ahead and selected mutiple issues and saw that there was also the same problem with a multiple issue selection, so I modified the file smallwide_series.html.

I tested it with the 3 suggestions you gave me and each one works.
<div style="text-align: center"><img src="file:///$volume.Cover$" width="100px" alt="$translate('Cover')$"></div>
<div style="text-align: center"><img src="$volume.Cover$" width="100px" alt="$translate('Cover')$"></div>
<div style="text-align: center"><img src="file:///$volume.Cover | url$" width="100px" alt="$translate('Cover')$"></div>

You can see here that the Series Info Panel is now working for me for multiple selections:


Attachment Capture_001.jpg not found



There is still a problem however with the single issue selection in the file smallwide_issue.html.

I notice that the python code is different in this file and that the lines of code you provided for
the series file do not work in this one.

So now, could you provide a replacement for this line of code in smallwide_issue.html?
{{ if Cover }}
				<div style="text-align: center"><img src="$Cover | url$" width="100px" alt="Cover"></div>
			{{ endif }}

This is how the single issue selection looks with number of 1stpages=1:

Attachment Capture_002.jpg not found

Last Edit: 6 years 10 months ago by cmk100.
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11352

  • cmk100
  • cmk100's Avatar
  • Offline
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
Ok, I got the cover working for a single issue selection by changing the line:
{{ if Cover }}
		<div style="text-align: center"><img src="$Cover | url$" width="100px" alt="Cover"></div>
			{{ endif }}

to:
{{ if Cover }}
				<div style="text-align: center"><img src="file:///$Cover | url$" width="100px" alt="Cover"></div>
			{{ endif }}


Attachment Capture_003.jpg not found



As you can see, there is still a problem with the 1st page, could you help me with that?
The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11353

  • cmk100
  • cmk100's Avatar
  • Offline
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
  • Karma: 0
Well all right ! I got it working.

Thanks for the help pescuma !

I just added file:/// to the beginning of the HTML src attribute in the file smallwide_issue.html.

So now the code looks like this:
{{ for i in range(config.numOfFirstPages) }}
				<br><img src="file:///{{ book.GetPage(FirstNonCoverPageIndex + i) | url }}" width="100px" alt="$translate('PageId', 'Page %d') % (FirstNonCoverPageIndex + i)$">
			{{ endfor }}

I changed # of 1st pages to 5 in the options and it still works: :)


Attachment Capture_004.jpg not found

The administrator has disabled public write access.

Re: Series Info Panel 6 years 10 months ago #11354

  • pescuma
  • pescuma's Avatar
  • Offline
  • Expert Boarder
  • Posts: 115
  • Thank you received: 16
  • Karma: 21
Thanks for the help testing. I'll release a new version with those fixes.
The administrator has disabled public write access.
Time to create page: 0.214 seconds

Who's Online

We have 238 guests and 3 members online