Skip to content

Commit

Permalink
fix: only use chobit covers when the preview file type is audio #8
Browse files Browse the repository at this point in the history
bump to version v0.6.3
  • Loading branch information
NobeKanai committed Apr 3, 2024
1 parent 5f3911b commit 9d12b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dvtag/doujinvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def _get_cover(self):

res = json.loads(session.get(chobit_api).text[9:-1])

self.work_image = res["works"][0]["thumb"].replace("media.dlsite.com/chobit", "file.chobit.cc", 1)
if (work := res["works"][0])["file_type"] == "audio":
self.work_image = work["thumb"].replace("media.dlsite.com/chobit", "file.chobit.cc", 1)

except Exception as e:
logging.warning(f"Cannot fetch cover from chobit for {self.rjid}: {e}")
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dvtag
version = 0.6.2
version = 0.6.3
author = Nobe Kanai
author_email = nobekanai@gmail.com
description = A tool for tagging your doujin voice library.
Expand Down

0 comments on commit 9d12b4b

Please sign in to comment.