This commit is contained in:
Aevann1 2021-10-25 16:47:19 +02:00
parent 50b2ed0705
commit 300619328a
6 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ disablesignups
.idea/ .idea/
**/.pytest_cache/ **/.pytest_cache/
venv/ venv/
.vscode/

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 458 B

Before After
Before After

View file

@ -203,7 +203,7 @@ class Submission(Base):
@lazy @lazy
def thumb_url(self): def thumb_url(self):
if self.over_18: return f"http://{site}/assets/images/nsfw.gif" if self.over_18: return f"http://{site}/assets/images/nsfw.gif"
elif not self.url: return f"http://{site}/assets/images/{site_name}/default_thumb_text.gif" elif not self.url: return f"http://{site}/assets/images/{site_name}/default_text.gif"
elif self.thumburl: return self.thumburl elif self.thumburl: return self.thumburl
elif "youtu.be" in self.domain or "youtube.com" in self.domain: return f"http://{site}/assets/images/default_thumb_yt.gif" elif "youtu.be" in self.domain or "youtube.com" in self.domain: return f"http://{site}/assets/images/default_thumb_yt.gif"
else: return f"http://{site}/assets/images/default_thumb_link.gif" else: return f"http://{site}/assets/images/default_thumb_link.gif"