Wip
This commit is contained in:
parent
b67f6d37a4
commit
a138ad0484
@ -33,7 +33,7 @@ def get_audiobookshelf_data() -> tuple[int | None, str | None]:
|
||||
"""
|
||||
|
||||
headers = {"Authorization": f"Bearer {PODCAST_AUTHORIZATION_TOKEN}"}
|
||||
logger.debug(f"[Audiobookshelf] Fetching Audiobookshelf data")
|
||||
logger.debug("[Audiobookshelf] Fetching Audiobookshelf data")
|
||||
try:
|
||||
response = requests.get(PODCAST_API_URL, headers=headers)
|
||||
response.raise_for_status()
|
||||
@ -152,10 +152,10 @@ def download_episode() -> None:
|
||||
try:
|
||||
episode_description = episode_info.get("description", "")
|
||||
if "sponsored" in episode_description.lower():
|
||||
logger.debug(f"[App] Sponsored segments found in description, waiting for SponsorBlock")
|
||||
logger.debug("[App] Sponsored segments found in description, waiting for SponsorBlock")
|
||||
wait_for_sponsorblock_segments_to_be_added(episode_url)
|
||||
else:
|
||||
logger.debug(f"[App] No sponsored segments found in description")
|
||||
logger.debug("[App] No sponsored segments found in description")
|
||||
except Exception as e:
|
||||
logger.warning(f"[App] Failed during SponsorBlock wait: {e}", exc_info=True)
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ def check_for_sponsorblock_segments(youtube_video:str) -> bool:
|
||||
return False
|
||||
|
||||
if segments:
|
||||
logger.debug(f"[SponsorBlock] SponsorBlock segments found for video: {youtube_video}")
|
||||
logger.info(f"[SponsorBlock] SponsorBlock segments found for video: {youtube_video}")
|
||||
return True
|
||||
|
||||
def return_download_options(information:dict,track:str)->dict:
|
||||
@ -110,7 +110,7 @@ def return_download_options(information:dict,track:str)->dict:
|
||||
}],
|
||||
"postprocessor_args": [
|
||||
"-metadata", f"title={information['title']}",
|
||||
"-metadata", f"artist=Perun",
|
||||
"-metadata", "artist=Perun",
|
||||
"-metadata", f"track={track}",
|
||||
"-metadata", f"date={information['date']}",
|
||||
"-metadata", f"comment={return_string_as_html(information['description'])}",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user