Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 6c1c692

Browse files
committed
ADD _writePoster and fix _writeRating for compatiblity
1 parent ea51cf2 commit 6c1c692

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/vsmetaEncoder/vsmetaBase.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ def encode(self, info : VsMetaInfo = None) -> bytes:
6262
# ------------------------------------
6363
def _writeFileHeader(self):
6464
self._writeTag( self.TAG_FILE_HEADER_OTHER )
65-
65+
66+
def _writePoster(self):
67+
self._writeTag(b'\x01')
68+
69+
if self.info.images.episodeImage:
70+
self.encodedContent += self.TAG_EPISODE_THUMB_DATA + b'\x01' + self._writeImage(self.info.images.episodeImage)
71+
self.encodedContent += self.TAG_EPISODE_THUMB_MD5 + b'\x01' + self._writeMD5(self.info.images.episodeImage)
72+
6673
def _writeShowTitle(self):
6774
self._writeTag( self.TAG_SHOW_TITLE, self.info.showTitle2 or self.info.showTitle)
6875
self._writeTag( self.TAG_SHOW_TITLE2, self.info.showTitle2 or self.info.showTitle)
@@ -83,7 +90,7 @@ def _writeClassification(self):
8390
self._writeTag( self.TAG_CLASSIFICATION, 0)
8491

8592
def _writeRating(self):
86-
self._writeTag( self.TAG_RATING, b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01')
93+
self._writeTag( self.TAG_RATING, b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF')
8794

8895
def _writeSummary(self):
8996
if len(self.info.chapterSummary) > 0:

0 commit comments

Comments
 (0)