Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKEND] Make more logs info instead of debug #1128

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/ytdl_sub/downloaders/ytdlp.py
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ def extract_info_with_retry(
del copied_ytdl_options_overrides["download_archive"]

if num_tries < cls._EXTRACT_ENTRY_NUM_RETRIES:
cls.logger.debug(
cls.logger.info(
"Failed to download entry. Retrying %d / %d",
num_tries,
cls._EXTRACT_ENTRY_NUM_RETRIES,
@@ -222,14 +222,18 @@ def extract_info_via_info_json(
):
cls.extract_info(ytdl_options_overrides=ytdl_options_overrides, **kwargs)
except RejectedVideoReached:
cls.logger.debug(
cls.logger.info(
"RejectedVideoReached, stopping additional downloads "
"(Can be disable by setting `date_range.breaking` to False)."
"(Can be disable by setting `date_range.breaks` to False. "
"If this is unexpected, "
"run with `--log-level verbose` to see the yt-dlp logs on why it stopped)"
)
except ExistingVideoReached:
cls.logger.debug(
cls.logger.info(
"ExistingVideoReached, stopping additional downloads. "
"(Can be disable by setting `ytdl_options.break_on_existing` to False)."
"(Can be disable by setting `ytdl_options.break_on_existing` to False. This will "
"force yt-dlp to continue scraping all metadata to grab any files you may have "
"missed)"
)
except MaxDownloadsReached:
cls.logger.info("MaxDownloadsReached, stopping additional downloads.")
@@ -247,7 +251,7 @@ def extract_info_via_info_json(
if uploader_id in entry_ids or not (uploader_url := entry_dict.get("uploader_url")):
continue

cls.logger.debug("Attempting to get parent metadata from URL %s", uploader_url)
cls.logger.info("Attempting to get parent metadata from URL %s", uploader_url)
parent_dict: Optional[Dict] = None
try:
parent_dict = cls.extract_info(
2 changes: 1 addition & 1 deletion src/ytdl_sub/plugins/subtitles.py
Original file line number Diff line number Diff line change
@@ -193,7 +193,7 @@ def post_process_entry(self, entry: Entry) -> Optional[FileMetadata]:
"""
requested_subtitles = entry.get(v.requested_subtitles, expected_type=dict)
if not requested_subtitles:
logger.debug("subtitles not found for %s", entry.title)
logger.info("subtitles not found for %s", entry.title)
return None

file_metadata: Optional[FileMetadata] = None