mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-08-09 07:06:34 +00:00
changes to prevent doubled paths and support for transcoding
This commit is contained in:
parent
52bd5b662e
commit
1388eda326
2 changed files with 112 additions and 96 deletions
|
@ -250,4 +250,13 @@ def CleanName(filename):
|
|||
cleanedFilename = unicodedata.normalize('NFKD', filename).encode('ASCII', 'ignore')
|
||||
return ''.join(c for c in cleanedFilename if c in validFilenameChars)
|
||||
|
||||
|
||||
|
||||
def removeDirectory(path):
|
||||
if xbmcvfs.exists(path):
|
||||
allDirs, allFiles = xbmcvfs.listdir(path)
|
||||
for dir in allDirs:
|
||||
xbmcvfs.rmdir(os.path.join(path,dir))
|
||||
for file in allFiles:
|
||||
xbmcvfs.delete(os.path.join(path,file))
|
||||
|
||||
xbmcvfs.rmdir(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue