Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
speedyconzales committed Jul 19, 2024
1 parent 853e2ad commit e7d13ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 43 deletions.
33 changes: 0 additions & 33 deletions cine.py

This file was deleted.

11 changes: 1 addition & 10 deletions src/downloader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import platform
import subprocess

from src.logger import logger, SUCCESS
Expand All @@ -18,15 +17,7 @@ def download_episode(url, file_name, episode, provider):
ffmpeg_cmd = ["ffmpeg", "-headers", "Referer: https://d0000d.com/", "-i", url, "-c", "copy", "-nostdin", file_name] if provider == "Doodstream" \
else ["ffmpeg", "-i", url, "-c", "copy", "-nostdin", file_name]
logger.info(f"Episode '{file_name}' added to queue.")
if platform.system() == "Windows":
subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
subprocess.run(
ffmpeg_cmd,
check=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
subprocess.run(ffmpeg_cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
logger.log(SUCCESS, f"Finished download of {file_name}.")
return None
except subprocess.CalledProcessError as e:
Expand Down

0 comments on commit e7d13ea

Please sign in to comment.