From 21490a342f81914dcb0e72f243900f34b3968641 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Sun, 9 Aug 2015 10:42:22 +0300 Subject: [PATCH] subs copy from subfolder --- Core.py | 11 +++++++++++ Localization.py | 1 + 2 files changed, 12 insertions(+) diff --git a/Core.py b/Core.py index 2495e39..80e92eb 100644 --- a/Core.py +++ b/Core.py @@ -1090,6 +1090,17 @@ class Core: elif tdir and action == 'copy': path=os.path.join(folder, tdir) dirs, files=xbmcvfs.listdir(path) + if len(dirs) > 0: + dirs.insert(0, self.localize('./ (Root folder)')) + for dd in dirs: + dds=xbmcvfs.listdir(os.path.join(path,dd))[0] + if len(dds)>0: + for d in dds: + dirs.append(dd+os.sep+d) + ret = xbmcgui.Dialog().select(self.localize('Choose directory:'), dirs) + if ret > 0: + path=os.path.join(path, dirs[ret]) + dirs, files=xbmcvfs.listdir(path) for file in files: if not xbmcvfs.exists(os.path.join(path,file)): xbmcvfs.delete(os.path.join(path,file)) diff --git a/Localization.py b/Localization.py index 64d72cf..9667391 100644 --- a/Localization.py +++ b/Localization.py @@ -271,6 +271,7 @@ def localize(text): 'We would like to set some advanced settings for you!':'Нам нужно обновить продвинутые настройки для работы!', 'Do it!':'Скажите "ДА"!', 'Please, restart Kodi now!':'Теперь перезагрузите Коди, пожалуйста!', + './ (Root folder)':'./ (Корневой каталог)', }, 'uk': { 'Seeds searching.': 'Йде пошук сідів.',