master
Aevann1 2021-12-17 08:07:57 +02:00
parent 85221192c6
commit ae6c8d9ee7
1 changed files with 7 additions and 1 deletions

View File

@ -220,6 +220,12 @@ class Submission(Base):
elif "youtu.be" in self.domain or "youtube.com" == self.domain: return f"https://{site}/assets/images/default_thumb_yt.webp"
else: return f"https://{site}/assets/images/default_thumb_link.webp"
@property
@lazy
def full_thumb(self):
if self.thumb_url.startswith('/'): return 'https://rdrama.net' + self.thumb_url
return self.thumb_url
@property
@lazy
def json_raw(self):
@ -235,7 +241,7 @@ class Submission(Base):
'title': self.title,
'is_nsfw': self.over_18,
'is_bot': self.is_bot,
'thumb_url': self.thumb_url,
'thumb_url': self.full_thumb,
'domain': self.domain,
'url': self.url,
'body': self.body,