Skip to content

Owned library: show the list right away, keep delisted games, search by words - #22

Open
marshmallow-mia wants to merge 4 commits into
Villagers654:mainfrom
marshmallow-mia:owned-library-fixes
Open

marshmallow-mia wants to merge 4 commits into
Villagers654:mainfrom
marshmallow-mia:owned-library-fixes

Conversation

@marshmallow-mia

Copy link
Copy Markdown
Contributor

What this fixes

The owned list took ages to appear. "Not installed" stayed empty until every owned game's catalog page and icon had
been fetched one after another: with 29 owned games, 63 seconds on a first start (1 second for Meta's answer, 62 for the
icons). The list now appears as soon as Meta answers for the signed-in accounts, and the icons replace the placeholder
letters one by one. A failed icon no longer drops
the whole list (main's worker reports an empty list on any error), and icons from an older scan are discarded.

One second after the request on upstream main, and with this branch:

Loading on main

Loading

The library screenshots use a simulated Meta answer with five games, one without a canonical name, and a list Meta
reports as cut short, since the real account produces neither case.

Entitlements without a canonical name were skipped. They're kept now and link to Meta's slug-less store URL. This
is defensive: on the test account every entitlement has one, delisted Echo VR included, and main lists it.

A cut-short list looked complete. The entitlements query has no known paging variables. When Meta reports more
pages for any signed-in account, the sidebar now says the list is partial and points to Add Game; owned_apps keeps
that flag when it merges the accounts' lists. Also defensive: the test account's list fits on
one page. The partial-list hint is the line above Steam Games in the picture above.

Search needed the exact title. Library search now ignores case, accents, punctuation and word order: "echo lone"
finds Lone Echo, "lucky tale" finds Lucky's Tale, "vader episode" finds Vader Immortal: Episode I. An apostrophe stays
part of its word, so "luckys", "lucky's" and "lucky" all find "Lucky’s Tale". Letters without an accent mark fold too
(ø, æ, œ, ł, đ), so "orsted" finds "Ørsted".

Search by words in any order

Background results after the window is gone. The library's workers (owned games, icons, game details, store
details, setup and system status) report through event objects of the main window. When those were deleted while a
worker was still fetching, such as on quit, emit raised "Signal source has been deleted", the except branch emitted
again, and the error escaped the thread. Results and printed lines that have nowhere to go are now dropped.

Testing

On 0.11.1.2

  • The 29 real owned games with real store pages and icons (Meta's entitlements answer replayed): the list shows after
    0.1 s instead of 75.1 s on upstream main, the selected game's description and cover after 3.5 to 5.7 s instead of
    75.9 s, and the icons fill in over about 73 s. The same 20 games get icons on both; the other nine (Echo VR, Quill,
    Oculus Medium and other delisted ones) have no catalog page and keep their placeholder on both.
  • With the real account through the CI AppImage: riftlift owned lists the 29 games, Echo VR included, with no
    partial hint (Meta reports no further page).
  • The window with the real account, the CI AppImages of main and of all branches merged:
    • "echo lone", "lône écho", "lucky tale" and "luckys" find Lone Echo, Lone Echo II and the trailer, or Lucky's Tale;
      on main they find nothing.
    • "echo vr" and "lone echo" find their games on both.
    • Echo VR is listed with a letter tile.
  • Windows 10, the fork CI's installer of all branches merged: "echo lone" finds Lone Echo, Lone Echo II and the trailer,
    and Echo VR is listed. Main's window wasn't compared there.
  • The full suite on Linux (Python 3.10 + PySide6 6.7, 3.12 + 6.11 and 3.12 + 6.12) for every commit, and on macOS.
  • Fork CI on the ported branch: the CI and Windows workflows pass, Python and native jobs alike.
  • New since the last base: owned_apps stays partial when any account was cut short (tests/test_owned_library.py).

Earlier, on 7289ef6

  • New tests: tests/test_owned_library.py (list before icons, failed icons, stale scans, partial hint, search,
    apostrophes) and additions to tests/test_entitlements.py (slug-less entitlements, paging info) and
    tests/test_gui.py (a detail fetch finishing after its event object is gone; fails on main with that error).
  • Live on Linux with a real account (29 owned games): the list shows after Meta's answer instead of after 63 seconds,
    Echo VR shows without an icon, and search works with word order, case, accents ("lône ÉCHO"), punctuation and
    apostrophes. Main matches the query as one substring, so "echo lone", "lucky tale", "lône écho" and "luckys" find
    nothing there.
  • pytest, ruff and the installer step on Linux: same results as main, plus the new tests.

…ords

The "Not installed" list stayed empty until every owned game's catalog page
and icon had been fetched one after another, so a first load or a library
with icon-less (delisted) games showed nothing for a long time. The list now
appears as soon as Meta answers for the signed-in accounts and the icons
replace the placeholders one by one; a failed icon no longer drops the list,
and icons from an older scan or a signed-out account are discarded.

Entitlements without a canonical name, as delisted games such as Echo VR
can come back, were skipped. They are kept now and link to Meta's slug-less
store URL.

The entitlements query has no known paging variables, so when Meta reports
more pages for any account the sidebar now says the list is partial and
points to Add Game.

Library search ignores case, accents, punctuation and word order:
"echo lone" finds Lone Echo and "vader episode" finds Vader Immortal:
Episode I.
Search split titles at every punctuation mark, so "Lucky’s Tale" became
"lucky s tale" and typing "luckys" found nothing. Apostrophes now stay
part of their word and are dropped: "luckys", "lucky's" and "lucky" all
find it.
The library's background workers (owned games, icons, game details, store
details, setup and system status) report through event objects of the main
window. When those were deleted while a worker was still fetching, such as
on quit, emit raised "Signal source has been deleted"; the except branch
then emitted again, and the error escaped the thread. Results and printed
lines that have nowhere to go are now dropped.
Search ignores accents by decomposing letters, but these letters have no
decomposition, so "orsted" didn't find "Ørsted". They now fold to their
plain spelling. The left single quotation mark, sometimes typed as an
apostrophe, now stays part of its word like the other apostrophes.
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.

1 participant