Skip to content

Commit

Permalink
Merge pull request pixelfed#2077 from pixelfed/staging
Browse files Browse the repository at this point in the history
Update Media model, fix remote media preview
  • Loading branch information
dansup authored Mar 5, 2020
2 parents 7776cca + ab5a331 commit 30c611e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Updated BaseApiController, invalidate session after account deletion ([826978ce](https://github.com/pixelfed/pixelfed/commit/826978ce))
- Updated AdminUserController, add account deletion handler ([9be19ad8](https://github.com/pixelfed/pixelfed/commit/9be19ad8))
- Updated ContactController, fixes #2042 ([c9057e87](https://github.com/pixelfed/pixelfed/commit/c9057e87))
- Updated Media model, fix remote media preview ([9947050b](https://github.com/pixelfed/pixelfed/commit/9947050b))

## [v0.10.8 (2020-01-29)](https://github.com/pixelfed/pixelfed/compare/v0.10.7...v0.10.8)
### Added
Expand Down
8 changes: 6 additions & 2 deletions app/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public function url()

public function thumbnailUrl()
{
$path = $this->thumbnail_path ?? 'public/no-preview.png';
return url(Storage::url($path));
if($this->remote_media == true) {
return $this->remote_url;
} else {
$path = $this->thumbnail_path ?? 'public/no-preview.png';
return url(Storage::url($path));
}
}

public function thumb()
Expand Down

0 comments on commit 30c611e

Please sign in to comment.