mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Update last access time when thumbnails are viewed
This commit is contained in:
parent
05f98a2224
commit
300edc2348
@ -67,6 +67,7 @@ class ThumbnailResource(Resource):
|
|||||||
yield self._respond_local_thumbnail(
|
yield self._respond_local_thumbnail(
|
||||||
request, media_id, width, height, method, m_type
|
request, media_id, width, height, method, m_type
|
||||||
)
|
)
|
||||||
|
self.media_repo.mark_recently_accessed(server_name, media_id)
|
||||||
else:
|
else:
|
||||||
if self.dynamic_thumbnails:
|
if self.dynamic_thumbnails:
|
||||||
yield self._select_or_generate_remote_thumbnail(
|
yield self._select_or_generate_remote_thumbnail(
|
||||||
@ -78,6 +79,7 @@ class ThumbnailResource(Resource):
|
|||||||
request, server_name, media_id,
|
request, server_name, media_id,
|
||||||
width, height, method, m_type
|
width, height, method, m_type
|
||||||
)
|
)
|
||||||
|
self.media_repo.mark_recently_accessed(None, media_id)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _respond_local_thumbnail(self, request, media_id, width, height,
|
def _respond_local_thumbnail(self, request, media_id, width, height,
|
||||||
|
Loading…
Reference in New Issue
Block a user