« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/downloaders.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloaders.js')
-rw-r--r--src/downloaders.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/downloaders.js b/src/downloaders.js
index aa0bc44..b9cc33d 100644
--- a/src/downloaders.js
+++ b/src/downloaders.js
@@ -122,6 +122,14 @@ module.exports = {
   makePowerfulDownloader,
   makeConverterDownloader,
 
+  byName: {
+    'http': makeHTTPDownloader,
+    'local': makeLocalDownloader,
+    'file': makeLocalDownloader,
+    'youtube': makeYouTubeDownloader,
+    'youtube-dl': makeYouTubeDownloader
+  },
+
   getDownloaderFor(arg) {
     if (arg.startsWith('http://') || arg.startsWith('https://')) {
       if (arg.includes('youtube.com')) {