ThioJoe / Auto-Synced-Translated-Dubs

Automatically translates the text of a video based on a subtitle file, and also uses AI voice to dub the video, and synced using the subtitle's timings
GNU General Public License v3.0
1.55k stars 152 forks source link

Does not work on machines without a web browser #4

Closed VikingKing closed 1 year ago

VikingKing commented 1 year ago

Since I am running this in a vm without a gui, it can't start a browser. The program should show a URL that can be pasted in a browser on the laptop.

--- dialog looks like this --

/opt/git/Auto-Synced-Translated-Dubs.local# python3 ./main.py

Please login using the browser window that opened just now. Waiting for authorization. See message above.

ThioJoe commented 1 year ago

You could try logging in on another computer and copying the token over

VikingKing commented 1 year ago

This page https://developers.google.com/identity/gsi/web/guides/devices" seems to indicate that it is possible by selecting "TV and Limited Input" as the type when creating the OAuth client ID. Tried that but same result. Guess it needs some additional code.

VikingKing commented 1 year ago

You could try logging in on another computer and copying the token over

I think you need to explain that to me. :)

VikingKing commented 1 year ago

I was able to modify the code to give me the URL. But then I hit this: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration "The OOB flow is being deprecated for all client types i.e. Web applications, Android, iOS, Universal Windows Platform (UWP), Chrome apps, TVs & limited-input devices, Desktop apps." So that is no longer possible.

Workaround: Installed the code on a Linux machine with a browser. Completed authentication and copied the token.pickle file back to the vm I was using.