Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
97aaffae
Verified
Commit
97aaffae
authored
Jan 11, 2019
by
Eliot Berriot
Browse files
Removed youtube-dl / and another unused dependency
parent
8aac1c93
Changes
3
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/downloader/__init__.py
deleted
100644 → 0
View file @
8aac1c93
from
.downloader
import
download
__all__
=
[
"download"
]
api/funkwhale_api/downloader/downloader.py
deleted
100644 → 0
View file @
8aac1c93
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
api/requirements/base.txt
View file @
97aaffae
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment