Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Permissions
  • Loading branch information
Javinator9889 committed Oct 7, 2019
1 parent a4da41a commit 49bc1fa
Show file tree
Hide file tree
Showing 27 changed files with 11 additions and 1 deletion.
Empty file modified .gitlab-ci.yml 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/__main__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/api/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/api/youtube_api.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/audio/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/audio/fpcalc.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/bot.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/commands/StartHandler.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/commands/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/constants/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/constants/app_constants.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/decorators/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/decorators/decorators.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/downloader/__init__.py 100644 → 100755
Empty file.
10 changes: 9 additions & 1 deletion YouTubeMDBot/downloader/youtube_downloader.py 100644 → 100755
Expand Up @@ -17,6 +17,7 @@
from typing import Tuple

from ..constants.app_constants import YDL_CLI_OPTIONS
from ..audio.ffmpeg import FFmpegOpener


class YouTubeDownloader(object):
Expand All @@ -25,7 +26,7 @@ def __init__(self, url: str):
self.__options: list = YDL_CLI_OPTIONS.copy()
self.__options.append(self.__url)

def download(self) -> Tuple[BytesIO, bytes]:
def download(self, ffmpeg: bool = False) -> Tuple[BytesIO, bytes]:
import subprocess

proc = subprocess.Popen(self.__options,
Expand All @@ -34,6 +35,13 @@ def download(self) -> Tuple[BytesIO, bytes]:
stdout, stderr = proc.communicate()
retcode = proc.returncode
if retcode == 0:
# if ffmpeg:
# opener = FFmpegOpener(stdout)
# opener.open()
# stdout = opener.get_output()
# err = opener.get_extra()
# if err:
# print(err.decode("utf-8"))
return BytesIO(stdout), stdout
else:
raise RuntimeError("youtube-dl downloader exception - more info: " +
Expand Down
Empty file modified YouTubeMDBot/errors/EmptyBodyError.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/errors/InvalidCredentialsError.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/errors/NoMatchError.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/errors/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/logging_utils/__init__.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/logging_utils/utils.py 100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions YouTubeMDBot/requirements.txt 100644 → 100755
@@ -1,3 +1,4 @@
mutagen
isodate
google-api-python-client
musicbrainzngs
Expand Down
Empty file modified YouTubeMDBot/tests/downloader.py 100644 → 100755
Empty file.
Empty file modified YouTubeMDBot/tests/song_search.py 100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions YouTubeMDBot/utils/__init__.py 100644 → 100755
Expand Up @@ -14,3 +14,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from ..utils import youtube_utils
from ..utils.timeout import timeout
Empty file modified YouTubeMDBot/utils/youtube_utils.py 100644 → 100755
Empty file.

0 comments on commit 49bc1fa

Please sign in to comment.