fortheusers / hb-appstore

Homebrew App Store - GUI for downloading/managing homebrew apps
https://hb-app.store
GNU General Public License v3.0
1.08k stars 63 forks source link

Adjust Sort by Most Recent Doesn't work properly #99

Closed mikitakahazekura closed 1 year ago

mikitakahazekura commented 1 year ago

Describe the bug Adjust Sort by Most Recent Doesn't work properly (It was working in the previous release).

Platform: Switch

To Reproduce Open all apps, the most recent is CuteManga (Updated in 2021). There are some apps updated in 2023 but they don't appear. Screenshot attached. 2023032301325000-3EBD978418E32C28FE0992CC8D490326

vgmoose commented 1 year ago

Thanks for the issue! It looks like strptime is not initializing the hour/min/sec field when parsing the "Updated at" date string. Since this date doesn't have a time component, the hour value was being set to an impossibly large value (eg. 141581568), which then causes -1 to come back from mktime (cannot convert to unix timestamp).

That doesn't fully explain why which apps made it to the top, but it's definitely broken. Initializing these time fields to 0 in libget before parsing the date fixes it. (Nightly hbas build link). Since "most recent" is the default view, this probably needs a 2.3.2 followup update very soon.

vgmoose commented 1 year ago

Released 2.3.2 with the fix: https://github.com/fortheusers/hb-appstore/releases/tag/v2.3.2

Greenmonster2710 commented 1 year ago

Um Hi I was using the HB App Store Version: 2.3.2 and got on to the store and wasn't able to download from it when I clicked on an app an pressed A? Please Help!!!

vgmoose commented 1 year ago

@Greenmonster2710 Are you on Switch or Wii U?

For Wii U: Check that the SD isn't write-locked, and that other apps can write to it: https://github.com/fortheusers/hb-appstore/issues/42 For Switch: Make sure the SD card isn't corrupted (and is FAT32 formatted, not EXFAT format which is prone to issues) On both: Make sure that the Internet is still connected

If none of that works, can you tell me if it works in recovery mode? (Spam L and R repeatedly while launching the app)