From 85e075647438dd4c6d4ede6c3a7bf6db27bbf511 Mon Sep 17 00:00:00 2001 From: Nick Dowsett Date: Mon, 18 Nov 2024 19:46:58 +0800 Subject: [PATCH] Update default auth --- README.md | 8 +++++--- youtui/src/config.rs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 138c0850..08eddf2e 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,10 @@ This project is not supported or endorsed by Google. `cargo install youtui` ## Running youtui -The default option is to use oauth authentication. To change this to browser authentication, a `config.toml` file can be added to the local youtui config directory (e.g `~/.config/youtui/` on Linux), with the value `auth_type = "Browser"`. Please note however that config file format is currently unstable and could change in the future. +The default option is to use browser authentication, oauth authentication is likely being phased out by Google. To change this to oauth authentication, a `config.toml` file can be added to the local youtui config directory (e.g `~/.config/youtui/` on Linux), with the value `auth_type = "OAuth"`. Please note however that config file format is currently unstable and could change in the future. ### Commands 1. To run the TUI application, execute `youtui` with no arguments. 1. To use the API in command-line mode, execute `youtui --help` to see available commands. -### OAuth Setup Steps -1. Setup the oauth token in the default configuration directory by running `youtui setup-oauth` and following the instructions. ### Browser Auth Setup Steps 1. Open YouTube Music in your browser - ensure you are logged in. 1. Open web developer tools (F12). @@ -45,6 +43,10 @@ Firefox example (Right click and Copy Value): ![image](https://github.com/nick42d/youtui/assets/133559267/c7fda32c-10bc-4ebe-b18e-ee17c13f6bd0) Chrome example (Select manually and paste): ![image](https://github.com/nick42d/youtui/assets/133559267/bd2ec37b-1a78-490f-b313-694145bb4854) +### OAuth Setup Steps +1. Setup the oauth token in the default configuration directory by running `youtui setup-oauth` and following the instructions. +### Other Setup +1. If music downloads always return an error, you are able to supply a PO Token by saving it to the file `po_token.txt` into your local youtui config directory. For more information on PO Tokens and how to obtain them, see [here](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#po-token-guide). ## Dependencies note ### General diff --git a/youtui/src/config.rs b/youtui/src/config.rs index 507d2469..28bc0044 100644 --- a/youtui/src/config.rs +++ b/youtui/src/config.rs @@ -31,8 +31,8 @@ pub struct Config { #[derive(ValueEnum, Copy, Clone, Default, Debug, Serialize, Deserialize)] pub enum AuthType { #[value(name = "oauth")] - #[default] OAuth, + #[default] Browser, }