trizen / pipe-viewer

A lightweight YouTube client for Linux, without requiring an API key.
Artistic License 2.0
395 stars 19 forks source link

[Question] What do the current_instance.json and instances.json files located in $HOME/.config/pipe-viewer mean? #150

Closed ghost closed 1 year ago

ghost commented 1 year ago

After upgrading pipe-viewer to 0.4.4 I have noticed the existence of these files (which never happened with 0.4.3). What exactly do they do? 4

trizen commented 1 year ago

The above applies only when the "api_host" config-option is set to "auto". To use a specific invidious instance, change the value of " api_host" to something like api_host => "invidious.snopyta.org",.

The invidious instances are used as a fallback method when our code fails (or when prefer_invidious is set to 1). They are also used by default for retrieving YouTube comments and for retrieving videos from a specific category.

I hope this answers your question. Additionally, feel free to take a look at the source-code as well, in order to see what really happens under the hood.

ghost commented 1 year ago

Thank you for your explanation. Sure! I will take a look at the code; I just didn't know exactly what its function was. Don't worry, it's solved. Thanks again.