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:
Ritiek Malhotra
2018-09-09 08:00:01 -07:00
committed by GitHub
parent a7e9009aa6
commit e0c8960906
21 changed files with 51 additions and 73 deletions

View File

@@ -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=.

View File

@@ -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"]

View File

@@ -1 +0,0 @@

View File

@@ -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

View File

@@ -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
View File

@@ -0,0 +1 @@
__version__ = '1.0.0'

View File

@@ -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?

View File

@@ -1,5 +1,5 @@
import appdirs import appdirs
from core import internals, const from spotdl import internals, const
log = const.log log = const.log

View File

@@ -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

View File

@@ -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

View File

@@ -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. """

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,4 @@
from core import internals from spotdl import internals
import sys import sys
import os import os

View File

@@ -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

View File

@@ -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

View File

@@ -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