Commit 49bc1faf authored by Javinator9889's avatar Javinator9889 🎼

Permissions

parent a4da41af
Pipeline #79 failed with stage
in 62 minutes and 20 seconds
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -17,6 +17,7 @@ from io import BytesIO
from typing import Tuple
from ..constants.app_constants import YDL_CLI_OPTIONS
from ..audio.ffmpeg import FFmpegOpener
class YouTubeDownloader(object):
......@@ -25,7 +26,7 @@ class YouTubeDownloader(object):
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,
......@@ -34,6 +35,13 @@ class YouTubeDownloader(object):
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: " +
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
mutagen
isodate
google-api-python-client
musicbrainzngs
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -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
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment