Skip to content

Commit

Permalink
在更新资源前重置 table
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanbao2000 committed Nov 20, 2023
1 parent 0e20979 commit 92de2af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/mokabot_vndb/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self):
self.update()

def update(self):
self.table.clear()
with open(PathManager.vn_titles_csv, 'r', encoding='utf-8') as f:
"""
作者注:
Expand Down Expand Up @@ -90,6 +91,7 @@ def __init__(self):
self.update()

def update(self):
self.table.clear()
with open(PathManager.vn_csv, 'r', encoding='utf-8') as f:
lines = csv.reader(f, dialect='vndb')
for line in lines:
Expand All @@ -116,6 +118,7 @@ def __init__(self):
self.update()

def update(self):
self.table.clear()
with open(PathManager.chars_csv, 'r', encoding='utf-8') as f:
lines = csv.reader(f, dialect='vndb')
for line in lines:
Expand All @@ -142,6 +145,7 @@ def __init__(self):
self.update()

def update(self):
self.table.clear()
with open(PathManager.staff_alias_csv, 'r', encoding='utf-8') as f:
lines = csv.reader(f, dialect='vndb')
for line in lines:
Expand Down Expand Up @@ -174,6 +178,7 @@ def __init__(self):
self.update()

def update(self):
self.table.clear()
with open(PathManager.chars_vns_csv, 'r', encoding='utf-8') as f:
lines = csv.reader(f, dialect='vndb')
for line in lines:
Expand Down

0 comments on commit 92de2af

Please sign in to comment.