Bug 371724 - Screenshots are not shown when <image> element has no width/height attribute
Summary: Screenshots are not shown when <image> element has no width/height attribute
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: 5.8.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-26 20:51 UTC by Stefan Brüns
Modified: 2016-11-02 11:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.8.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Brüns 2016-10-26 20:51:34 UTC
According to https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#sect-Metadata-GenericComponent

"The <image/> tag may have the following properties: ... height ..."

If the width/height attribute is omitted, no screenshots are shown in the rightmost Discover pane.
Comment 1 Aleix Pol 2016-10-26 23:25:21 UTC
Can you provide an example so I can reproduce?
Comment 2 Stefan Brüns 2016-10-27 19:55:10 UTC
Ok, when looking for examples I noticed this is probably not related to the width/height attribute.  

One non-working example is poedit. The appdata contains:

<screenshots>
  <screenshot type="default">
    <image type="source">https://upload.wikimedia.org/wikipedia/commons/c/c2/Poedit_1.8.1_en.png</image>
  </screenshot>
</screenshots>

When I click on the poedit entry, wireshark tells me a connection to upload.wikimedia.org is established, and it transfers e few 100 bytes in each direction.

The URL is correct, the screenshot is ~62kByte.

Pragha-music-player (working):
<screenshot type="default">
    <image type="source">http://pragha-music-player.github.io/images/Pragha-Xfce-HIG.png</image>
</screenshot>
Comment 3 Stefan Brüns 2016-10-27 19:56:05 UTC
Ok, found a different possible cause - all non-working apps have exactly *one* screenshot, multiple screenshots work.
Comment 4 Aleix Pol 2016-10-28 17:38:08 UTC
Which platform are you testing on? I don't have poedit neither on archlinux or ubuntu.
Comment 5 Antonio Larrosa 2016-11-02 11:40:26 UTC
Git commit 3297fe6026edebb8db72bb179289bee844c26ae3 by Antonio Larrosa.
Committed on 02/11/2016 at 11:40.
Pushed by antlarr into branch 'Plasma/5.8'.

Make screenshots visible when there's only one screenshot too

Summary:
Applications with only one screenshot also deserve to have it visible.
FIXED-IN: 5.8.4

Test Plan:
Open any application that only has one screenshot (e.g. poedit).
No screenshot is shown until this patch is applied.

Reviewers: davidedmundson, apol

Reviewed By: davidedmundson, apol

Differential Revision: https://phabricator.kde.org/D3223

M  +1    -1    discover/qml/ApplicationScreenshots.qml

http://commits.kde.org/discover/3297fe6026edebb8db72bb179289bee844c26ae3