From 97aaffaeda7da59f2694f2ee7895d92baacd199f Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Fri, 11 Jan 2019 11:26:41 +0100
Subject: [PATCH] Removed youtube-dl / and another unused dependency

---
 api/funkwhale_api/downloader/__init__.py   |  3 ---
 api/funkwhale_api/downloader/downloader.py | 19 -------------------
 api/requirements/base.txt                  |  2 --
 3 files changed, 24 deletions(-)
 delete mode 100644 api/funkwhale_api/downloader/__init__.py
 delete mode 100644 api/funkwhale_api/downloader/downloader.py

diff --git a/api/funkwhale_api/downloader/__init__.py b/api/funkwhale_api/downloader/__init__.py
deleted file mode 100644
index eca15e121..000000000
--- a/api/funkwhale_api/downloader/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .downloader import download
-
-__all__ = ["download"]
diff --git a/api/funkwhale_api/downloader/downloader.py b/api/funkwhale_api/downloader/downloader.py
deleted file mode 100644
index f2b7568cc..000000000
--- a/api/funkwhale_api/downloader/downloader.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import os
-
-import youtube_dl
-from django.conf import settings
-
-
-def download(
-    url, target_directory=settings.MEDIA_ROOT, name="%(id)s.%(ext)s", bitrate=192
-):
-    target_path = os.path.join(target_directory, name)
-    ydl_opts = {
-        "quiet": True,
-        "outtmpl": target_path,
-        "postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}],
-    }
-    _downloader = youtube_dl.YoutubeDL(ydl_opts)
-    info = _downloader.extract_info(url)
-    info["audio_file_path"] = target_path % {"id": info["id"], "ext": "ogg"}
-    return info
diff --git a/api/requirements/base.txt b/api/requirements/base.txt
index 61b5aa8a5..c08f9d785 100644
--- a/api/requirements/base.txt
+++ b/api/requirements/base.txt
@@ -30,11 +30,9 @@ celery>=4.1,<4.2
 # Your custom requirements go here
 django-cors-headers>=2.1,<2.2
 musicbrainzngs==0.6
-youtube_dl>=2017.12.14
 djangorestframework>=3.7,<3.8
 djangorestframework-jwt>=1.11,<1.12
 oauth2client<4
-google-api-python-client>=1.6,<1.7
 pendulum>=2,<3
 persisting-theory>=0.2,<0.3
 django-versatileimagefield>=1.9,<1.10
-- 
GitLab