Skip to content

Commit

Permalink
BHD - UTF-8 description handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Sep 20, 2024
1 parent 525d7f1 commit 6e95a24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/trackers/BHD.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def upload(self, meta):
else:
mi_dump = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/MEDIAINFO.txt", 'r', encoding='utf-8')

desc = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'r').read()
desc = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'r', encoding='utf-8').read()
torrent_file = f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]{meta['clean_name']}.torrent"
files = {
'mediainfo': mi_dump,
Expand Down Expand Up @@ -180,8 +180,8 @@ async def get_type(self, meta):
return type_id

async def edit_desc(self, meta):
base = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/DESCRIPTION.txt", 'r').read()
with open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'w') as desc:
base = open(f"{meta['base_dir']}/tmp/{meta['uuid']}/DESCRIPTION.txt", 'r', encoding='utf-8').read()
with open(f"{meta['base_dir']}/tmp/{meta['uuid']}/[{self.tracker}]DESCRIPTION.txt", 'w', encoding='utf-8') as desc:
if meta.get('discs', []) != []:
discs = meta['discs']
if discs[0]['type'] == "DVD":
Expand Down

0 comments on commit 6e95a24

Please sign in to comment.