View Single Post
Old 12-25-2011, 12:27 PM   #1
Loeffel
Connoisseur
Loeffel began at the beginning.
 
Loeffel's Avatar
 
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
Template for transfering books is ignored

Hi I just wonder what I am doing wrong. I try to select the path a book is saved onto my Kindle depending if it is coming from a series of books or not. So I changed the template under
'Preferences' => 'Sending book to devices'

My first program code was:

PHP Code:
program:
    
test(
        
field('series'),
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}',
        
'{author_sort}/{title} - {authors}'
    

then I changed the testing field and tried:

PHP Code:
program:
    
test(
        
field('series_index'),
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}',
        
'{author_sort}/{title} - {authors}'
    

after that I changed the programming and tried:

PHP Code:
program:
    
test(
        
ifempty(field('series_index'),'1'),
        
'{author_sort}/{title} - {authors}',
        
'{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title}'
    

because all that failed I finally put in:

PHP Code:
{author_sort}/{title} - {authors
I was shocked to see that the result was in all cases the same! Calibre always uses
PHP Code:
{series}/{series} - Band_{series_index} - {authors} - {series_index}_{title
as template. Sonething I totally do not understand as changing the template was never a problem.
Until now I switched between those to templates manually before uploading books to my Kindle. Now it doesn't work anymore. I am confused.
I wanted to make the switching automatically by programming a script, but now it doesn't work at all.

I found somewhere in the forum that it should be set on 'Save books to disk' too, but even that doesn't change anything. :-(
The programming would be so useful and I used it already to set 'column' colors.


By the way, it is possible to delete the templates, that aren't used anymore?
Loeffel is offline   Reply With Quote