Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshots are not correctly processed with 0.11.5 #140

Closed
antonio-rojas opened this issue Sep 25, 2017 · 2 comments
Closed

Screenshots are not correctly processed with 0.11.5 #140

antonio-rojas opened this issue Sep 25, 2017 · 2 comments
Labels

Comments

@antonio-rojas
Copy link
Contributor

antonio-rojas commented Sep 25, 2017

With appstream 0.11.5 the screenshot info is not correctly processed. For instance, for krita the xml produced by asgen contains

  <screenshot type="default">
    <image type="source" width="1916" height="1056">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_002.png</image>
  </screenshot>
  <screenshot type="default">
    <image type="source" width="1919" height="1056">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_003.png</image>
  </screenshot>
  <screenshot type="default">
    <image type="source" width="1921" height="1054">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_004.png</image>
  </screenshot>
  <screenshot type="default">
    <image type="source" width="1919" height="1052">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_005.png</image>
  </screenshot>

and 'appstreamcli dump org.kde.krita.desktop' doesn't output any screenshot info.

With previous appstream versions, the screenshot info in asgen-generated xml was enclosed in <screenshots>...</screenshots>:

  <screenshots>
    <screenshot type="default">
      <image type="source" width="1916" height="1056">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_002.png</image>
    </screenshot>
    <screenshot type="default">
      <image type="source" width="1919" height="1056">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_003.png</image>
    </screenshot>
    <screenshot type="default">
      <image type="source" width="1921" height="1054">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_004.png</image>
    </screenshot>
    <screenshot type="default">
      <image type="source" width="1919" height="1052">http://files.kde.org/krita/marketing/appdata/2016-05-24_screenshot_005.png</image>
    </screenshot>
  </screenshots>

and it was correctly processed and recognized by appstreamcli.

@ximion ximion added the bug label Sep 25, 2017
@ximion
Copy link
Owner

ximion commented Sep 25, 2017

The metainfo data is wrong, there should never be more than one type="default" screenshot.
Regardless of that, there is a bug in the XML generator, I think I can fix it today.

ximion added a commit that referenced this issue Sep 25, 2017
This fixes issue #140 adn also enhances the testsuite to test every
screenshot feature we have, so this issue does not happen again.
@ximion
Copy link
Owner

ximion commented Sep 25, 2017

This should be resolved by the patch above. The testsuite also checks screenshot writing (as opposed to only reading) now, so this or any other error does not happen again.

@ximion ximion closed this as completed Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants