Skip to content

Commit d1eef1c

Browse files
author
Kazto Kitabatake
committed
Merge branch 'master' into release
2 parents b9141ef + 2987577 commit d1eef1c

8 files changed

Lines changed: 13 additions & 70 deletions

File tree

constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#アプリケーション基本情報
88
APP_NAME="TCV"
99
APP_FULL_NAME = "TwitCasting Viewer"
10-
APP_VERSION="3.5.3"
10+
APP_VERSION="3.5.4"
1111
APP_LAST_RELEASE_DATE = "2021-07-24"
1212
APP_ICON = None
1313
APP_COPYRIGHT_YEAR="2019-2026"

manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ def connect(self, userId):
167167
self.oldIsLive = self.connection.isLive
168168
self.oldMovieId = self.connection.movieId
169169
self.oldSubtitle = self.connection.subtitle
170-
self.oldItem = self.connection.item
171170
self.createItemList(first)
172171
self.typingTimer = wx.Timer(self.evtHandler, evtTyping)
173172
self.timers.append(self.typingTimer)

public/history.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Twitcasting Viewer(TCV) 更新履歴
22

3+
2026/08/30 Version 3.5.4
4+
1. ツイキャス側の変更によりアイテム投下ができなくなった問題を修正しました。
5+
2. アイテム情報の取得時に、使用していない情報を取得するための不要な通信を行っていた問題を修正しました。
6+
3. 表示言語を日本語以外に設定している場合に、コンティニューコインの枚数を元にしたタイマーの計算や音声ガイドが正しく動作しない問題を修正しました。
7+
38
2026/07/26 Version 3.5.3
49
1. 拡張機能用アカウントとしてツイキャスアカウント(「c:」で始まるもの)を設定しても、ログインに失敗してしまうようになった問題を修正しました。
510
2. 開発環境をPython 3.12に更新しました。

public/readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TwitCasting Viewer -TCV-
22

3-
バージョン:  ver.3.5.3
4-
リリース:   2026-07-26
3+
バージョン:  ver.3.5.4
4+
リリース:   2026-08-30
55
開発・配布元: ACT Laboratory (https://actlab.org/)
66
主要開発者:  北畠一翔
77
  ソフト種別:  オープンソースソフトウェア (GitHubリポジトリ:https://github.com/actlaboratory/TCV/)

twitcasting/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def update(self, mode=1):
157157
self.item = item
158158
self.coins = 0
159159
for i in self.item:
160-
if i["name"] == "コンティニューコイン":
160+
if i["id"] == "coin":
161161
self.coins = i["count"]
162162
else:
163163
if not hasattr(self, "item"):

twitcasting/getItem.py

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# アイテム情報取得モジュール
33

44
import requests
5-
from bs4 import BeautifulSoup
6-
import simpleDialog
7-
import re
85
import globalVars
96
import constants
107
from logging import getLogger
@@ -14,13 +11,6 @@
1411
log = getLogger("%s.%s" % (constants.LOG_PREFIX, "twitcasting.getItem"))
1512

1613

17-
ITEM_BAKU = {
18-
"coin": {
19-
"coin_baku5": 5,
20-
},
21-
}
22-
23-
2414
def getItem(screenId):
2515
log.debug("Getting items...")
2616
if globalVars.app.config["general"]["language"] == "ja-JP":
@@ -55,60 +45,9 @@ def getItem(screenId):
5545
itemId.append("MP")
5646
for name, count, id in zip(itemName, itemCount, itemId):
5747
if count > 0 or name == "MP":
58-
result.append({"name": name, "count": count, "id": id, "user": getItemPostedUser(screenId, id)})
48+
result.append({"name": name, "count": count, "id": id})
5949
return result
6050
except Exception as e:
6151
log.error(traceback.format_exc())
6252
return None
6353

64-
65-
def getItemPostedUser(screenId, itemId):
66-
if itemId == "MP":
67-
return
68-
if globalVars.app.config["general"]["language"] == "ja-JP":
69-
lang = "ja"
70-
else:
71-
lang = "en"
72-
try:
73-
req = requests.get("https://twitcasting.tv/%s/gifts" % (screenId)).text
74-
except:
75-
log.error("Connection failed(getItemPostedUser).")
76-
log.error(traceback.format_exc)
77-
if not hasattr(sys, "frozen"):
78-
import winsound
79-
winsound.Beep(1000, 1000)
80-
traceback.print_exc()
81-
return []
82-
soup = BeautifulSoup(req, "lxml")
83-
tmp = soup.find("section", {"class": "tw-supporter-gift-history"})
84-
if tmp is None:
85-
return []
86-
result = []
87-
for i in tmp.find_all("div", {"class": "tw-supporter-gift"}):
88-
try:
89-
item = i.find("div", {"class": "tw-supporter-item"}).a["href"]
90-
if re.match("javascript:((giftItem)|(showItemDialog)).*", item):
91-
if "," not in item or "'" not in item:
92-
continue
93-
start = item.index(",") + 3
94-
end = item.index("'", start)
95-
item = item[start:end]
96-
except Exception as e:
97-
log.error("Failed to get item Id on getItemPostedUser.")
98-
log.error(traceback.format_exc())
99-
continue
100-
try:
101-
user = i.find("a", {"class": "tw-user-name-icon"})["data-user-id"]
102-
except Exception as e:
103-
log.error("Failed to get user Id on getItemPostedUser.")
104-
log.error(traceback.format_exc())
105-
continue
106-
if item == itemId:
107-
result.append(user)
108-
# コイン爆対応
109-
if itemId in ITEM_BAKU:
110-
for j in ITEM_BAKU[itemId]:
111-
if j == item:
112-
log.debug(j)
113-
result += [user] * ITEM_BAKU[itemId][j]
114-
return result

twitcasting/postItem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ def getItemList(self):
2828
itemNames = []
2929
itemPoints = []
3030
for i in itemList.find_all("a"):
31-
match = re.match(r"javascript:giftItem\('.+?', '(.+?)', .+?\);", i["href"])
31+
match = re.match(r"javascript:giftItem\([^,]+,\s*[\"']([^\"']+)[\"']", i.get("href", ""))
3232
if match:
3333
itemIds.append(match.group(1))
3434
for i in itemList.find_all("span", class_="tw-item-list-item-name"):
3535
itemNames.append(str(i.get_text()))
3636
for i in itemList.find_all("span", class_="tw-item-list-item-amount"):
3737
itemPoints.append(int(i.get_text()))
3838
if not len(itemIds) == len(itemNames) == len(itemPoints):
39-
self.log.error("GetItemList failed.\nids=%s\nnames=%s\npoints=%s" % (",".join(itemIds), ",".join(itemNames), ",".join(itemPoints)))
39+
self.log.error("GetItemList failed.\nids=%s\nnames=%s\npoints=%s" % (",".join(itemIds), ",".join(itemNames), ",".join(map(str, itemPoints))))
4040
return []
4141
for i in range(len(itemIds)):
4242
self.items.append(Item(itemIds[i], itemNames[i], itemPoints[i]))

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version": "3.5.3", "release_date": "2026-07-26"}
1+
{"version": "3.5.4", "release_date": "2026-08-30"}

0 commit comments

Comments
 (0)