Repository navigation
Owned library: show the list right away, keep delisted games, search by words - #22
Open
marshmallow-mia wants to merge 4 commits into
Open
marshmallow-mia wants to merge 4 commits into
marshmallow-mia wants to merge 4 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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_appskeepsthat 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".
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,
emitraised "Signal source has been deleted", the except branch emittedagain, and the error escaped the thread. Results and printed lines that have nowhere to go are now dropped.
Testing
On 0.11.1.2
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.
riftlift ownedlists the 29 games, Echo VR included, with nopartial hint (Meta reports no further page).
on main they find nothing.
and Echo VR is listed. Main's window wasn't compared there.
owned_appsstays partial when any account was cut short (tests/test_owned_library.py).Earlier, on 7289ef6
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) andtests/test_gui.py(a detail fetch finishing after its event object is gone; fails on main with that error).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.