Commit Graph

13 Commits

Author SHA1 Message Date
miruka
30ce271ebc Real "copy URL" & "copy path" context menu entries
Replace the poorly implemented 2-in-1 "copy address" media event
menu option with:

- Copy <mediaType> address: visible for non-encrypted media, always
  copies the http URL

- Copy local path: always visible for already downloaded media, even if
  they were downloaded before mirage was started
2020-07-20 00:22:12 -04:00
miruka
f1055ce5b9 Fix loading m.image events in encrypted rooms
Fix bug introduced in 11fb32:

When loading an encrypted thumbnail, QML lacks the decryption dict for
half a second at first.

When calling python like this, python calls the wrong matrix API
for fetching the encrypted thumbnail, and the added retry code
would be forever stuck.

The retry code has been moved to QML, and now works for all HImage.
2020-07-19 14:49:41 -04:00
miruka
11fb32bff6 Retry downloading media if they fail with 404/500+
Trying to fetch a media right after it was uploaded can sometimes lead
to a  404
2020-07-18 22:26:23 -04:00
miruka
e4d47b9b9c Ensure we don't atomically write an empty file 2020-03-17 12:09:08 -04:00
miruka
190eb58187 Write user files and media atomically 2020-03-13 04:36:22 -04:00
miruka
77d877047b Update docstrings 2020-03-12 14:41:00 -04:00
miruka
f9f558cd34 Fix Thumbnail.from_bytes() 2020-03-09 17:33:07 -04:00
miruka
7ee83c5fe4 Downloaded files: include title + ext in filename 2020-03-09 11:46:08 -04:00
miruka
b992db9bfe Use typing.TYPE_CHECKING to avoid inner imports 2020-02-12 05:56:18 -04:00
miruka
fb1f9c62e5 Add SPDX ID LGPL v3+ license headers 2019-12-19 07:46:16 -04:00
miruka
1f41e2ffaa Document Backend attrs, adapt to new ModelStore 2019-12-18 16:24:43 -04:00
miruka
d9b27eff9f Document media_cache.py 2019-12-18 13:43:31 -04:00
miruka
2bdf21d528 Rename some filers and folder for clarity 2019-12-18 04:45:09 -04:00