View Single Post
Old 08-17-2013, 09:47 PM   #1604
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,018
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Linwe View Post
I have a few crossover fics and I want the "predominant" fandom listed in my custom column. For example, I have both Labyrinth/Harry Potter and Yugioh/Harry Potter crossovers, and a few 'pure' Harry Potter fics; the Laby/HP I want listed as Labyrinth, the YGO/HP listed as YGO, and obviously the HP to remain as the single fandom they are.
First, you can't use fandom in the conditional part of a replace_metadata for fandom. That causes an infinite loop as it evaluating fandom calls for the value of fandom, which needs to evaluate fandom, etc. So FFDL ignores replace_metadata conditionals that cause loops.

Code:
add_to_replace_metadata:
 fandom=>Yu-Gi-Oh=>YGO
 fandom=>Harry Potter=>Labyrinth&&category=>Labyrinth
 fandom=>YGO=>Harry Potter&&category=>YGO
You're still getting "Harry Potter, YGO" using this because category contains Yu-Gi-Oh, not YGO.
JimmXinu is offline