mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Changes for v1.0.0 release (#345)
* Move spotdl.py inside spotdl directory * Fix Dockerfile * Re-upload FFmpeg binary * Small fixes ;)
This commit is contained in:
@@ -35,7 +35,7 @@ addons:
|
|||||||
- libav-tools
|
- libav-tools
|
||||||
install:
|
install:
|
||||||
- pip install -e .
|
- pip install -e .
|
||||||
- tinydownload 22684734659253158385 -o ~/bin/ffmpeg
|
- tinydownload 07426048687547254773 -o ~/bin/ffmpeg
|
||||||
- chmod 755 ~/bin/ffmpeg
|
- chmod 755 ~/bin/ffmpeg
|
||||||
- xdg-user-dirs-update
|
- xdg-user-dirs-update
|
||||||
script: python -m pytest test --cov=.
|
script: python -m pytest test --cov=.
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@@ -3,14 +3,14 @@ FROM python:3.6-alpine
|
|||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
||||||
ADD requirements.txt /spotify-downloader/
|
ADD spotdl/ /spotify-downloader/spotdl
|
||||||
RUN pip install -r /spotify-downloader/requirements.txt
|
ADD setup.py /spotify-downloader/setup.py
|
||||||
RUN rm /spotify-downloader/requirements.txt
|
ADD README.md /spotify-downloader/README.md
|
||||||
|
|
||||||
ADD spotdl.py /spotify-downloader/
|
WORKDIR /spotify-downloader
|
||||||
ADD core/ /spotify-downloader/core
|
RUN pip install .
|
||||||
|
|
||||||
RUN mkdir /music
|
RUN mkdir /music
|
||||||
WORKDIR /music
|
WORKDIR /music
|
||||||
|
|
||||||
ENTRYPOINT ["python3", "/spotify-downloader/spotdl.py", "-f", "/music"]
|
ENTRYPOINT ["spotdl", "-f", "/music"]
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
pathlib >= 1.0.1
|
|
||||||
youtube_dl >= 2017.5.1
|
|
||||||
pafy >= 0.5.3.1
|
|
||||||
spotipy >= 2.4.4
|
|
||||||
mutagen >= 1.37
|
|
||||||
beautifulsoup4 >= 4.6.0
|
|
||||||
unicode-slugify >= 0.1.3
|
|
||||||
titlecase >= 0.10.0
|
|
||||||
logzero >= 1.3.1
|
|
||||||
lyricwikia >= 0.1.8
|
|
||||||
PyYAML >= 3.12
|
|
||||||
appdirs >= 1.4.3
|
|
||||||
18
setup.py
18
setup.py
@@ -6,15 +6,7 @@ from setuptools import setup
|
|||||||
with open('README.md', 'r') as f:
|
with open('README.md', 'r') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
import spotdl
|
||||||
# This does not work as the dependencies imported are most
|
|
||||||
# likely just about to be installed :/
|
|
||||||
# from spotdl import __version__
|
|
||||||
|
|
||||||
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
|
||||||
|
|
||||||
with open('spotdl.py', 'r') as f:
|
|
||||||
version = str(ast.literal_eval(_version_re.search(f.read()).group(1)))
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
# 'spotify-downloader' was already taken :/
|
# 'spotify-downloader' was already taken :/
|
||||||
@@ -22,11 +14,11 @@ setup(
|
|||||||
py_modules=['spotdl'],
|
py_modules=['spotdl'],
|
||||||
# Tests are included automatically:
|
# Tests are included automatically:
|
||||||
# https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute
|
# https://docs.python.org/3.6/distutils/sourcedist.html#specifying-the-files-to-distribute
|
||||||
packages=['core'],
|
packages=['spotdl'],
|
||||||
version=version,
|
version=spotdl.__version__,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'pathlib >= 1.0.1',
|
'pathlib >= 1.0.1',
|
||||||
'youtube_dl >= 2017.5.1',
|
'youtube_dl >= 2017.9.8',
|
||||||
'pafy >= 0.5.3.1',
|
'pafy >= 0.5.3.1',
|
||||||
'spotipy >= 2.4.4',
|
'spotipy >= 2.4.4',
|
||||||
'mutagen >= 1.37',
|
'mutagen >= 1.37',
|
||||||
@@ -64,7 +56,7 @@ setup(
|
|||||||
],
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'spotdl = spotdl:main',
|
'spotdl = spotdl.spotdl:main',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
1
spotdl/__init__.py
Executable file
1
spotdl/__init__.py
Executable file
@@ -0,0 +1 @@
|
|||||||
|
__version__ = '1.0.0'
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
from core.const import log
|
from spotdl.const import log
|
||||||
|
|
||||||
|
|
||||||
"""What are the differences and similarities between ffmpeg, libav, and avconv?
|
"""What are the differences and similarities between ffmpeg, libav, and avconv?
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import appdirs
|
import appdirs
|
||||||
from core import internals, const
|
from spotdl import internals, const
|
||||||
|
|
||||||
log = const.log
|
log = const.log
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from core import const
|
from spotdl import const
|
||||||
|
|
||||||
log = const.log
|
log = const.log
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ from mutagen.easyid3 import EasyID3
|
|||||||
from mutagen.id3 import ID3, TORY, TYER, TPUB, APIC, USLT, COMM
|
from mutagen.id3 import ID3, TORY, TYER, TPUB, APIC, USLT, COMM
|
||||||
from mutagen.mp4 import MP4, MP4Cover
|
from mutagen.mp4 import MP4, MP4Cover
|
||||||
from mutagen.flac import Picture, FLAC
|
from mutagen.flac import Picture, FLAC
|
||||||
from core.const import log, TAG_PRESET, M4A_TAG_PRESET
|
from spotdl.const import log, TAG_PRESET, M4A_TAG_PRESET
|
||||||
|
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
from core import const
|
from spotdl import const
|
||||||
from core import handle
|
from spotdl import handle
|
||||||
from core import metadata
|
from spotdl import metadata
|
||||||
from core import convert
|
from spotdl import convert
|
||||||
from core import internals
|
from spotdl import internals
|
||||||
from core import spotify_tools
|
from spotdl import spotify_tools
|
||||||
from core import youtube_tools
|
from spotdl import youtube_tools
|
||||||
from slugify import slugify
|
from slugify import slugify
|
||||||
import spotipy
|
import spotipy
|
||||||
import urllib.request
|
import urllib.request
|
||||||
@@ -16,8 +16,6 @@ import time
|
|||||||
import platform
|
import platform
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
__version__ = '0.9.3'
|
|
||||||
|
|
||||||
|
|
||||||
def check_exists(music_file, raw_song, meta_tags):
|
def check_exists(music_file, raw_song, meta_tags):
|
||||||
""" Check if the input song already exists in the given folder. """
|
""" Check if the input song already exists in the given folder. """
|
||||||
@@ -2,8 +2,8 @@ import spotipy
|
|||||||
import spotipy.oauth2 as oauth2
|
import spotipy.oauth2 as oauth2
|
||||||
import lyricwikia
|
import lyricwikia
|
||||||
|
|
||||||
from core import internals
|
from spotdl import internals
|
||||||
from core.const import log
|
from spotdl.const import log
|
||||||
|
|
||||||
from slugify import slugify
|
from slugify import slugify
|
||||||
from titlecase import titlecase
|
from titlecase import titlecase
|
||||||
@@ -2,8 +2,8 @@ from bs4 import BeautifulSoup
|
|||||||
import urllib
|
import urllib
|
||||||
import pafy
|
import pafy
|
||||||
|
|
||||||
from core import internals
|
from spotdl import internals
|
||||||
from core import const
|
from spotdl import const
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
from core import const
|
from spotdl import const
|
||||||
from core import handle
|
from spotdl import handle
|
||||||
import spotdl
|
from spotdl import spotdl
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from core import const
|
from spotdl import const
|
||||||
|
|
||||||
import spotdl
|
from spotdl import spotdl
|
||||||
import loader
|
import loader
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from core import handle
|
from spotdl import handle
|
||||||
from core import const
|
from spotdl import const
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from core import internals
|
from spotdl import internals
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from core import spotify_tools
|
from spotdl import spotify_tools
|
||||||
from core import const
|
from spotdl import const
|
||||||
|
|
||||||
import spotdl
|
from spotdl import spotdl
|
||||||
|
|
||||||
import builtins
|
import builtins
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
from core import const
|
from spotdl import const
|
||||||
from core import internals
|
from spotdl import internals
|
||||||
from core import spotify_tools
|
from spotdl import spotify_tools
|
||||||
from core import youtube_tools
|
from spotdl import youtube_tools
|
||||||
from core import convert
|
from spotdl import convert
|
||||||
from core import metadata
|
from spotdl import metadata
|
||||||
|
|
||||||
import spotdl
|
from spotdl import spotdl
|
||||||
|
|
||||||
import loader
|
import loader
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from core import const
|
from spotdl import const
|
||||||
from core import internals
|
from spotdl import internals
|
||||||
from core import spotify_tools
|
from spotdl import spotify_tools
|
||||||
from core import youtube_tools
|
from spotdl import youtube_tools
|
||||||
|
|
||||||
import spotdl
|
from spotdl import spotdl
|
||||||
import loader
|
import loader
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user