add new settings
This commit is contained in:
@@ -17,6 +17,7 @@ from RSSEntry import RSSEntry, ChatEntry
|
||||
from typing import List
|
||||
from enum import Enum, unique
|
||||
from math import ceil, floor
|
||||
from config import SendUgoiraMethod
|
||||
from textc import textc, timeToStr
|
||||
from readset import settings
|
||||
from rssbotlib import have_rssbotlib
|
||||
@@ -47,6 +48,7 @@ class InlineKeyBoardForRSSList(Enum):
|
||||
GlobalSettingsPage = 20
|
||||
SendOriginFileName = 21
|
||||
SendUgoiraWithOriginPixFmt = 22
|
||||
SendUgoiraMethod = 23
|
||||
|
||||
|
||||
def getTextContentForRSSInList(rssEntry: RSSEntry, s: settings) -> str:
|
||||
@@ -80,6 +82,7 @@ def getTextContentForRSSInList(rssEntry: RSSEntry, s: settings) -> str:
|
||||
text += f"发送图片为文件:{config.send_img_as_file}"
|
||||
if have_rssbotlib:
|
||||
text += f'发送原始像素格式的Pixiv动图:{config.send_ugoira_with_origin_pix_fmt}'
|
||||
text += f'发送Pixiv动图为{config.send_ugoira_method}'
|
||||
text += f"RSS全局设置:"
|
||||
text += f"发送时使用原文件名:{config.send_origin_file_name}"
|
||||
return text.tostr()
|
||||
@@ -211,6 +214,11 @@ def getInlineKeyBoardForRSSSettingsInList(chatId: int, rssEntry: RSSEntry, index
|
||||
if have_rssbotlib:
|
||||
temp = f"{'禁用' if config.send_ugoira_with_origin_pix_fmt else '启用'}发送原始像素格式的Pixiv动图"
|
||||
d[i].append({'text': temp, 'callback_data': f'1,{chatId},{InlineKeyBoardForRSSList.SendUgoiraWithOriginPixFmt.value},{index},{rssEntry.id}'})
|
||||
d.append([])
|
||||
i += 1
|
||||
temp2 = SendUgoiraMethod((config.send_ugoira_method.value + 1) % 4)
|
||||
temp = f'发送Pixiv动图为{temp2}'
|
||||
d[i].append({'text': temp, 'callback_data': f'1,{chatId},{InlineKeyBoardForRSSList.SendUgoiraMethod.value},{index},{rssEntry.id},{temp2.value}'})
|
||||
d.append([])
|
||||
i = i + 1
|
||||
d[i].append(
|
||||
|
||||
Reference in New Issue
Block a user