Skip to content

fix: refactor app screenshots - #490

Closed
allendema wants to merge 1 commit into
linuxmint:masterfrom
allendema:fix-app-screenshots
Closed

allendema wants to merge 1 commit into
linuxmint:masterfrom
allendema:fix-app-screenshots

Conversation

@allendema

Copy link
Copy Markdown

Why

First party screenshots were too old.
Third party screenshots were not avaliable.
Debian - debshots scraping mechanism outdated.

Which only left the very old screenshot(s).

How

Fix the debian community screenshots and remove own community + third party screenshots.
Also use the json api instead of scraping.
Remove not needed imports like bs4, re, threading, gi{...}.
Double the allowed screenshots to now allow 8.

Fix the debian community screenshots and remove own community + third party screenshots.
Also use the json api instead of scraping.
Remove not needed imports like bs4, gi{...} etc.
Double the allowed screenshots to now allow 8.

Signed-off-by: Allen <64094914+allendema@users.noreply.github.com>
@mtwebster

Copy link
Copy Markdown
Member
  • Why are you removing the third-party screenshots? If you're going to refactor this should be included. Mint doesn't use them but they're also not in the way if disabled:
    Add hamonikr packages #322

  • I think 4 is enough screenshots.

@allendema

Copy link
Copy Markdown
Author

When tested at the time, the given third-party url path had no screenshots for packages like mpv, vlc, etc.
Now that the page won't even load. However, I can revert the removal.

Four screenshots seems too little when one wants to view different aspects of an app, considering that they are community ones.

@mtwebster

Copy link
Copy Markdown
Member

@igothere are these additional screenshots still used?

mtwebster added a commit that referenced this pull request Nov 3, 2026
- Use screenshots.debian.net's JSON API; the scraped page layout
  changed and no longer matched anything. Based on #490.
- Remove the Hamonikr screenshot/description scraping, its setting,
  and the now-unneeded python3-bs4/python3-lxml dependencies.
@mtwebster

Copy link
Copy Markdown
Member

Done in 37244a2

This PR as submitted crashed - was this even tested?

Application.load_banner took 82.512 ms
Loading error: 'PackageTile' object has no attribute 'button'
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 1066, in on_installer_ready
    self.load_landing_apps()
    ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 1490, in load_landing_apps
    self.load_featured()
    ~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/linuxmint/mintinstall/misc.py", line 17, in wrapper
    res = func(*arg)
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 1443, in load_featured
    tile = PackageTile(pkginfo, self.installer, show_package_type=True, review_info=review_info)
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 403, in __init__
    self.button.connect("clicked", self._activate_fb_child)
    ^^^^^^^^^^^

@mtwebster mtwebster closed this Nov 3, 2026
@allendema

Copy link
Copy Markdown
Author

DEBUG=1 python usr/bin/mintinstall reported no such error with a clean cache and images loaded fine.
However the self.button line should have not been changed as it caused this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants