Skip to content

Commit

Permalink
Force a reload if a name-change changes a meta file.
Browse files Browse the repository at this point in the history
  • Loading branch information
original-birdman authored and Huevos committed Dec 7, 2021
1 parent 3d6ba93 commit 70428ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/python/Screens/MovieSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,8 @@ def renameCallback(self, renameList, newname):

newname = newname.strip()
failedList = []
# Remember when we change a meta file.
need_reload = False
for item in renameList:
itemRef = item[0]
path = itemRef.getPath().rstrip('/')
Expand All @@ -2084,6 +2086,7 @@ def renameCallback(self, renameList, newname):
self.list.removeMark(itemRef)
if item[3]:
item[3].txt = newname
need_reload = True
else:
index = self.list.findService(itemRef)
self.list.invalidateItem(index)
Expand All @@ -2095,6 +2098,10 @@ def renameCallback(self, renameList, newname):
mbox = self.session.open(MessageBox, msg, type=MessageBox.TYPE_ERROR, timeout=5)
mbox.setTitle(self.getTitle())

# If we've changed meta-data, we need to reload/redisplay
#
if need_reload: self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)

def can_decode(self, item):
return self.list.countMarked() == 0 and item[0].getPath().endswith('.ts')

Expand Down

0 comments on commit 70428ef

Please sign in to comment.