diff --git a/main.py b/main.py index ae9e912..66dfc51 100644 --- a/main.py +++ b/main.py @@ -243,7 +243,11 @@ def resizeEvent(self, event): # /////////////////////////////////////////////////////////////// def mousePressEvent(self, event): # SET DRAG POS WINDOW - self.dragPos = event.globalPos() + p = event.globalPosition() + globalPos = p.toPoint() + self.dragPos = globalPos + + # self.dragPos = event.globalPos() # PRINT MOUSE EVENTS if event.buttons() == Qt.LeftButton: diff --git a/modules/home/WorkPage.ui b/modules/home/WorkPage.ui index fa44226..4d017a7 100644 --- a/modules/home/WorkPage.ui +++ b/modules/home/WorkPage.ui @@ -13,169 +13,109 @@ MainWindow - + - + - + - - - - - 视频缓存目录: - - - - - - - - 0 - 30 - - - - background-color: rgb(33, 37, 43); - - - true - - - true - - - - - - - - 120 - 30 - - - - background-color: rgb(52, 59, 72); - - - 选择目录 - - - - + + + 视频缓存目录: + + + + + + + + 0 + 30 + + + + background-color: rgb(33, 37, 43); + + + true + + + true + + - + + + + 120 + 30 + + + + background-color: rgb(52, 59, 72); + + + 选择目录 + + + + + + + + + + + + 120 + 30 + + + + background-color: rgb(52, 59, 72); + + + 上一级 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - + 120 30 + + false + background-color: rgb(52, 59, 72); - 上一级 + 完成文件 - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 120 - 30 - - - - false - - - background-color: rgb(52, 59, 72); - - - 完成文件 - - - - - - - - 120 - 30 - - - - background-color: rgb(52, 59, 72); - - - 全选 - - - - - - - - 120 - 30 - - - - background-color: rgb(52, 59, 72); - - - 刷新 - - - - - - - - - - - false - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + 120 @@ -186,12 +126,12 @@ background-color: rgb(52, 59, 72); - 提取音频 + 全选 - + 120 @@ -202,27 +142,180 @@ background-color: rgb(52, 59, 72); - 合并 + 刷新 - - - - Qt::Horizontal - - - - 40 - 20 - - - - + + + + false + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 20 + + + + background-color: rgb(52, 59, 72); + + + 上一页 + + + + + + + + 100 + 20 + + + + + 50 + 16777215 + + + + background-color: rgb(52, 59, 72); + + + Qt::AlignCenter + + + + + + + + 100 + 20 + + + + background-color: rgb(52, 59, 72); + + + 下一页 + + + + + + + + 0 + 20 + + + + 总页数: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 120 + 30 + + + + background-color: rgb(52, 59, 72); + + + 提取音频 + + + + + + + + 120 + 30 + + + + background-color: rgb(52, 59, 72); + + + 合并 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + @@ -252,9 +345,14 @@ - - - + + + MlLineEdit + QWidget +
modules.home.ui.MlLineEdit.h
+
+
+ t1() diff --git a/modules/home/convertbar/BaseAction.py b/modules/home/convertbar/BaseAction.py index 208c588..6cda51b 100644 --- a/modules/home/convertbar/BaseAction.py +++ b/modules/home/convertbar/BaseAction.py @@ -20,7 +20,7 @@ def collection2ChapterList(self, manage: DataShowManager): newSelectedCacheList = [] for item in manage.selectedCacheList: # 获取合集里的章节路径 - chapterPathList = manage.getAllChapterPathByCollection(item.getPath()) + chapterPathList = manage.getAllChapterPathByCollection(item.getParentPath()) for ite in chapterPathList: totalCacheDirCount += 1 # 通过章节路径获取缓存信息 diff --git a/modules/home/convertbar/impl/ConvertAction.py b/modules/home/convertbar/impl/ConvertAction.py index e45ed57..6bc2ecf 100644 --- a/modules/home/convertbar/impl/ConvertAction.py +++ b/modules/home/convertbar/impl/ConvertAction.py @@ -34,6 +34,10 @@ def handleMerge(self): # 有效的缓存数量 effectiveCacheDirCount = len(selectedList) + if(effectiveCacheDirCount==0): + QMessageBox.question(None, "提示", f"你还没有勾选",QMessageBox.StandardButton.Ok) + return + progress_step = 100 / effectiveCacheDirCount progress_value = 0 diff --git a/modules/home/dataarea/DataShowManager.py b/modules/home/dataarea/DataShowManager.py index 3569e33..9dbfc23 100644 --- a/modules/home/dataarea/DataShowManager.py +++ b/modules/home/dataarea/DataShowManager.py @@ -1,10 +1,11 @@ +import math import os from enum import Enum from typing import List from PySide6.QtCore import Qt from PySide6.QtGui import QPixmap -from PySide6.QtWidgets import QTableWidget, QTableWidgetItem, QMainWindow +from PySide6.QtWidgets import QTableWidget, QTableWidgetItem, QMainWindow, QLineEdit, QLabel, QPushButton from modules.home.base.BaseService import BaseService from modules.home.entity.CacheInfo import CacheInfo @@ -28,6 +29,9 @@ class CacheFileTpye(Enum): PHONE = 1 +# 页面大小 +PAGE_SIZE = 15 + # 列表数据 class DataShowManager(BaseService): def __init__(self, mContext): @@ -41,14 +45,42 @@ def __init__(self, mContext): # 进行分页的索引 self.pageIndex = 1 + # 总页数 + self.totalPageCount = 1 + + # 设置监听 def setConnect(self, context: QMainWindow): ui = self.getUI() dataListWidget: QTableWidget = ui.dataTableWidget + self.prePageBtn :QPushButton= ui.prePageBtn + self.sufPageBtn :QPushButton= ui.sufPageBtn # 勾选状态改变监听 dataListWidget.itemChanged.connect(self.handItemChange) dataListWidget.itemDoubleClicked.connect(self.handItemDoubleClick) + self.prePageBtn.clicked.connect(lambda :self.handleClicked(self.prePageBtn)) + self.sufPageBtn.clicked.connect(lambda :self.handleClicked(self.sufPageBtn)) + + def handleClicked(self,view): + context = self.getContext() + cachePath = context.getCachePath() + ui = self.getUI() + edit:QLineEdit = ui.curPageEdit + viewName = view.objectName() + editPageIndex = int (edit.text()) + + print(editPageIndex) + if viewName == "prePageBtn": + if editPageIndex>1: + self.showDataPageByFileStructure(cachePath,editPageIndex-1) + if viewName == "sufPageBtn": + if editPageIndex>self.totalPageCount or editPageIndex==self.totalPageCount: + self.showDataPageByFileStructure(cachePath,self.totalPageCount) + else: + self.showDataPageByFileStructure(cachePath, editPageIndex+1) + pass + # 是否是集合页面 def isCollectionPage(self): if self.dataPageType == DataPageType.COLLECTION_PAGE: @@ -60,7 +92,7 @@ def isCollectionPage(self): def handItemDoubleClick(self, item: QTableWidgetItem): if self.isCollectionPage(): cacheInfo = self.cacheDataList[item.row()] - self.showDataPageByFileStructure(cacheInfo.getPath()) + self.showDataPageByFileStructure(cacheInfo.getParentPath()) # 清理所有的数据 def clearDataList(self): @@ -73,7 +105,7 @@ def clearDataList(self): dataListWidget.setHorizontalHeaderLabels(["标题", "路径"]) # 根据文件结构显示数据页面 - def showDataPageByFileStructure(self, cachePath): + def showDataPageByFileStructure(self, cachePath,pageIndex=1): if cachePath == "" or cachePath is None: return @@ -93,11 +125,11 @@ def showDataPageByFileStructure(self, cachePath): for filePath in thrFileList: if filePath.endswith("entry.json"): context.setCacheFileTpye(CacheFileTpye.PHONE) - self.showChapterDataPage(cachePath) + self.showChapterDataPage(cachePath,pageIndex) return if filePath.endswith(".videoInfo"): context.setCacheFileTpye(CacheFileTpye.PC) - self.showChapterDataPage(cachePath) + self.showChapterDataPage(cachePath,pageIndex) return thrDirList = PathUtils.listSubDir(subDirList[0]) if CommonUtils.isListEmpty(thrDirList): @@ -109,29 +141,40 @@ def showDataPageByFileStructure(self, cachePath): return for filePath in forFileList: if filePath.endswith("entry.json"): - self.showCollectionDataPage(cachePath) + self.showCollectionDataPage(cachePath,pageIndex) return # 显示合集页面 - def showCollectionDataPage(self, cachePath): + def showCollectionDataPage(self, cachePath,pageIndex): self.dataPageType = DataPageType.COLLECTION_PAGE - self.pageIndex = 1 + self.pageIndex = pageIndex self.clearDataList() + # 章节路径列表 + chapterPaths = self.getCollectionPageData(cachePath) - context = self.getContext() + # 计算总页数 + self.totalPageCount = math.ceil(len(chapterPaths) / PAGE_SIZE) ui = self.getUI() dataListWidget: QTableWidget = ui.dataTableWidget + curPageEdit: QLineEdit = ui.curPageEdit + curPageEdit.setText(str(pageIndex)) + totalPageLabel: QLabel = ui.totalPageLabel + totalPageLabel.setText(f"总页数:{self.totalPageCount}") + if pageIndex == self.totalPageCount: + tempChapterPaths = chapterPaths[(pageIndex - 1) * PAGE_SIZE:] + else: + tempChapterPaths = chapterPaths[(pageIndex - 1) * PAGE_SIZE:pageIndex * PAGE_SIZE] + - chapterPaths = self.getCollectionPageData(cachePath) - # chapterPaths = dataPageData realIndex = 0 - for index, item in enumerate(chapterPaths): + for index, item in enumerate(tempChapterPaths): info = self.getCacheInfoByPhone(item) json = JsonUtils.parseJson(info) # 获取父目录 - info.setPath(os.path.dirname(item)) + info.setPath(item) + info.setParentPath(os.path.dirname(item)) info.setSubTitle(json.get_subTitle()) info.setTitle(json.get_title()) self.cacheDataList.append(info) @@ -141,7 +184,7 @@ def showCollectionDataPage(self, cachePath): dataItem.setTextAlignment(Qt.AlignCenter) # 设置单元格内容居中对齐 dataItem.setCheckState(Qt.CheckState.Unchecked) - dataItem: QTableWidgetItem = QTableWidgetItem(info.getPath()) + dataItem: QTableWidgetItem = QTableWidgetItem(info.getParentPath()) dataListWidget.setItem(realIndex, 1, dataItem) @@ -153,9 +196,7 @@ def showCollectionDataPage(self, cachePath): realIndex += 1 - # dataListWidget.resizeRowsToContents() - # 重新设置单元格大小 - # dataListWidget.resizeColumnsToContents() + def handleImageLoaded(self, table, row, column, pixmap: QPixmap): label = MImageLabel(pixmap, "") @@ -163,20 +204,30 @@ def handleImageLoaded(self, table, row, column, pixmap: QPixmap): table.setColumnWidth(column, 220) table.setCellWidget(row, column, label) - def showChapterDataPage(self, collectionPath): + def showChapterDataPage(self, collectionPath,pageIndex): self.dataPageType = DataPageType.CHAPTER_PAGE self.pageIndex = 1 - self.clearDataList() + chapterPaths = self.getChapterPageData(collectionPath) - context = self.getContext() + context=self.getContext() + + # 计算总页数 + self.totalPageCount = math.ceil(len(chapterPaths) / PAGE_SIZE) ui = self.getUI() dataListWidget: QTableWidget = ui.dataTableWidget + curPageEdit: QLineEdit = ui.curPageEdit + curPageEdit.setText(str(pageIndex)) + totalPageLabel: QLabel = ui.totalPageLabel + totalPageLabel.setText(f"总页数:{self.totalPageCount}") + if pageIndex == self.totalPageCount: + tempChapterPaths = chapterPaths[(pageIndex - 1) * PAGE_SIZE:] + else: + tempChapterPaths = chapterPaths[(pageIndex - 1) * PAGE_SIZE:pageIndex * PAGE_SIZE] - chapterPaths = self.getChapterPageData(collectionPath) realIndex = 0 - for index, item in enumerate(chapterPaths): + for index, item in enumerate(tempChapterPaths): if context.getCacheFileTpye() == CacheFileTpye.PC: info = self.getCacheInfoByPC(item) @@ -273,6 +324,7 @@ def getOneChapterPathByCollection(self, collectionPath): return chapterPath # 每一个集合只获取一个章节,用于合集数据页面的展示 + # 返回的是章节路径集合 def getAllOneChapterPath(self, cachePath): allChapterPath = [] allCollectionPath = self.getAllCollectionPath(cachePath) diff --git a/modules/home/init/InitManager.py b/modules/home/init/InitManager.py index e4e39e5..cbdbf22 100644 --- a/modules/home/init/InitManager.py +++ b/modules/home/init/InitManager.py @@ -6,6 +6,7 @@ from modules.framework.manager.ConfigManager import ConfigKey from modules.home.BaseDataWorkPage import BaseDataWorkPage from modules.home.base.BaseService import BaseService +from modules.home.dataarea.DataShowManager import PAGE_SIZE from modules.utils.PathUtils import PathUtils from modules.utils.SysUtils import SysUtils @@ -19,7 +20,7 @@ def initUI(self): dataTableWidget: QTableWidget = context.ui.dataTableWidget dataTableWidget.setColumnCount(2) dataTableWidget.setHorizontalHeaderLabels(["标题", "路径"]) - dataTableWidget.setRowCount(15) + dataTableWidget.setRowCount(PAGE_SIZE) # 设置表头自适应宽度 header = dataTableWidget.horizontalHeader() diff --git a/modules/home/toolbar/CacheAraeAdjust.py b/modules/home/toolbar/CacheAraeAdjust.py index f17f1f3..c408be9 100644 --- a/modules/home/toolbar/CacheAraeAdjust.py +++ b/modules/home/toolbar/CacheAraeAdjust.py @@ -66,9 +66,9 @@ def handleRefresh(self): manage: DataShowManager = context.DataShowManage if manage.dataPageType == DataPageType.COLLECTION_PAGE: - manage.showDataPageByFileStructure(context.getCachePath()) + manage.showDataPageByFileStructure(context.getCachePath(),manage.pageIndex) pass elif manage.dataPageType == DataPageType.CHAPTER_PAGE: - manage.showDataPageByFileStructure(context.getCachePath()) + manage.showDataPageByFileStructure(context.getCachePath(),manage.pageIndex) pass # dataList: QTableWidget = context.ui.dataTableWidget diff --git a/modules/home/toolbar/CachePathShow.py b/modules/home/toolbar/CachePathShow.py index 21b24ce..bbbc960 100644 --- a/modules/home/toolbar/CachePathShow.py +++ b/modules/home/toolbar/CachePathShow.py @@ -1,6 +1,7 @@ from PySide6.QtWidgets import QMainWindow from modules.home.base.BaseService import BaseService +from modules.home.ui.MlLineEdit import MlLineEdit from modules.utils.CallbackUtils import PathSelectCallCode from modules.utils.Log import Log from modules.utils.PathUtils import PathUtils @@ -16,7 +17,10 @@ def setConnect(self, context: QMainWindow): self.context = self.getContext() self.ui.selectVedioDirBtn.clicked.connect( lambda: PathUtils.openPathSelector(self.callbackSelectedPath, PathSelectCallCode.CACHEPATH)) - self.ui.vedioDirShowLineEdit.textChanged.connect(self.handleTextChanged) + + edit:MlLineEdit = self.ui.vedioDirShowLineEdit + edit.textChanged.connect(self.handleTextChanged) + edit.returnPressed.connect(self.handleReturnPressed) # 文件选择器回调 def callbackSelectedPath(self, path, fromCode: PathSelectCallCode): @@ -27,4 +31,8 @@ def callbackSelectedPath(self, path, fromCode: PathSelectCallCode): def handleTextChanged(self): text = self.ui.vedioDirShowLineEdit.text() self.context.cachePath = text - Log.i(text) + # Log.i(text) + def handleReturnPressed(self): + context = self.getContext() + text = self.ui.vedioDirShowLineEdit.text() + context.DataShowManage.showDataPageByFileStructure(text) diff --git a/modules/home/ui/MLineEdit.py b/modules/home/ui/MlLineEdit.py similarity index 89% rename from modules/home/ui/MLineEdit.py rename to modules/home/ui/MlLineEdit.py index af10884..143201d 100644 --- a/modules/home/ui/MLineEdit.py +++ b/modules/home/ui/MlLineEdit.py @@ -1,3 +1,6 @@ + + +from PySide6.QtCore import QEvent, QObject, Qt from PySide6.QtWidgets import QLineEdit # 编辑框 @@ -15,3 +18,6 @@ def dropEvent(self, event): if urls: path = urls[0].toLocalFile() self.setText(path) + + + diff --git a/modules/home/ui_WorkPage.py b/modules/home/ui_WorkPage.py index 2596456..94efa12 100644 --- a/modules/home/ui_WorkPage.py +++ b/modules/home/ui_WorkPage.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- ################################################################################ -## Form generated from reading UI file 'WorkPagewQVDRY.ui' +## Form generated from reading UI file 'WorkPageihuHCJ.ui' ## ## Created by: Qt User Interface Compiler version 6.5.1 ## @@ -20,6 +20,7 @@ QLineEdit, QPushButton, QSizePolicy, QSpacerItem, QTableWidget, QTableWidgetItem, QVBoxLayout, QWidget) +from modules.home.ui.MlLineEdit import MlLineEdit class Ui_WorkPageWidget(object): def setupUi(self, WorkPageWidget): @@ -36,9 +37,7 @@ def setupUi(self, WorkPageWidget): self.checkUpdateItem.setObjectName(u"checkUpdateItem") self.aboutItem = QAction(WorkPageWidget) self.aboutItem.setObjectName(u"aboutItem") - self.verticalLayout_3 = QVBoxLayout(WorkPageWidget) - self.verticalLayout_3.setObjectName(u"verticalLayout_3") - self.verticalLayout_2 = QVBoxLayout() + self.verticalLayout_2 = QVBoxLayout(WorkPageWidget) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout = QVBoxLayout() self.verticalLayout.setObjectName(u"verticalLayout") @@ -49,12 +48,12 @@ def setupUi(self, WorkPageWidget): self.CatchVedioDirLayout.addWidget(self.vedioDirLabel) - self.vedioDirShowLineEdit = QLineEdit(WorkPageWidget) + self.vedioDirShowLineEdit = MlLineEdit(WorkPageWidget) self.vedioDirShowLineEdit.setObjectName(u"vedioDirShowLineEdit") self.vedioDirShowLineEdit.setMinimumSize(QSize(0, 30)) self.vedioDirShowLineEdit.setStyleSheet(u"background-color: rgb(33, 37, 43);") - self.vedioDirShowLineEdit.setDragEnabled(True) - self.vedioDirShowLineEdit.setClearButtonEnabled(True) + self.vedioDirShowLineEdit.setProperty("dragEnabled", True) + self.vedioDirShowLineEdit.setProperty("clearButtonEnabled", True) self.CatchVedioDirLayout.addWidget(self.vedioDirShowLineEdit) @@ -117,6 +116,48 @@ def setupUi(self, WorkPageWidget): self.verticalLayout.addWidget(self.dataTableWidget) + self.horizontalLayout_4 = QHBoxLayout() + self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") + self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) + + self.horizontalLayout_4.addItem(self.horizontalSpacer_4) + + self.prePageBtn = QPushButton(WorkPageWidget) + self.prePageBtn.setObjectName(u"prePageBtn") + self.prePageBtn.setMinimumSize(QSize(100, 20)) + self.prePageBtn.setStyleSheet(u"background-color: rgb(52, 59, 72);") + + self.horizontalLayout_4.addWidget(self.prePageBtn) + + self.curPageEdit = QLineEdit(WorkPageWidget) + self.curPageEdit.setObjectName(u"curPageEdit") + self.curPageEdit.setMinimumSize(QSize(100, 20)) + self.curPageEdit.setMaximumSize(QSize(50, 16777215)) + self.curPageEdit.setStyleSheet(u"background-color: rgb(52, 59, 72);") + self.curPageEdit.setAlignment(Qt.AlignCenter) + + self.horizontalLayout_4.addWidget(self.curPageEdit) + + self.sufPageBtn = QPushButton(WorkPageWidget) + self.sufPageBtn.setObjectName(u"sufPageBtn") + self.sufPageBtn.setMinimumSize(QSize(100, 20)) + self.sufPageBtn.setStyleSheet(u"background-color: rgb(52, 59, 72);") + + self.horizontalLayout_4.addWidget(self.sufPageBtn) + + self.totalPageLabel = QLabel(WorkPageWidget) + self.totalPageLabel.setObjectName(u"totalPageLabel") + self.totalPageLabel.setMinimumSize(QSize(0, 20)) + + self.horizontalLayout_4.addWidget(self.totalPageLabel) + + self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) + + self.horizontalLayout_4.addItem(self.horizontalSpacer_5) + + + self.verticalLayout.addLayout(self.horizontalLayout_4) + self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) @@ -148,9 +189,6 @@ def setupUi(self, WorkPageWidget): self.verticalLayout_2.addLayout(self.verticalLayout) - self.verticalLayout_3.addLayout(self.verticalLayout_2) - - self.retranslateUi(WorkPageWidget) QMetaObject.connectSlotsByName(WorkPageWidget) @@ -169,6 +207,9 @@ def retranslateUi(self, WorkPageWidget): self.completeFileBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u5b8c\u6210\u6587\u4ef6", None)) self.selectAllBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u5168\u9009", None)) self.refreshBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u5237\u65b0", None)) + self.prePageBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u4e0a\u4e00\u9875", None)) + self.sufPageBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u4e0b\u4e00\u9875", None)) + self.totalPageLabel.setText(QCoreApplication.translate("WorkPageWidget", u"\u603b\u9875\u6570:", None)) self.getMP3Btn.setText(QCoreApplication.translate("WorkPageWidget", u"\u63d0\u53d6\u97f3\u9891", None)) self.mergeBtn.setText(QCoreApplication.translate("WorkPageWidget", u"\u5408\u5e76", None)) # retranslateUi diff --git a/modules/utils/JsonUtils.py b/modules/utils/JsonUtils.py index bab15cc..202b9a1 100644 --- a/modules/utils/JsonUtils.py +++ b/modules/utils/JsonUtils.py @@ -132,6 +132,9 @@ def parseJsonByPath(file_path: str) -> JsonInfo: if isGetSubTitle: subTitle = re.sub(SPECIAL_CHARACTERS_REGULAR_RULE, '', subTitle) + if subTitle =='' and not title=='': + subTitle = title + else: subTitle = JsonUtils.generate_short_id() diff --git a/modules/utils/PathUtils.py b/modules/utils/PathUtils.py index f887ef6..8d180a4 100644 --- a/modules/utils/PathUtils.py +++ b/modules/utils/PathUtils.py @@ -40,10 +40,13 @@ def listSubDir(parentPath: str): @staticmethod def listSubFile(parentPath): subfiles = [] - for item in os.listdir(parentPath): - item_path = os.path.join(parentPath, item) - if os.path.isfile(item_path): - subfiles.append(item_path) + try: + for item in os.listdir(parentPath): + item_path = os.path.join(parentPath, item) + if os.path.isfile(item_path): + subfiles.append(item_path) + except Exception as e: + Log.e(e) return subfiles @staticmethod