mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
7.98k stars 643 forks source link

Issue with loading mpv config files #1266

Open Gregaras opened 5 months ago

Gregaras commented 5 months ago

Issue

Yewtube will not load mpv config files from mpv config directory.

Context

Inside mpv.py get_config_dir is called: https://github.com/mps-youtube/yewtube/blob/f62a5fd96f97806f35a015df21274e0debf0c8e3/mps_youtube/players/mpv.py#L288 https://github.com/mps-youtube/yewtube/blob/f62a5fd96f97806f35a015df21274e0debf0c8e3/mps_youtube/players/mpv.py#L321 Which, like the code itself suggests, returns the config directory path of Yewtube and not the main config directory path or the one of mpv: https://github.com/mps-youtube/yewtube/blob/f62a5fd96f97806f35a015df21274e0debf0c8e3/mps_youtube/paths.py#L56

Solution

Replacing https://github.com/mps-youtube/yewtube/blob/f62a5fd96f97806f35a015df21274e0debf0c8e3/mps_youtube/players/mpv.py#L288 with

confpath = os.path.join(os.path.split(paths.get_config_dir())[0], "mpv", "input.conf")

seems to make mpv input config loading work but I suppose there might be a better way to solve this. Didn't check the _get_conf_dir function, suppose there will be the same thing as well.

Your Environment

OS: GNU/Linux Distribution: Manjaro

iamtalhaasghar commented 1 month ago

What is the issue again?

Gregaras commented 2 weeks ago

What is the issue again?

Did a few edits on the description, thought it was self explanatory though.