File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
import os
3
3
import threading
4
4
from datetime import datetime
5
- from constants import DEFAULT_GEOMETRY , CONFIG_FILE
5
+ from constants import DEFAULT_GEOMETRY , CONFIG_FILE , VERSION
6
6
7
7
class ConfigHandler :
8
8
def __init__ (self ):
@@ -165,7 +165,10 @@ def save_config(self):
165
165
logger .log_debug (f"开始保存配置,最后天气位置: { self .last_weather_location } " )
166
166
167
167
# 准备配置数据(添加窗口位置和缺失的配置项)
168
+ # 处理版本号格式:去除点和横杠,只保留数字
169
+ cleaned_version = '' .join (c for c in VERSION if c .isdigit ())
168
170
config_data = {
171
+ "config_version" : cleaned_version , # 使用特殊字段名并存储处理后的版本号
169
172
"geometry" : self .geometry if self .geometry else DEFAULT_GEOMETRY ,
170
173
"countdown_name" : self .countdown_name ,
171
174
"countdown_date" : self .countdown_date .strftime ("%Y-%m-%d" ),
Original file line number Diff line number Diff line change 8
8
# 程序信息
9
9
APP_NAME = "桌面课程表 - Course Scheduler"
10
10
AUTHOR = "dong"
11
- VERSION = "0.1.15beta "
11
+ VERSION = "0.1.15-preview "
12
12
PROJECT_URL = "https://github.com/dongkid/course_scheduler"
You can’t perform that action at this time.
0 commit comments