Fix case where uri has no file extension

`image-type' can work out the MIME type just based on the magic numbers,
if needed.
This commit is contained in:
TEC 2024-03-21 18:02:01 +08:00
parent d1e7774dd7
commit 3f729a8e93
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 1 additions and 1 deletions

View File

@ -1657,7 +1657,7 @@ To use a specific player, set SERVICE to the target MediaPlayer2 service."
temporary-file-directory
(file-name-with-extension
(concat "emacs-mpris-" (sha1 uri))
(file-name-extension uri)))))
(or (file-name-extension uri) "img")))))
(if (file-exists-p temp-file)
temp-file
(and (url-copy-file uri temp-file)