Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0264.py @ 3699:2dab494e56fc
plugin XEP-0264: replace `SIZE_FULL_SCREEN` by `SIZE_BIG`:
`SIZE_FULL_SCREEN` may result in large files, and BoB is currently used to transfer them,
resulting in potentially large stanza. As a result, Libervia profile can be disconnected
from server if stanza max size is reached.
As a temporary workaround, `SIZE_BIG` is now the maximum size used. This should be fixed
in 0.9 with a proper way to transfer large thumbnails (i.e. not BoB).
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 05 Nov 2021 18:08:39 +0100 |
parents | be6d91572633 |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3698:a806dcad6bfc | 3699:2dab494e56fc |
---|---|
71 class XEP_0264(object): | 71 class XEP_0264(object): |
72 SIZE_SMALL = (320, 320) | 72 SIZE_SMALL = (320, 320) |
73 SIZE_MEDIUM = (640, 640) | 73 SIZE_MEDIUM = (640, 640) |
74 SIZE_BIG = (1280, 1280) | 74 SIZE_BIG = (1280, 1280) |
75 SIZE_FULL_SCREEN = (2560, 2560) | 75 SIZE_FULL_SCREEN = (2560, 2560) |
76 SIZES = (SIZE_SMALL, SIZE_MEDIUM, SIZE_FULL_SCREEN) | 76 # FIXME: SIZE_FULL_SCREEN is currently discarded as the resulting files are too big |
77 # for BoB | |
78 # TODO: use an other mechanism than BoB for bigger files | |
79 SIZES = (SIZE_SMALL, SIZE_MEDIUM, SIZE_BIG) | |
77 | 80 |
78 def __init__(self, host): | 81 def __init__(self, host): |
79 log.info(_("Plugin XEP_0264 initialization")) | 82 log.info(_("Plugin XEP_0264 initialization")) |
80 self.host = host | 83 self.host = host |
81 host.trigger.add("XEP-0234_buildFileElement", self._addFileThumbnails) | 84 host.trigger.add("XEP-0234_buildFileElement", self._addFileThumbnails) |