no multi td search for tg files and fix
This commit is contained in:
parent
34998be5a2
commit
350a31967f
|
|
@ -102,7 +102,7 @@ class TelegramDownloadHelper(DownloadHelper):
|
|||
if STOP_DUPLICATE:
|
||||
LOGGER.info('Checking File/Folder if already in Drive...')
|
||||
gd = GoogleDriveHelper()
|
||||
smsg, button = gd.drive_list(name, True)
|
||||
smsg, button = gd.drive_list(name, True, True)
|
||||
if smsg:
|
||||
sendMarkup("File/Folder is already available in Drive.\nHere are the search results:", self.__listener.bot, self.__listener.update, button)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -684,7 +684,7 @@ class GoogleDriveHelper:
|
|||
)
|
||||
|
||||
|
||||
def drive_list(self, fileName, stopDup=False, clone=False):
|
||||
def drive_list(self, fileName, stopDup=False, noMulti=False):
|
||||
self.stopDup = stopDup
|
||||
msg = ""
|
||||
if not stopDup:
|
||||
|
|
@ -694,7 +694,9 @@ class GoogleDriveHelper:
|
|||
Title = False
|
||||
for index, parent_id in enumerate(DRIVES_IDS):
|
||||
response = self.drive_query(parent_id, fileName)
|
||||
if not response["files"]:
|
||||
if not response["files"] and noMulti:
|
||||
break
|
||||
elif not response["files"]:
|
||||
continue
|
||||
if not Title:
|
||||
msg += f'<h4>Search Result For: {fileName}</h4><br><br>'
|
||||
|
|
@ -761,7 +763,7 @@ class GoogleDriveHelper:
|
|||
self.telegraph_content.append(msg)
|
||||
msg = ""
|
||||
content_count = 0
|
||||
if clone:
|
||||
if noMulti:
|
||||
break
|
||||
|
||||
if msg != '':
|
||||
|
|
|
|||
Loading…
Reference in New Issue