added result history, with the appropriate setting.
This commit is contained in:
@@ -3,6 +3,21 @@ from .base_classes import Section, IntAttribute, ListAttribute, BoolAttribute
|
||||
|
||||
class MiscSection(Section):
|
||||
def __init__(self):
|
||||
self.ENABLE_RESULT_HISTORY = BoolAttribute(
|
||||
name="result_history",
|
||||
description="If enabled, you can go back to the previous results.\n"
|
||||
"The consequence is a higher meory consumption, because every result is saved.",
|
||||
value="false"
|
||||
)
|
||||
|
||||
self.HISTORY_LENGTH = IntAttribute(
|
||||
name="history_length",
|
||||
description="You can choose how far back you can go in the result history.\n"
|
||||
"The further you choose to be able to go back, the higher the memory usage.\n"
|
||||
"'-1' removes the Limit entirely.",
|
||||
value="8"
|
||||
)
|
||||
|
||||
self.HAPPY_MESSAGES = ListAttribute(
|
||||
name="happy_messages",
|
||||
description="Just some nice and wholesome messages.\n"
|
||||
@@ -37,6 +52,8 @@ class MiscSection(Section):
|
||||
)
|
||||
|
||||
self.attribute_list = [
|
||||
self.ENABLE_RESULT_HISTORY,
|
||||
self.HISTORY_LENGTH,
|
||||
self.HAPPY_MESSAGES,
|
||||
self.MODIFY_GC,
|
||||
self.ID_BITS
|
||||
|
||||
@@ -99,3 +99,6 @@ SORT_BY_ALBUM_TYPE = AUDIO_SECTION.SORT_BY_ALBUM_TYPE.object_from_value
|
||||
ALBUM_TYPE_BLACKLIST: Set[AlbumType] = set(AUDIO_SECTION.ALBUM_TYPE_BLACKLIST.object_from_value)
|
||||
|
||||
THREADED = False
|
||||
|
||||
ENABLE_RESULT_HISTORY: bool = MISC_SECTION.ENABLE_RESULT_HISTORY.object_from_value
|
||||
HISTORY_LENGTH: int = MISC_SECTION.HISTORY_LENGTH.object_from_value
|
||||
Reference in New Issue
Block a user