Skip to content

Commit

Permalink
Fixed #178: convert local file medias to Path before use
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Oct 9, 2023
1 parent ef2cc41 commit 4a61b67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (as of version 2.1.15).

## [Unreleased]

### Changed

- Fixed local path media (profile, banner) not working (#178)

## [2.1.18] - 2022-11-09

### Changed
Expand Down
2 changes: 2 additions & 0 deletions youtube2zim/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ def check_branding_values(self):
if self.profile_image.startswith("http"):
stream_file(self.profile_image, self.profile_path)
else:
self.profile_image = Path(self.profile_image)
if not self.profile_image.exists():
raise IOError(
f"--profile image could not be found: {self.profile_image}"
Expand All @@ -432,6 +433,7 @@ def check_branding_values(self):
if self.banner_image.startswith("http"):
stream_file(self.banner_image, self.banner_path)
else:
self.banner_image = Path(self.banner_image)
if not self.banner_image.exists():
raise IOError(
f"--banner image could not be found: {self.banner_image}"
Expand Down

0 comments on commit 4a61b67

Please sign in to comment.