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

Add steam image provider #363

Merged
merged 5 commits into from
Apr 15, 2020
Merged

Add steam image provider #363

merged 5 commits into from
Apr 15, 2020

Conversation

Lucki
Copy link
Contributor

@Lucki Lucki commented Apr 4, 2020

This adds steam as an image provider for all games which makes official game art available for games owned outside of steam.
If the game isn't owned at steam an exact name search will be performed at a list of all available apps.
Steams applist will be cached and only updated once a day.
Since steam only hosts official game art the steam image provider is placed at the front of all found images.

There's still a flaw I couldn't figure out: Sometimes the other image provider don't load any images. When adding debug messages to see whether they are even searching for images they always load the images so I'm unable to debug this error. Maybe you have an idea why they're missing sometimes.

@tkashkin
Copy link
Owner

tkashkin commented Apr 5, 2020

That's a good idea.

https://api.steampowered.com/ISteamApps/GetAppList/v0002 endpoint doesn't seem to require an API key. If there are any limits, it should be easier to reuse the key that's already set for Steam (game source).

I'm not even sure if we need to get applist, because GameHub can already parse Steam's appinfo.vdf.

Examples
Factorio
|- [427520]
  |- [appinfo]
    |- [config]
      |- steamcontrollertouchtemplateindex: 1
      |- [steamcontrollerconfigdetails]
        |- [627030001]
          |- controller_type: controller_steamcontroller_gordon
          |- enabled_branches: default
          |- use_action_block: false
      |- steamcontrollertemplateindex: 1
      |- [launch]
        |- [1]
          |- [config]
            |- osarch: 64
            |- oslist: windows
          |- type: default
          |- executable: bin/x64/Factorio.exe
        |- [2]
          |- [config]
            |- osarch: 32
            |- oslist: windows
          |- type: default
          |- executable: bin/Win32/Factorio.exe
        |- [3]
          |- [config]
            |- osarch: 64
            |- oslist: linux
          |- type: default
          |- executable: bin/x64/factorio
        |- [4]
          |- [config]
            |- osarch: 32
            |- oslist: linux
          |- type: default
          |- executable: bin/i386/factorio
        |- [5]
          |- [config]
            |- oslist: macos
          |- type: default
          |- executable: factorio.app/Contents/MacOS/factorio
      |- installdir: Factorio
      |- contenttype: 3
      |- [steamcontrollertouchconfigdetails]
        |- [2036307405]
          |- controller_type: controller_mobile_touch
          |- enabled_branches: default
          |- use_action_block: false
    |- [depots]
      |- [427521]
        |- [config]
          |- osarch: 64
          |- oslist: windows
        |- [manifests]
          |- 0.16.51: 7710943521562681979
          |- 0.18.11: 9093841533235436410
          |- 0.18.12: 2882986470208139956
          |- 0.14.23: 828932359204301707
          |- 0.18.13: 868684244066565929
          |- public: 5217633593669398073
          |- 0.17.74: 1357966597973545547
          |- 0.18.14: 6487871727094123230
          |- 0.12.35: 7111782590850240897
          |- 0.18.15: 765414549267681640
          |- 0.18.16: 5444108068016939539
          |- 0.15.37: 2594072795645229932
          |- 0.18.17: 2896683276503846643
          |- 0.18.6: 7341274762212944817
          |- 0.18.x: 2896683276503846643
          |- 0.18.7: 4560896316659813969
          |- 0.17.69: 3115451951691332268
          |- 0.18.8: 2822781987729133642
          |- 0.18.9: 6580752106961190387
          |- 0.13.20: 3458623580245405937
          |- 0.15.40: 5500062493293721113
          |- 0.18.10: 9021531117231072545
        |- [encryptedmanifests]
          |- [campaign_testing]
            |- encrypted_size_2: F7332CEC13B2B92B7E64A995F8F713B1
            |- encrypted_gid_2: 7B731223B12F97F15D0FE8D0BA69ACB3
          |- [build]
            |- encrypted_size_2: 98237DC2900A74F27F7ED56714971DF8
            |- encrypted_gid_2: CE7D9FEA2121A7C928104034512D857D
        |- name: Factorio Win64
        |- maxsize: 1621602960
      |- [427522]
        |- [config]
          |- osarch: 32
          |- oslist: windows
        |- [manifests]
          |- public: 8127115610667035850
          |- 0.12.35: 1156872931173029592
          |- 0.13.20: 3912804024748477654
        |- name: Factorio Win32
        |- maxsize: 488882534
      |- [427523]
        |- [config]
          |- osarch: 64
          |- oslist: linux
        |- [manifests]
          |- 0.16.51: 5403133336010563238
          |- 0.18.11: 4693968886429440096
          |- 0.18.12: 2341209245511130570
          |- 0.14.23: 316207641527212993
          |- 0.18.13: 3315924300722381912
          |- public: 2363942029507279047
          |- 0.17.74: 4007756988699479451
          |- 0.18.14: 5137481623801936897
          |- 0.12.35: 3176295408006103976
          |- 0.18.15: 2418565649484181125
          |- 0.18.16: 3398022313131407596
          |- 0.15.37: 2309524037194996140
          |- 0.18.17: 2788397480485137609
          |- 0.18.6: 2483400310382262603
          |- 0.18.x: 2788397480485137609
          |- 0.18.7: 4054363835951718481
          |- 0.17.69: 3984808371129058181
          |- 0.18.8: 5107814027301288085
          |- 0.18.9: 8338068793511338324
          |- 0.13.20: 6015717956969578987
          |- 0.15.40: 7261037530771676503
          |- 0.18.10: 8004866401074739085
        |- [encryptedmanifests]
          |- [campaign_testing]
            |- encrypted_size_2: 14696A6CA3CEAB95F71D8E618DC81F1A
            |- encrypted_gid_2: 512EEAC3FC76603F1A63E9D53E9FC377
          |- [build]
            |- encrypted_size_2: 1E336EF9BFFA5C1FE3B6B659F8C1BA7D
            |- encrypted_gid_2: BA2439EAEC7158D52699490C6E86D73C
        |- name: Factorio Linux64
        |- maxsize: 1545967418
      |- [427524]
        |- [config]
          |- osarch: 32
          |- oslist: linux
        |- [manifests]
          |- public: 2006867560965339051
          |- 0.12.35: 992648723365981422
          |- 0.13.20: 1045451170943717957
        |- name: Factorio Linux32
        |- maxsize: 362494820
      |- [427525]
        |- [config]
          |- oslist: macos
        |- [manifests]
          |- 0.16.51: 2592875722330860347
          |- 0.18.11: 8747726077374254105
          |- 0.18.12: 4653660603943386478
          |- 0.14.23: 1682754360692733687
          |- 0.18.13: 2026988571425341834
          |- public: 4837874827908946167
          |- 0.17.74: 4614254181059031298
          |- 0.18.14: 6516983181931332827
          |- 0.12.35: 4147028540401285519
          |- 0.18.15: 155286857961646475
          |- 0.18.16: 6673639148740938313
          |- 0.15.37: 6952994437137429945
          |- 0.18.17: 7737950059736330400
          |- 0.18.6: 7761767704771886151
          |- 0.18.x: 7737950059736330400
          |- 0.18.7: 4093864505127520690
          |- 0.17.69: 974855924430068912
          |- 0.18.8: 4904537560925233955
          |- 0.18.9: 543285428387662234
          |- 0.13.20: 6853737341474878566
          |- 0.15.40: 154009239922104338
          |- 0.18.10: 119558088729873991
        |- [encryptedmanifests]
          |- [campaign_testing]
            |- encrypted_size_2: D5A1AE993A220B0ACFDCA8538867C466
            |- encrypted_gid_2: 9D93BC31DAAA04BEA9C9CCBEF56E83AA
          |- [build]
            |- encrypted_size_2: 1FF20EF821831ACA97671956AF80E0F2
            |- encrypted_gid_2: EDF8C4C5498589F7091963D5DE50EABB
        |- name: Factorio OSX
        |- maxsize: 1557599483
      |- baselanguages: english,german,french,italian,koreana,spanish,schinese,tchinese,russian,japanese,polish,danish,dutch,finnish,norwegian,swedish,hungarian,czech,romanian,brazilian,ukrainian
      |- [branches]
        |- [0.16.51]
          |- timeupdated: 1529066850
          |- description: Factorio Stable 0.16
          |- buildid: 2864790
        |- [0.18.11]
          |- timeupdated: 1583853391
          |- description: Factorio Experimental 0.18.11
          |- buildid: 4762209
        |- [0.18.12]
          |- timeupdated: 1583864330
          |- description: Factorio Experimental 0.18.12
          |- buildid: 4762864
        |- [campaign_testing]
          |- pwdrequired: 1
          |- timeupdated: 1578681052
          |- description: Private campaign testing branch
          |- buildid: 4559307
        |- [0.14.23]
          |- timeupdated: 1493037708
          |- description: Factorio Stable 0.14
          |- buildid: 1767771
        |- [0.18.13]
          |- timeupdated: 1584454330
          |- description: Factorio Experimental 0.18.13
          |- buildid: 4787413
        |- [public]
          |- timeupdated: 1574183270
          |- buildid: 4404625
        |- [0.17.74]
          |- timeupdated: 1572017030
          |- description: Factorio Stable 2 - 0.17.74
          |- buildid: 4324625
        |- [0.18.14]
          |- timeupdated: 1584552689
          |- description: Factorio Experimental 0.18.14
          |- buildid: 4792474
        |- [build]
          |- pwdrequired: 1
          |- timeupdated: 1585330735
          |- description: 
          |- buildid: 4828619
        |- [0.12.35]
          |- timeupdated: 1472219884
          |- description: Factorio Stable 0.12
          |- buildid: 1158343
        |- [0.18.15]
          |- timeupdated: 1584718066
          |- description: Factorio Experimental 0.18.15
          |- buildid: 4801235
        |- [0.18.16]
          |- timeupdated: 1585153036
          |- description: Factorio Experimental 0.18.16
          |- buildid: 4818619
        |- [0.15.37]
          |- timeupdated: 1508249255
          |- description: Factorio Stable 0.15
          |- buildid: 2205470
        |- [0.18.17]
          |- timeupdated: 1585339960
          |- description: Factorio Experimental 0.18.17
          |- buildid: 4828619
        |- [0.18.6]
          |- timeupdated: 1581456089
          |- description: Factorio Experimental 0.18.6
          |- buildid: 4665642
        |- [0.18.x]
          |- timeupdated: 1585340002
          |- description: Latest 0.18 Experimental
          |- buildid: 4828619
        |- [0.18.7]
          |- timeupdated: 1582040219
          |- description: Factorio Experimental 0.18.7
          |- buildid: 4688546
        |- [0.17.69]
          |- timeupdated: 1568908005
          |- description: Factorio Stable 1 - 0.17.69
          |- buildid: 4211220
        |- [0.17.79]
          |- timeupdated: 1574174277
          |- description: Factorio Stable 3 - 0.17.79
          |- buildid: 4404625
        |- [0.18.8]
          |- timeupdated: 1582057274
          |- description: Factorio Experimental 0.18.8
          |- buildid: 4689352
        |- [0.18.9]
          |- timeupdated: 1582634084
          |- description: Factorio Experimental 0.18.9
          |- buildid: 4713178
        |- [0.13.20]
          |- timeupdated: 1478180124
          |- description: Factorio Stable 0.13
          |- buildid: 1306063
        |- [0.15.40]
          |- timeupdated: 1511992213
          |- description: Factorio Stable 0.15
          |- buildid: 2326706
        |- [0.18.10]
          |- timeupdated: 1583246557
          |- description: Factorio Experimental 0.18.10
          |- buildid: 4737880
    |- [extended]
      |- publisher: Wube Software LTD.
      |- developer: Wube Software LTD.
      |- homepage: https://www.factorio.com
      |- listofdlc: 436090,452280,645390
    |- appid: 427520
    |- [ufs]
      |- quota: 1999999999
      |- [rootoverrides]
        |- [0]
          |- oscompare: =
          |- useinstead: MacAppSupport
          |- root: WinAppDataRoaming
          |- [pathtransforms]
            |- [0]
              |- replace: factorio/saves/
              |- find: Factorio/saves/
          |- os: MacOS
        |- [1]
          |- oscompare: =
          |- useinstead: LinuxHome
          |- root: WinAppDataRoaming
          |- [pathtransforms]
            |- [0]
              |- replace: .factorio/saves/
              |- find: Factorio/saves/
          |- os: Linux
      |- maxnumfiles: 999
      |- [savefiles]
        |- [0]
          |- path: Factorio/saves/
          |- root: WinAppDataRoaming
          |- pattern: *.zip
          |- recursive: 1
    |- [common]
      |- [library_assets]
        |- [logo_position]
          |- pinned_position: BottomLeft
          |- height_pct: 41
          |- width_pct: 53
        |- library_logo: en
        |- library_hero: en
        |- library_capsule: en
      |- [genres]
        |- 0: 4
        |- 1: 23
        |- 2: 28
        |- 3: 2
        |- 4: 70
      |- [supported_languages]
        |- [italian]
          |- supported: true
        |- [hungarian]
          |- supported: true
        |- [romanian]
          |- supported: true
        |- [schinese]
          |- supported: true
        |- [french]
          |- supported: true
        |- [spanish]
          |- supported: true
        |- [swedish]
          |- supported: true
        |- [tchinese]
          |- supported: true
        |- [koreana]
          |- supported: true
        |- [brazilian]
          |- supported: true
        |- [german]
          |- supported: true
        |- [dutch]
          |- supported: true
        |- [czech]
          |- supported: true
        |- [ukrainian]
          |- supported: true
        |- [polish]
          |- supported: true
        |- [japanese]
          |- supported: true
        |- [english]
          |- supported: true
        |- [portuguese]
          |- supported: true
        |- [finnish]
          |- supported: true
        |- [norwegian]
          |- supported: true
        |- [russian]
          |- supported: true
      |- clienttga: 7dbdb4c9fd24f12daca89c91b4216e18708080b6
      |- clienticns: 1814708b5344008dd9a8ea3c89699aa0f8a50309
      |- releasestate: released
      |- osextended: macos64,macosnotarized
      |- metacritic_name: Factorio
      |- store_asset_mtime: 1572353229
      |- [associations]
        |- [0]
          |- name: Wube Software LTD.
          |- type: developer
        |- [1]
          |- name: Wube Software LTD.
          |- type: publisher
      |- community_visible_stats: 1
      |- [store_tags]
        |- 7: 1662
        |- 17: 3942
        |- 8: 1695
        |- 18: 1673
        |- 9: 12472
        |- 19: 1645
        |- 0: 255534
        |- 10: 1685
        |- 1: 7332
        |- 11: 1669
        |- 2: 8945
        |- 12: 493
        |- 3: 3810
        |- 13: 1616
        |- 4: 1702
        |- 14: 599
        |- 5: 9
        |- 15: 4182
        |- 6: 3859
        |- 16: 492
      |- [languages]
        |- italian: 1
        |- schinese: 1
        |- hungarian: 1
        |- romanian: 1
        |- french: 1
        |- danish: 1
        |- thai: 1
        |- spanish: 1
        |- tchinese: 1
        |- swedish: 1
        |- turkish: 1
        |- koreana: 1
        |- brazilian: 1
        |- german: 1
        |- dutch: 1
        |- czech: 1
        |- arabic: 1
        |- ukrainian: 1
        |- japanese: 1
        |- polish: 1
        |- english: 1
        |- portuguese: 1
        |- finnish: 1
        |- russian: 1
        |- norwegian: 1
        |- bulgarian: 1
        |- greek: 1
      |- primary_genre: 28
      |- review_score: 9
      |- review_percentage: 98
      |- logo_small: 95e5aa627ae1481b1dea293f6db5954e8aa79f41_thumb
      |- icon: 267f5a89f36ab287e600a4e7d4e73d3d11f0fd7d
      |- [header_image]
        |- english: header.jpg
      |- [category]
        |- category_23: 1
        |- category_9: 1
        |- category_27: 1
        |- category_17: 1
        |- category_1: 1
        |- category_38: 1
        |- category_48: 1
        |- category_2: 1
        |- category_22: 1
        |- category_42: 1
      |- logo: 95e5aa627ae1481b1dea293f6db5954e8aa79f41
      |- osarch: 
      |- community_hub_visible: 1
      |- gameid: 427520
      |- name: Factorio
      |- type: Game
      |- oslist: windows,macos,linux
      |- clienticon: bcbf4ca8e6be3f0222e257396c8ba7dbc6caca29
      |- steam_release_date: 1456426800
      |- [small_capsule]
        |- english: capsule_231x87.jpg
