68 lines
2.4 KiB
Diff
68 lines
2.4 KiB
Diff
--- a/src/config.py
|
|
+++ b/src/config.py
|
|
@@ -11,7 +11,7 @@ def default_opts():
|
|
"profile" : "auto",
|
|
"fallback" : ["auto"],
|
|
"duplicates" : "false",
|
|
- "module" : "youtube_dl",
|
|
+ "module" : "yt_dlp",
|
|
"playlistFolder" : "true",
|
|
"theme" : "default",
|
|
}
|
|
@@ -64,7 +64,7 @@ def write_config( opts ):
|
|
"download_path" : opts.get( "downloadPath", userPath ),
|
|
"\n# Which system installation (module) used to download": None,
|
|
"# (youtube_dl, yt_dlp, etc.)" : None,
|
|
- "module" : opts.get( "module", "youtube_dl" ),
|
|
+ "module" : "yt_dlp",
|
|
"\n# Allow duplicate URLs into queue (true/false)" : None,
|
|
"allow_duplicates" : opts.get( "duplicates", "false" ),
|
|
"\n# Each playlist gets its own subdirectory (true/false)" : None,
|
|
@@ -125,7 +125,7 @@ def read_options( opts ):
|
|
## Default section
|
|
section = cfg[ "DEFAULT" ]
|
|
opts[ "downloadPath" ] = section.get( "download_path", userPath )
|
|
- opts[ "module" ] = section.get( "module", "youtube_dl" )
|
|
+ opts[ "module" ] = "yt_dlp"
|
|
opts[ "duplicates" ] = section.get( "allow_duplicates", "false" )
|
|
opts[ "playlistFolder" ] = section.get( "playlist_folder", "true" )
|
|
|
|
--- a/src/main_widget.py
|
|
+++ b/src/main_widget.py
|
|
@@ -330,9 +330,9 @@ class MainWidget( QWidget ):
|
|
print( "Module:\t%s" % opts[ "module" ] )
|
|
|
|
except ImportError:
|
|
- ydl_module = youtube_dl
|
|
+ ydl_module = yt_dlp
|
|
if self.debug:
|
|
- print( "Module:\tyoutube_dl")
|
|
+ print( "Module:\tyt_dlp")
|
|
|
|
ydl_opts = self.ydl_opts( profile )
|
|
|
|
@@ -539,9 +539,9 @@ class MainWidget( QWidget ):
|
|
|
|
## Just grab this here for convenience's sake
|
|
if not self.debug:
|
|
- ydl = youtube_dl.YoutubeDL( { "quiet" : True } )
|
|
+ ydl = yt_dlp.YoutubeDL( { "quiet" : True } )
|
|
else:
|
|
- ydl = youtube_dl.YoutubeDL()
|
|
+ ydl = yt_dlp.YoutubeDL()
|
|
|
|
for url in urls:
|
|
|
|
--- a/src/util.py
|
|
+++ b/src/util.py
|
|
@@ -1,7 +1,7 @@
|
|
from __future__ import unicode_literals
|
|
import sys, os
|
|
-import youtube_dl
|
|
-from youtube_dl.utils import DownloadError
|
|
+import yt_dlp
|
|
+from yt_dlp.utils import DownloadError
|
|
|
|
#### RE-ENABLE if you want to enable possible internal YDL
|
|
#import internal_ydl
|