View Single Post
Old 06-28-2025, 04:12 AM   #1
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,637
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Problem with template in Kobo Driver

I've got this template for subtitle in the Kobo Driver, and it has been working till now (it works indeed when I send the books):
Code:
program:
	pags = field ("#pag");
	subDes = field ("#subd_enc");
	miVal = field ("#mi_val");
     mediaStar = field ("#media_s");
	
	subTitle = pags ;
	if (subDes)
	then
		subTitle = subTitle & "-" & subDes
	fi;

	if (miVal > 0)
	then
		subTitle = subTitle & " (" & rating_to_stars(miVal, 0);
		if (fractional_part (miVal) !=# 0)
		then
			subTitle = subTitle & "½" & ")"
		else
			subTitle = subTitle & ")"
		fi
	fi;
	subTitle
Now, just out of the blue, I try to modify another configuration in the driver and I get this message:

Spoiler:
calibre, version 8.5.0
ERROR: Invalid template for Subtitle: <p>The template "program:
pags = field ("#pag");
subDes = field ("#subd_enc");
miVal = field ("#mi_val");
mediaStar = field ("#media_s");

subTitle = pags ;
if (subDes)
then
subTitle = subTitle & "-" & subDes
fi;

if (miVal > 0)
then
subTitle = subTitle & " (" & rating_to_stars(miVal, 0);
if (fractional_part (miVal) !=# 0)
then
subTitle = subTitle & "½" & ")"
else
subTitle = subTitle & ")"
fi
fi;
subTitle" is invalid:<br>The rating must be a number between 0 and 5



What has changed? As I haven't touched it since the Kobo Extended driver was deprecated.
Additional info: I see the json file has as date: Jun 5, 2025, that I added another collection to ignore, and the change was fine. I've been up to date with 8 version, so I would be running the latest release at that moment. And, furthermore, it has just worked when I've sent books to the device.

Last edited by Terisa de morgan; 06-28-2025 at 04:24 AM. Reason: Adding new info.
Terisa de morgan is offline   Reply With Quote