Steam source debug info on skip
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import logging
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from time import time
|
from time import time
|
||||||
@@ -25,13 +26,13 @@ from typing import Iterable
|
|||||||
|
|
||||||
from src import shared
|
from src import shared
|
||||||
from src.game import Game
|
from src.game import Game
|
||||||
|
from src.importer.sources.location import Location
|
||||||
from src.importer.sources.source import (
|
from src.importer.sources.source import (
|
||||||
SourceIterationResult,
|
SourceIterationResult,
|
||||||
SourceIterator,
|
SourceIterator,
|
||||||
URLExecutableSource,
|
URLExecutableSource,
|
||||||
)
|
)
|
||||||
from src.utils.steam import SteamFileHelper, SteamInvalidManifestError
|
from src.utils.steam import SteamFileHelper, SteamInvalidManifestError
|
||||||
from src.importer.sources.location import Location
|
|
||||||
|
|
||||||
|
|
||||||
class SteamSourceIterator(SourceIterator):
|
class SteamSourceIterator(SourceIterator):
|
||||||
@@ -74,17 +75,20 @@ class SteamSourceIterator(SourceIterator):
|
|||||||
steam = SteamFileHelper()
|
steam = SteamFileHelper()
|
||||||
try:
|
try:
|
||||||
local_data = steam.get_manifest_data(manifest)
|
local_data = steam.get_manifest_data(manifest)
|
||||||
except (OSError, SteamInvalidManifestError):
|
except (OSError, SteamInvalidManifestError) as error:
|
||||||
|
logging.debug("Couldn't load appmanifest %s", manifest, exc_info=error)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Skip non installed games
|
# Skip non installed games
|
||||||
installed_mask = 4
|
installed_mask = 4
|
||||||
if not int(local_data["stateflags"]) & installed_mask:
|
if not int(local_data["stateflags"]) & installed_mask:
|
||||||
|
logging.debug("Skipped %s: not installed", manifest)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Skip duplicate appids
|
# Skip duplicate appids
|
||||||
appid = local_data["appid"]
|
appid = local_data["appid"]
|
||||||
if appid in appid_cache:
|
if appid in appid_cache:
|
||||||
|
logging.debug("Skipped %s: appid already seen during import", manifest)
|
||||||
continue
|
continue
|
||||||
appid_cache.add(appid)
|
appid_cache.add(appid)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user