View Single Post
Old 05-02-2026, 04:18 PM   #9
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,800
Karma: 83105959
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by DNSB View Post
I think it broke on my Kobos between 4.38/45.23640 and 4.38/45.23649. The template tester still shows the series index converting from 5.08 to 5-8 but on the Kobo, the series index shows as 5.08.
This template works for me on fw 4.38.23684 - it turns 1.03 into 1-3 and 0 into unnumbered

Code:
program:
	if 
		'^omnibus$' inlist_field '#admintags' 	
		&& $series_index !=#0 
	then
		series_start = floor($series_index);
		fraction = fractional_part($series_index);
		if 
			fraction ==# 0 
		then
			result = series_start
		else
			series_end = floor(fraction*100);
		if 
			series_end >=# 0 
		then
				result = series_start & '-' & series_end
		fi
	fi

		elif 
			$series_index ==#0 
		then 
			result = ''
		else
			result = $series_index
		fi;
	result

Last edited by ownedbycats; 05-02-2026 at 04:23 PM.
ownedbycats is offline   Reply With Quote