|
|
@ -397,6 +397,8 @@ def generate_preference_list(
|
|
|
|
) -> List[MediaElement]:
|
|
|
|
) -> List[MediaElement]:
|
|
|
|
res_ids = list[int]()
|
|
|
|
res_ids = list[int]()
|
|
|
|
element_list = object_gen()
|
|
|
|
element_list = object_gen()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# add tags corresponding to collections
|
|
|
|
collections: Iterable[MediaCollection] = MediaCollection.select()
|
|
|
|
collections: Iterable[MediaCollection] = MediaCollection.select()
|
|
|
|
for coll in collections:
|
|
|
|
for coll in collections:
|
|
|
|
coll.tag_list.add(
|
|
|
|
coll.tag_list.add(
|
|
|
@ -405,7 +407,11 @@ def generate_preference_list(
|
|
|
|
use_for_preferences=True,
|
|
|
|
use_for_preferences=True,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# flush after custom tags
|
|
|
|
orm.flush()
|
|
|
|
orm.flush()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# gen elements
|
|
|
|
while True:
|
|
|
|
while True:
|
|
|
|
if len(element_list) <= 0:
|
|
|
|
if len(element_list) <= 0:
|
|
|
|
break
|
|
|
|
break
|
|
|
|