Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
adjust additional header setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Mar 14, 2024
1 parent 863ae63 commit bc5d055
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.4"
__version__ = "5.2.5"
5 changes: 3 additions & 2 deletions cyberdrop_dl/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ async def mark_completed(self, media_item: MediaItem) -> None:

async def set_additional_headers(self) -> None:
"""Sets additional headers for the download session"""
if self.manager.config_manager.authentication_data['PixelDrain']['pixeldrain_api_key']:
self._additional_headers["Authorization"] = await self.manager.download_manager.basic_auth("Cyberdrop-DL", self.manager.config_manager.authentication_data['PixelDrain']['pixeldrain_api_key'])
if self.domain == "pixeldrain":
if self.manager.config_manager.authentication_data['PixelDrain']['pixeldrain_api_key']:
self._additional_headers["Authorization"] = await self.manager.download_manager.basic_auth("Cyberdrop-DL", self.manager.config_manager.authentication_data['PixelDrain']['pixeldrain_api_key'])

async def get_final_file_info(self, complete_file: Path, partial_file: Path,
media_item: MediaItem) -> tuple[Path, Path, bool, bool]:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
version = "5.2.4"
version = "5.2.5"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit bc5d055

Please sign in to comment.