mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 12:05:35 +00:00
Fix episode with missing image [SC]
This commit is contained in:
parent
ebef2a88a3
commit
738de7d52f
@ -16,7 +16,9 @@ class Episode:
|
|||||||
self.duration: int = data.get('duration')
|
self.duration: int = data.get('duration')
|
||||||
|
|
||||||
def collect_image(self, SITE_NAME, domain):
|
def collect_image(self, SITE_NAME, domain):
|
||||||
self.image = f"https://cdn.{SITE_NAME}.{domain}/images/{self.data.get('images')[0]['filename']}"
|
self.image = None
|
||||||
|
if len(self.data.get('images')) > 0:
|
||||||
|
self.image = f"https://cdn.{SITE_NAME}.{domain}/images/{self.data.get('images')[0]['filename']}"
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"Episode(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', duration={self.duration} sec)"
|
return f"Episode(id={self.id}, number={self.number}, name='{self.name}', plot='{self.plot}', duration={self.duration} sec)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user