File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed
Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 5151user_rating_field = "userrating"
5252user_rating_multiplier = 1
5353
54+ # Let you decide from where genres should be loaded from.
55+ # Possible values: "tags", "genres", "both"
56+ load_tags_from = "both"
57+
5458###############################################################################
5559# Do not change config below unless you are absolutely sure of what you do...
5660###############################################################################
Original file line number Diff line number Diff line change @@ -127,17 +127,20 @@ def __extract_nfo_date(self):
127127 return self ._nfo_root .findtext ("premiered" ) or year
128128
129129 def __extract_nfo_tags (self ):
130+ source = config .load_tags_from .lower ()
130131 file_tags = []
131- # from nfo <tag>
132- tags = self ._nfo_root .findall ("tag" )
133- for tag in tags :
134- if tag .text :
135- file_tags .append (tag .text )
136- # from nfo <genre>
137- genres = self ._nfo_root .findall ("genre" )
138- for genre in genres :
139- if genre .text :
140- file_tags .append (genre .text )
132+ if source in ["tags" , "both" ]:
133+ # from nfo <tag>
134+ tags = self ._nfo_root .findall ("tag" )
135+ for tag in tags :
136+ if tag .text :
137+ file_tags .append (tag .text )
138+ if source in ["genres" , "both" ]:
139+ # from nfo <genre>
140+ genres = self ._nfo_root .findall ("genre" )
141+ for genre in genres :
142+ if genre .text :
143+ file_tags .append (genre .text )
141144 return list (set (file_tags ))
142145
143146 def __extract_nfo_actors (self ):
You can’t perform that action at this time.
0 commit comments