コード例 #1
0
ファイル: player.py プロジェクト: azarmadr/quodlibet
def init(librarian):
    """May raise PlayerError"""

    try:
        driver = config.getbytes("settings", "xine_driver")
    except:
        driver = None
    return XinePlaylistPlayer(driver, librarian)
コード例 #2
0
ファイル: player.py プロジェクト: zsau/quodlibet
def init(librarian):
    """May raise PlayerError"""

    try:
        driver = config.getbytes("settings", "xine_driver")
    except:
        driver = None
    return XinePlaylistPlayer(driver, librarian)
コード例 #3
0
def get_scan_dirs():
    """Returns a list of paths which should be scanned

    Returns:
        list
    """

    joined_paths = bytes2fsn(config.getbytes("settings", "scan"), "utf-8")
    return [expanduser(p) for p in split_scan_dirs(joined_paths)]
コード例 #4
0
ファイル: filesystem.py プロジェクト: Mellthas/quodlibet
 def restore(self):
     data = config.getbytes("browsers", "filesystem", b"")
     try:
         paths = bytes2fsn(data, "utf-8")
     except ValueError:
         return
     if not paths:
         return
     self.__select_paths(paths.split("\n"))
コード例 #5
0
ファイル: library.py プロジェクト: piotrdrag/quodlibet
def get_exclude_dirs():
    """Returns a list of paths which should be ignored during scanning

    Returns:
        list
    """

    paths = split_scan_dirs(bytes2fsn(config.getbytes("library", "exclude"), "utf-8"))
    return [expanduser(p) for p in paths]
コード例 #6
0
ファイル: library.py プロジェクト: piotrdrag/quodlibet
def get_scan_dirs():
    """Returns a list of paths which should be scanned

    Returns:
        list
    """

    joined_paths = bytes2fsn(config.getbytes("settings", "scan"), "utf-8")
    return [expanduser(p) for p in split_scan_dirs(joined_paths)]
コード例 #7
0
ファイル: filesystem.py プロジェクト: LudoBike/quodlibet
 def restore(self):
     data = config.getbytes("browsers", "filesystem", b"")
     try:
         paths = bytes2fsn(data, "utf-8")
     except ValueError:
         return
     if not paths:
         return
     self.__select_paths(paths.split("\n"))
コード例 #8
0
def get_exclude_dirs():
    """Returns a list of paths which should be ignored during scanning

    Returns:
        list
    """

    paths = split_scan_dirs(
        bytes2fsn(config.getbytes("library", "exclude"), "utf-8"))
    return [expanduser(p) for p in paths]
コード例 #9
0
def get_current_dir():
    """Returns the currently active chooser directory path.
    The path might not actually exist.

    Returns:
        fsnative
    """

    data = config.getbytes("memory", "chooser_dir", b"")
    try:
        path = bytes2fsn(data, "utf-8") or None
    except ValueError:
        path = None

    # the last user dir might not be there any more, try showing a parent
    # instead
    if path is not None:
        path = find_nearest_dir(path)

    if path is None:
        path = get_home_dir()

    return path
コード例 #10
0
def get_exclude_dirs() -> Iterable[fsnative]:
    """:return: a list of paths which should be ignored during scanning"""

    paths = split_scan_dirs(
        bytes2fsn(config.getbytes("library", "exclude"), "utf-8"))
    return [expanduser(p) for p in paths]  # type: ignore