~hristoast/mousikofidi

b14742f0f5f15304f9e8f6571247d04ca94d1566 — Hristos N. Triantafillou 1 year, 2 days ago e2fcd8e
Don't shadow the function name
1 files changed, 2 insertions(+), 2 deletions(-)

M mousikofidi/mousikofidi.py
M mousikofidi/mousikofidi.py => mousikofidi/mousikofidi.py +2 -2
@@ 956,10 956,10 @@ def is_video_file(file_path: str) -> bool:
    return os.path.isfile(file_path) and has_extension(file_path, VIDEO_FILE_EXTENSIONS)


def is_valid_path(request_context: dict, path: str) -> bool:
def is_valid_path(req_ctx: dict, path: str) -> bool:
    _path = path.strip("/").rstrip("/")
    abs_path = os.path.abspath(os.path.sep + _path)
    for d in request_context["music_dirs"]:
    for d in req_ctx["music_dirs"]:
        full_path = d["full_path"]
        if abs_path.startswith(full_path):
            return True