Skip to content

Commit 1cfbc60

Browse files
committed
分享文件默认文件名加入分组名称
1 parent 0496659 commit 1cfbc60

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

QBRssManager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,13 @@ def on_import_from_share_file_action(self):
837837
def on_export_to_share_file_action(self):
838838
logger.info('导出规则到文件进行分享')
839839
# 这里用完整路径可以设置默认名称
840+
default_file_name = 'rss订阅规则分享.json'
841+
group_name = g.data_groups[g.current_data_list_index]['name']
842+
if group_name:
843+
default_file_name = f"rss订阅规则分享-{group_name}.json"
844+
840845
file_info = QFileDialog.getSaveFileName(self, "选择输出目录文件",
841-
os.path.join(resource_path('.'), 'rss订阅规则分享.json'),
846+
os.path.join(resource_path('.'), default_file_name),
842847
"json 文件(*.json)")
843848
share_file_path = file_info[0]
844849
logger.info(f'导出文件 {share_file_path}')

0 commit comments

Comments
 (0)