Files
CollectMangaInfo/DataClass.py
Lee Young Hoon 07ad09bb50 Update DataClass.py, GetArc_Hitomi.py, and 2 more files...
작업한거 일단 커밋. 딱히 기능을 추가한건 없지만, 정리는 조금 했다. 정리 더 해야 하는데, 윈도우에서 작업하려고....커밋!!
2025-01-28 17:45:03 +09:00

52 lines
1.3 KiB
Python

class CBZInfo:
def __init__(self, title, url):
self.title = title
self.url = url
self.serires = ""
self.type = ""
self.filename = ""
self.torrent = ""
self.language = ""
self.gallery_id = 0
# 중복을 허용하지 않는 집합으로 초기화
self.related_galID = set()
self.artists = set()
self.tags = set()
def __str__(self):
strArtists = ", ".join(self.artists)
strTags = ", ".join(self.tags)
return f"ID : {self.gallery_id} - {self.title} by {strArtists} - #{strTags}"
def AddTag(self, name):
self.tags.add(name)
def RmvTag(self, name):
self.tags.discard(name)
def AddArtist(self, name):
self.artists.add(name)
def RmvArtist(self, name):
self.artists.discard(name)
class TagInfo:
def __init__(self, name, url):
self.name = name
self.url = url
def __str__(self):
return f"{self.name} : {self.url}"
class ImageFileInfo:
def __init__(self, name, height, width, hashValue, bWebp):
self.name = name
self.height = height
self.width = width
self.hashValue = hashValue
self.bWebp = bWebp