Half-Life: Alyx
|- [546560]
  |- [appinfo]
    |- [config]
      |- [launch]
        |- [0]
          |- [config]
            |- osarch: 64
            |- oslist: windows
          |- arguments: -steam -noasserts -nopassiveasserts +map startup
          |- type: vr
          |- executable: game/bin/win64/hlvr.exe
      |- installdir: Half-Life Alyx
    |- [depots]
      |- [228990]
        |- [config]
          |- oslist: windows
        |- depotfromapp: 228980
        |- sharedinstall: 1
        |- maxsize: 102931551
        |- name: DirectX Jun 2010 Redist
      |- [546561]
        |- [config]
          |- language: 
        |- [manifests]
          |- public: 6545753290534515673
        |- [encryptedmanifests]
          |- [stable]
            |- encrypted_size_2: 6F3CBC1F7ADF7D9BF0408F36C7AA6C20
            |- encrypted_gid_2: E76DDFD7AEF6D8934474EDE4382633C3
          |- [unstable]
            |- encrypted_size_2: CDE3BB40B229C2E2820BA31C1B6B19E3
            |- encrypted_gid_2: 9F58712E2241064551F3C66DDF9BBD6A
        |- name: Half-Life: Alyx Content
        |- maxsize: 67739528355
      |- [546562]
        |- [config]
          |- language: 
        |- [manifests]
          |- public: 8074939326999088927
        |- [encryptedmanifests]
          |- [stable]
            |- encrypted_size_2: 44FF3494F91095A7DD321C2A7AA1BB87
            |- encrypted_gid_2: E677C1910FEE9BAD53A75B5190521486
        |- name: Half-Life: Alyx Customer-Only Maps
      |- [228983]
        |- [config]
          |- oslist: windows
        |- depotfromapp: 228980
        |- sharedinstall: 1
        |- maxsize: 19265607
        |- name: VC 2010 Redist
      |- [branches]
        |- [public]
          |- timeupdated: 1585431547
          |- buildid: 4831658
        |- [stable]
          |- pwdrequired: 1
          |- timeupdated: 1584062560
          |- description: Less frequent, more stable builds
          |- buildid: 4765294
        |- [unstable]
          |- pwdrequired: 1
          |- timeupdated: 1585957525
          |- description: Includes more recent changes, may be less stable
          |- buildid: 4857991
    |- [extended]
      |- publisher: Valve
      |- vrheadsetstreaming: 1
      |- aliases: HL
      |- developer: Valve
      |- homepage: http://half-life.com
      |- listofdlc: 1250370,1267750,1270090
    |- appid: 546560
    |- [ufs]
      |- quota: 1000000000
      |- maxnumfiles: 1000
      |- [savefiles]
        |- [0]
          |- path: game/hlvr/SAVE
          |- root: gameinstall
          |- pattern: *
          |- recursive: 1
          |- [platforms]
            |- 1: Windows
    |- [common]
      |- [supported_languages]
        |- [schinese]
          |- subtitles: true
          |- supported: true
        |- [french]
          |- subtitles: true
          |- supported: true
        |- [latam]
          |- subtitles: true
          |- supported: true
        |- [spanish]
          |- subtitles: true
          |- supported: true
        |- [tchinese]
          |- subtitles: true
          |- supported: true
        |- [koreana]
          |- subtitles: true
          |- supported: true
        |- [german]
          |- subtitles: true
          |- supported: true
        |- [japanese]
          |- subtitles: true
          |- supported: true
        |- [english]
          |- subtitles: true
          |- supported: true
          |- full_audio: true
        |- [russian]
          |- subtitles: true
          |- supported: true
      |- onlyvrsupport: 1
      |- [header_image]
        |- english: header.jpg
      |- openvr_action_manifest_path: game/hlvr/cfg/actions.json
      |- name: Half-Life: Alyx
      |- gameid: 546560
      |- community_hub_visible: 1
      |- review_percentage: 98
      |- [playareavr]
        |- [roomscale]
          |- 360_required: 0
          |- width: 2
          |- depth: 1.5
        |- seated: 1
        |- standing: 1
      |- logo_small: f7269f4b14f921e9dff13c05caf133ffe92b58ab_thumb
      |- store_asset_mtime: 1584652292
      |- metacritic_score: 93
      |- [category]
        |- category_13: 1
        |- category_17: 1
        |- category_2: 1
        |- category_30: 1
        |- category_31: 1
        |- category_22: 1
      |- [associations]
        |- [0]
          |- name: Valve
          |- type: developer
        |- [1]
          |- name: Valve
          |- type: publisher
        |- [2]
          |- name: Half-Life
          |- type: franchise
      |- clienttga: d523faf1d3b6a91882923a9a0c42a95593cc2dac
      |- has_adult_content: 1
      |- steam_release_date: 1584982800
      |- logo: f7269f4b14f921e9dff13c05caf133ffe92b58ab
      |- [controllervr]
        |- steamvr: 1
        |- oculus: 1
      |- [genres]
        |- 0: 1
        |- 1: 25
      |- metacritic_fullurl: https://www.metacritic.com/game/pc/half-life-alyx?ftag=MCD-06-10aaa1f
      |- metacritic_name: Half-Life: Alyx
      |- icon: 225032ac2ad1aca8f5fd98baa2b9daf1eebea5ca
      |- primary_genre: 1
      |- [library_assets]
        |- [logo_position]
          |- pinned_position: CenterCenter
          |- height_pct: 64.39862644681921
          |- width_pct: 67.44186046511629
        |- library_logo: en
        |- library_hero: en
        |- library_capsule: en
      |- [store_tags]
        |- 7: 4182
        |- 17: 1756
        |- 8: 1663
        |- 18: 1721
        |- 9: 3942
        |- 19: 10397
        |- 0: 5144
        |- 10: 1667
        |- 1: 19
        |- 11: 3839
        |- 2: 21978
        |- 12: 1774
        |- 3: 21
        |- 13: 1673
        |- 4: 7208
        |- 14: 5411
        |- 5: 4166
        |- 15: 1659
        |- 6: 1742
        |- 16: 4295
      |- releasestate: released
      |- [small_capsule]
        |- english: capsule_231x87.jpg
      |- type: Game
      |- community_visible_stats: 1
      |- clienticon: 836b72ec556fd56815a977140bb27cfe9ce12d06
      |- review_score: 9
      |- openvrsupport: 1
      |- [languages]
        |- schinese: 1
        |- french: 1
        |- latam: 1
        |- spanish: 1
        |- tchinese: 1
        |- koreana: 1
        |- german: 1
        |- japanese: 1
        |- english: 1
        |- russian: 1

@Lucki
Copy link
Contributor Author

Lucki commented Apr 5, 2020

I'm not even sure if we need to get applist, because GameHub can already parse Steam's appinfo.vdf.

I thought that only contains installed/owned games? Would make stuff a bit easier.
Steam has to be installed and cached that file beforehand so it's not possible anymore to use that provider without steam installed if that matters.

I thought that only contains installed/owned games?

Seems so. My appinfo.vdf doesn't contain games I'm not owning on Steam.

@Lucki
Copy link
Contributor Author

Lucki commented Apr 5, 2020

I've added the previous manual cache method as fallback. Sadly it's possible some false positive raise up like: https://steamdb.info/app/12250/ instead of https://steamdb.info/app/12120/ where assets are missing.

@Lucki
Copy link
Contributor Author

Lucki commented Apr 14, 2020

I've added local custom grids as search results so this will fix #314

@tkashkin tkashkin merged commit 19bbd48 into tkashkin:dev Apr 15, 2020
@Lucki Lucki deleted the steam_images branch April 16, 2020 10:16
Lucki pushed a commit to Lucki/GameHub that referenced this pull request Oct 30, 2021
Add steam image provider

Former-commit-id: 19bbd48
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