增加欄位,預設隱藏部份的圖片
parent
c784689534
commit
aa9d0b01d4
27
settings.py
27
settings.py
|
@ -34,7 +34,7 @@ import ssl
|
||||||
|
|
||||||
ssl._create_default_https_context = ssl._create_unverified_context
|
ssl._create_default_https_context = ssl._create_unverified_context
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2023.11.05)"
|
CONST_APP_VERSION = "MaxBot (2023.11.06)"
|
||||||
|
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
|
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
|
||||||
|
@ -209,6 +209,7 @@ def load_translate():
|
||||||
en_us["adblock_plus_enable"] = 'Browser Extension'
|
en_us["adblock_plus_enable"] = 'Browser Extension'
|
||||||
en_us["adblock_plus_settings"] = "Adblock Advanced Filter"
|
en_us["adblock_plus_settings"] = "Adblock Advanced Filter"
|
||||||
en_us["disable_adjacent_seat"] = "Disable Adjacent Seat"
|
en_us["disable_adjacent_seat"] = "Disable Adjacent Seat"
|
||||||
|
en_us["hide_some_image"] = "Hide Some Images"
|
||||||
|
|
||||||
en_us["maxbot_slogan"] = 'MaxBot is a FREE and open source bot program. Wish you good luck.'
|
en_us["maxbot_slogan"] = 'MaxBot is a FREE and open source bot program. Wish you good luck.'
|
||||||
en_us["donate"] = 'Donate'
|
en_us["donate"] = 'Donate'
|
||||||
|
@ -310,6 +311,7 @@ def load_translate():
|
||||||
zh_tw["adblock_plus_enable"] = '瀏覽器擴充功能'
|
zh_tw["adblock_plus_enable"] = '瀏覽器擴充功能'
|
||||||
zh_tw["adblock_plus_settings"] = "Adblock 進階過濾規則"
|
zh_tw["adblock_plus_settings"] = "Adblock 進階過濾規則"
|
||||||
zh_tw["disable_adjacent_seat"] = "允許不連續座位"
|
zh_tw["disable_adjacent_seat"] = "允許不連續座位"
|
||||||
|
zh_tw["hide_some_image"] = "隱藏部份圖片"
|
||||||
|
|
||||||
zh_tw["maxbot_slogan"] = 'MaxBot是一個免費、開放原始碼的搶票機器人。\n祝您搶票成功。'
|
zh_tw["maxbot_slogan"] = 'MaxBot是一個免費、開放原始碼的搶票機器人。\n祝您搶票成功。'
|
||||||
zh_tw["donate"] = '打賞'
|
zh_tw["donate"] = '打賞'
|
||||||
|
@ -412,6 +414,7 @@ def load_translate():
|
||||||
zh_cn["adblock_plus_enable"] = '浏览器扩充功能'
|
zh_cn["adblock_plus_enable"] = '浏览器扩充功能'
|
||||||
zh_cn["adblock_plus_settings"] = "Adblock 进阶过滤规则"
|
zh_cn["adblock_plus_settings"] = "Adblock 进阶过滤规则"
|
||||||
zh_cn["disable_adjacent_seat"] = "允许不连续座位"
|
zh_cn["disable_adjacent_seat"] = "允许不连续座位"
|
||||||
|
zh_cn["hide_some_image"] = "隐藏一些图像"
|
||||||
|
|
||||||
zh_cn["maxbot_slogan"] = 'MaxBot 是一个免费的开源机器人程序。\n祝您抢票成功。'
|
zh_cn["maxbot_slogan"] = 'MaxBot 是一个免费的开源机器人程序。\n祝您抢票成功。'
|
||||||
zh_cn["donate"] = '打赏'
|
zh_cn["donate"] = '打赏'
|
||||||
|
@ -513,6 +516,7 @@ def load_translate():
|
||||||
ja_jp["adblock_plus_enable"] = '拡張機能'
|
ja_jp["adblock_plus_enable"] = '拡張機能'
|
||||||
ja_jp["adblock_plus_settings"] = "Adblock 高度なフィルター"
|
ja_jp["adblock_plus_settings"] = "Adblock 高度なフィルター"
|
||||||
ja_jp["disable_adjacent_seat"] = "連続しない座席も可"
|
ja_jp["disable_adjacent_seat"] = "連続しない座席も可"
|
||||||
|
ja_jp["hide_some_image"] = "一部の画像を非表示にする"
|
||||||
|
|
||||||
ja_jp["maxbot_slogan"] = 'MaxBot は無料のオープン ソース ボット プログラムです。チケットの成功をお祈りします。'
|
ja_jp["maxbot_slogan"] = 'MaxBot は無料のオープン ソース ボット プログラムです。チケットの成功をお祈りします。'
|
||||||
ja_jp["donate"] = '寄付'
|
ja_jp["donate"] = '寄付'
|
||||||
|
@ -662,6 +666,7 @@ def get_default_config():
|
||||||
|
|
||||||
config_dict["advanced"]["adblock_plus_enable"] = False
|
config_dict["advanced"]["adblock_plus_enable"] = False
|
||||||
config_dict["advanced"]["disable_adjacent_seat"] = False
|
config_dict["advanced"]["disable_adjacent_seat"] = False
|
||||||
|
config_dict["advanced"]["hide_some_image"] = True
|
||||||
config_dict["advanced"]["verbose"] = False
|
config_dict["advanced"]["verbose"] = False
|
||||||
config_dict["advanced"]["auto_guess_options"] = True
|
config_dict["advanced"]["auto_guess_options"] = True
|
||||||
config_dict["advanced"]["user_guess_string"] = ""
|
config_dict["advanced"]["user_guess_string"] = ""
|
||||||
|
@ -793,6 +798,7 @@ def btn_save_act(language_code, slience_mode=False):
|
||||||
global chk_state_ocr_captcha_ddddocr_beta
|
global chk_state_ocr_captcha_ddddocr_beta
|
||||||
global chk_state_ocr_captcha_force_submit
|
global chk_state_ocr_captcha_force_submit
|
||||||
global chk_state_adjacent_seat
|
global chk_state_adjacent_seat
|
||||||
|
global chk_state_hide_some_image
|
||||||
global chk_state_verbose
|
global chk_state_verbose
|
||||||
global chk_state_auto_guess_options
|
global chk_state_auto_guess_options
|
||||||
global combo_ocr_captcha_image_source
|
global combo_ocr_captcha_image_source
|
||||||
|
@ -947,6 +953,7 @@ def btn_save_act(language_code, slience_mode=False):
|
||||||
|
|
||||||
config_dict["advanced"]["adblock_plus_enable"] = bool(chk_state_adblock_plus.get())
|
config_dict["advanced"]["adblock_plus_enable"] = bool(chk_state_adblock_plus.get())
|
||||||
config_dict["advanced"]["disable_adjacent_seat"] = bool(chk_state_adjacent_seat.get())
|
config_dict["advanced"]["disable_adjacent_seat"] = bool(chk_state_adjacent_seat.get())
|
||||||
|
config_dict["advanced"]["hide_some_image"] = bool(chk_state_hide_some_image.get())
|
||||||
|
|
||||||
config_dict["ocr_captcha"] = {}
|
config_dict["ocr_captcha"] = {}
|
||||||
config_dict["ocr_captcha"]["enable"] = bool(chk_state_ocr_captcha.get())
|
config_dict["ocr_captcha"]["enable"] = bool(chk_state_ocr_captcha.get())
|
||||||
|
@ -1243,6 +1250,7 @@ def applyNewLanguage():
|
||||||
global chk_ocr_captcha_ddddocr_beta
|
global chk_ocr_captcha_ddddocr_beta
|
||||||
global chk_ocr_captcha_force_submit
|
global chk_ocr_captcha_force_submit
|
||||||
global chk_adjacent_seat
|
global chk_adjacent_seat
|
||||||
|
global chk_hide_some_image
|
||||||
global chk_verbose
|
global chk_verbose
|
||||||
global lbl_online_dictionary_url
|
global lbl_online_dictionary_url
|
||||||
global lbl_online_dictionary_preview
|
global lbl_online_dictionary_preview
|
||||||
|
@ -1259,6 +1267,7 @@ def applyNewLanguage():
|
||||||
global lbl_adblock_plus
|
global lbl_adblock_plus
|
||||||
global lbl_adblock_plus_settings
|
global lbl_adblock_plus_settings
|
||||||
global lbl_adjacent_seat
|
global lbl_adjacent_seat
|
||||||
|
global lbl_hide_some_image
|
||||||
global lbl_auto_reload_page_interval
|
global lbl_auto_reload_page_interval
|
||||||
global lbl_proxy_server_port
|
global lbl_proxy_server_port
|
||||||
global lbl_auto_reload_random_delay
|
global lbl_auto_reload_random_delay
|
||||||
|
@ -1291,6 +1300,7 @@ def applyNewLanguage():
|
||||||
lbl_ocr_captcha_not_support_arm.config(text=translate[language_code]["ocr_captcha_not_support_arm"])
|
lbl_ocr_captcha_not_support_arm.config(text=translate[language_code]["ocr_captcha_not_support_arm"])
|
||||||
lbl_webdriver_type.config(text=translate[language_code]["webdriver_type"])
|
lbl_webdriver_type.config(text=translate[language_code]["webdriver_type"])
|
||||||
lbl_adjacent_seat.config(text=translate[language_code]["disable_adjacent_seat"])
|
lbl_adjacent_seat.config(text=translate[language_code]["disable_adjacent_seat"])
|
||||||
|
lbl_hide_some_image.config(text=translate[language_code]["hide_some_image"])
|
||||||
lbl_auto_reload_page_interval.config(text=translate[language_code]["auto_reload_page_interval"])
|
lbl_auto_reload_page_interval.config(text=translate[language_code]["auto_reload_page_interval"])
|
||||||
lbl_proxy_server_port.config(text=translate[language_code]["proxy_server_port"])
|
lbl_proxy_server_port.config(text=translate[language_code]["proxy_server_port"])
|
||||||
lbl_auto_reload_random_delay.config(text=translate[language_code]["auto_reload_random_delay"])
|
lbl_auto_reload_random_delay.config(text=translate[language_code]["auto_reload_random_delay"])
|
||||||
|
@ -1317,6 +1327,7 @@ def applyNewLanguage():
|
||||||
chk_ocr_captcha_ddddocr_beta.config(text=translate[language_code]["enable"])
|
chk_ocr_captcha_ddddocr_beta.config(text=translate[language_code]["enable"])
|
||||||
chk_ocr_captcha_force_submit.config(text=translate[language_code]["enable"])
|
chk_ocr_captcha_force_submit.config(text=translate[language_code]["enable"])
|
||||||
chk_adjacent_seat.config(text=translate[language_code]["enable"])
|
chk_adjacent_seat.config(text=translate[language_code]["enable"])
|
||||||
|
chk_hide_some_image.config(text=translate[language_code]["enable"])
|
||||||
chk_verbose.config(text=translate[language_code]["enable"])
|
chk_verbose.config(text=translate[language_code]["enable"])
|
||||||
chk_auto_guess_options.config(text=translate[language_code]["enable"])
|
chk_auto_guess_options.config(text=translate[language_code]["enable"])
|
||||||
chk_auto_reload_random_delay.config(text=translate[language_code]["enable"])
|
chk_auto_reload_random_delay.config(text=translate[language_code]["enable"])
|
||||||
|
@ -1994,6 +2005,20 @@ def AdvancedTab(root, config_dict, language_code, UI_PADDING_X):
|
||||||
|
|
||||||
group_row_count +=1
|
group_row_count +=1
|
||||||
|
|
||||||
|
global lbl_hide_some_image
|
||||||
|
lbl_hide_some_image = Label(frame_group_header, text=translate[language_code]['hide_some_image'])
|
||||||
|
lbl_hide_some_image.grid(column=0, row=group_row_count, sticky = E)
|
||||||
|
|
||||||
|
global chk_state_hide_some_image
|
||||||
|
chk_state_hide_some_image = BooleanVar()
|
||||||
|
chk_state_hide_some_image.set(config_dict["advanced"]["hide_some_image"])
|
||||||
|
|
||||||
|
global chk_hide_some_image
|
||||||
|
chk_hide_some_image = Checkbutton(frame_group_header, text=translate[language_code]['enable'], variable=chk_state_hide_some_image)
|
||||||
|
chk_hide_some_image.grid(column=1, row=group_row_count, sticky = W)
|
||||||
|
|
||||||
|
group_row_count+=1
|
||||||
|
|
||||||
global lbl_verbose
|
global lbl_verbose
|
||||||
lbl_verbose = Label(frame_group_header, text=translate[language_code]['verbose'])
|
lbl_verbose = Label(frame_group_header, text=translate[language_code]['verbose'])
|
||||||
lbl_verbose.grid(column=0, row=group_row_count, sticky = E)
|
lbl_verbose.grid(column=0, row=group_row_count, sticky = E)
|
||||||
|
|
Loading…
Reference in New Issue