Delete room file on empty playlist

This commit is contained in:
Assistant 2021-06-26 20:57:02 +02:00
parent f35cbbda3f
commit 5885a6ecf0

View File

@ -428,6 +428,10 @@ class Room(object):
if self._roomsDir is None:
return
if len(self._playlist) == 0:
try:
os.remove(os.path.join(self._roomsDir, self.sanitizeFilename(self._name)+'.room'))
except Exception:
pass
return
data = {}
data['name'] = self._name