Skip to content

Commit

Permalink
Clarify PTP config
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Nov 18, 2024
1 parent 10259ee commit 0dd5de9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions data/example-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@

# Number of screenshots to use for each (ALL) disc/episode when uploading packs to supported sites.
# 0 equals old behavior where only the original description and images are added.
# This setting also effect PTP, however PTP requries at least 2 images for each.
# PTP will always use a *minimum* of 2, regardless of what is set here.
"multiScreens": "2",

# The below options for packed content do not effect PTP. PTP has a set standard.

# When uploading packs, you can specifiy a different screenshot thumbnail size, default 300.
"pack_thumb_size": "300",

Expand Down
4 changes: 2 additions & 2 deletions src/trackers/PTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,9 @@ async def edit_desc(self, meta):
prep = Prep(screens=meta['screens'], img_host=meta['imghost'], config=self.config)
base = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/DESCRIPTION.txt", 'r', encoding="utf-8").read()
multi_screens = int(self.config['DEFAULT'].get('multiScreens', 2))
if multi_screens == 0:
if multi_screens < 2:
multi_screens = 2
console.print("[yellow]PTP requires screenshots for multi disc/file content, overriding config")
console.print("[yellow]PTP requires at least 2 screenshots for multi disc/file content, overriding config")

with open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'w', encoding="utf-8") as desc:
images = meta['image_list']
Expand Down

0 comments on commit 0dd5de9

Please sign in to comment.