sources: Add user-facing name constant
This commit is contained in:
@@ -5,7 +5,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from collections.abc import Generator, Iterable
|
from collections.abc import Generator, Iterable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Protocol
|
from typing import Final, Protocol
|
||||||
|
|
||||||
from gi.repository import GLib
|
from gi.repository import GLib
|
||||||
|
|
||||||
@@ -28,7 +28,8 @@ OPEN = (
|
|||||||
class Source(Protocol):
|
class Source(Protocol):
|
||||||
"""A source of games to import."""
|
"""A source of games to import."""
|
||||||
|
|
||||||
ID: str
|
ID: Final[str]
|
||||||
|
NAME: Final[str]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_games(*, skip_ids: Iterable[str]) -> Generator[Game]:
|
def get_games(*, skip_ids: Iterable[str]) -> Generator[Game]:
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import struct
|
|||||||
import time
|
import time
|
||||||
from collections.abc import Generator, Iterable, Sequence
|
from collections.abc import Generator, Iterable, Sequence
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
|
from gettext import gettext as _
|
||||||
from os import SEEK_CUR
|
from os import SEEK_CUR
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, BinaryIO, NamedTuple, Self, cast
|
from typing import Any, BinaryIO, NamedTuple, Self, cast
|
||||||
@@ -19,7 +20,7 @@ from cartridges.games import Game
|
|||||||
|
|
||||||
from . import APPLICATION_SUPPORT, DATA, FLATPAK, OPEN, PROGRAM_FILES_X86
|
from . import APPLICATION_SUPPORT, DATA, FLATPAK, OPEN, PROGRAM_FILES_X86
|
||||||
|
|
||||||
ID: str = "steam"
|
ID, NAME = "steam", _("Steam")
|
||||||
|
|
||||||
_DATA_PATHS = (
|
_DATA_PATHS = (
|
||||||
Path.home() / ".steam" / "steam",
|
Path.home() / ".steam" / "steam",
|
||||||
|
|||||||
Reference in New Issue
Block a user