View Single Post
Old 06-14-2014, 10:16 PM   #2935
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,043
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by JimmXinu View Post
Oh, that's interesting--and possibly buggy. I confess I was mostly looking at the tags column while I was testing that. I'll look into it a bit.
Definitely buggy.

First, there's a bug in the 'a' option for custom_columns_settings--it always replaces everything anyway. But that's a one line fix. (I wonder how long that's been broken?)

Just ',' without split works for tag-like text columns because they get set as strings (not lists) and calibre splits them on the commas. Lists are ', '.join()ed before getting passed in to set custom columns--I didn't remember at first. Tags are kept as a list of string values because calibre expects Tags to be a list.

Your match anything pattern '(.*)' when applied to 'category' with a '\,' split causes the infinite recursion/loop I expected to see before, but couldn't find--I guess I didn't try hard enough. But it doesn't on _category, which has the same cause as the next issue:

I also see the issue with all but the first value of a '\,' split value being discarded when it's an extra_valid_entries, or rather a metadatum that uses include_in_X . That has to do with the way include_in_X is implemented conflicting with how '\,' split is implemented.

I now realize that the (very simplistic) way that I implied the '\,' split feature is fundamentally broken. As proven, it doesn't work with include_in_X and it has the risk of infinite recursion/loop--whether it's a recursion or a loop depends on how you look at it.

I have some ideas I'm going to pursue, but I thought I'd report back my progress now that I actually understand what's going on.
JimmXinu is offline