@@ -210,12 +210,12 @@ def initHelper(self) -> None:
210
210
self .reqVars : [str ] = ['botToken' , 'botOwnerId' , 'telegramApiId' , 'telegramApiHash' ,
211
211
'googleDriveAuth' , 'googleDriveUploadFolderIds' ]
212
212
self .optVars : typing .List [str ] = ['ariaGlobalOpts' , 'authorizedChats' , 'dlRootDir' , 'logLevel' ,
213
- 'megaAuth' , 'statusUpdateInterval' , 'trackersListUrl' ]
213
+ 'megaAuth' , 'statusUpdateInterval' , 'trackersListUrl' , 'ytdlFormat' ]
214
214
self .optVals : typing .List [typing .Union [str , typing .Dict ]] = \
215
215
[{'allow-overwrite' : 'true' , 'bt-max-peers' : '0' , 'follow-torrent' : 'mem' ,
216
216
'max-connection-per-server' : '8' , 'max-overall-upload-limit' : '1K' ,
217
217
'min-split-size' : '10M' , 'seed-time' : '0.01' , 'split' : '10' },
218
- {}, 'dl' , 'INFO' , {}, '5' , 'https://trackerslist.com/all_aria2.txt' ]
218
+ {}, 'dl' , 'INFO' , {}, '5' , 'https://trackerslist.com/all_aria2.txt' , 'best/bestvideo+bestaudio' ]
219
219
self .emptyVals : typing .List [typing .Union [str , typing .Dict ]] = ['' , ' ' , {}]
220
220
self .isFixConfigJson : bool = False
221
221
self .configVarsLoad ()
@@ -1659,7 +1659,7 @@ def initHelper(self) -> None:
1659
1659
super ().initHelper ()
1660
1660
1661
1661
def addDownload (self , mirrorInfo : 'MirrorInfo' ) -> None :
1662
- ytdlOpts : dict = {'quiet' : True , 'format' : 'best/bestvideo+bestaudio' , 'progress_hooks' : [self .progressHook ],
1662
+ ytdlOpts : dict = {'quiet' : True , 'format' : mirrorInfo . ytdlFormat , 'progress_hooks' : [self .progressHook ],
1663
1663
'outtmpl' : f'{ mirrorInfo .path } /%(title)s-%(id)s.f%(format_id)s.%(ext)s' }
1664
1664
self .downloadVideo (mirrorInfo .downloadUrl , ytdlOpts )
1665
1665
@@ -2201,6 +2201,7 @@ def __init__(self, msg: telegram.Message, botHelper: BotHelper):
2201
2201
self .status : str = ''
2202
2202
self .tag : str = ''
2203
2203
self .downloadUrl : str = ''
2204
+ self .ytdlFormat : str = botHelper .configHelper .configVars [botHelper .configHelper .optVars [7 ]]
2204
2205
self .sizeTotal : int = 0
2205
2206
self .sizeCurrent : int = 0
2206
2207
self .timeStart : float = 0.0
0 commit comments