Google Drive Access questions

Support for Android version of Total Commander

Moderators: Hacker, petermad, Stefan2, white

kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Google Drive Access questions

Post by *kinsfubar »

I just setup Total Commander to work with my Google Drive, and it's working great thanks to the excellent instructions on the Google Drive plug-in. A big thank-you to Total Commander, as this is the first android file manager I've got to work with Google Drive.

So, I have a couple of questions as I've never been able to do this until now:

1. I'm on a free 90 day evaluation of Google Cloud so I could setup the authorization for Total Commander to my Google Drive. When the evaluation ends and I don't pay to continue, will I loose access to Google Drive in Total Commander??

2. I have some links in my Google Drive to files that are in other accounts and are read-only. I can access them and play those videos without issue on my PC, but it doesn't work in Total Commander. Is there a way to play a video via a Google Drive link in Total Commander??

Thank-you!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Google Drive Access questions

Post by *ghisler(Author) »

1. I'm using the free Google Drive coming with each Google account, and it works just fine with the plugin.

2. I would need to know how to create such links to test them. Currently I'm supporting files/folders shared with the user account, in the folder "!Shared", and drives shared with the account, in the folder "!Shared Drives".
Author of Total Commander
https://www.ghisler.com
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

Okay, this is how to create a shortcut link in your Google Drive. Here's a link to a video and we will make a shortcut link in your Google Drive that points to it:
https://drive.google.com/file/d/1Rq8ZSMT67Glqhpxaz903vqTAkzJk0DfX/view

When you click on the link, you will be taken to the video. Once there, click on the organize folder and you will get the "add shortcut" pop-up. Highlight "My Drive" and click "Add". You will now have a video link on your Google Drive pointing the original video. The video is read-only and can't be downloaded.

This is the exact situation that Total Command can't navigate to play the video, but it will work fine on your PC. Total Commander sees the link, but gets an error when it tries to play the video.

Any ideas?
User avatar
beb
Power Member
Power Member
Posts: 579
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Google Drive Access questions

Post by *beb »

kinsfubar wrote: 2024-10-25, 14:45 UTC ...The video is read-only and can't be downloaded...
For your information, the video can be downloaded.
Image: https://i.imgur.com/2mnxHXL.png
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

beb wrote: 2024-10-26, 06:58 UTC
kinsfubar wrote: 2024-10-25, 14:45 UTC ...The video is read-only and can't be downloaded...
For your information, the video can be downloaded.
Image: https://i.imgur.com/2mnxHXL.png
I just checked again, and the video can't be downloaded. The detail report on the file says "Download Permission Viewers cannot download". Clicking on the link brings up video playback, and the only option is to save a shortcut to your google drive. If you try and download via the shortcut, you will get an error. How did you download this file? The size should be 12.6 MB (13,310,323 bytes).
User avatar
beb
Power Member
Power Member
Posts: 579
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Google Drive Access questions

Post by *beb »

2kinsfubar
I downloaded it with https://github.com/yt-dlp/yt-dlp
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

beb wrote: 2024-10-26, 09:04 UTC 2kinsfubar
I downloaded it with https://github.com/yt-dlp/yt-dlp
I've used yt-dlp, but I've never tried it on google drive files. You're right, it did download the file after a warning that "Only the owner and editors can download this file. If you'd like to download it, please contact the owner."

It downloaded a lower bitrate 360p version of the file (the original is 480p), but it did actually work. Interesting.

Still have the issue with playing a google drive shortcut through Total Commander though...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Google Drive Access questions

Post by *ghisler(Author) »

I don't think that I can add this - yt-dlp seems to circumvent the download block by "streaming" the video, which can result in a transcoded lower bit rate version which can't be controlled.
Author of Total Commander
https://www.ghisler.com
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

Okay, but why I can play the videos on my PC just fine through the shortcut, but it doesn't work in Total Commander??

I've further tested yt-dlp, and I've gotten full quality videos in every test but the first one. I think you're right about yt-dlp downloading via playback, because now I'm getting this error when I download via yt-dlp: "Unable to play this video at this time. The number of allowed playbacks has been exceeded. Please try again later."
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Google Drive Access questions

Post by *ghisler(Author) »

My player doesn't use streaming URLs, it uses the normal download URLs.
Author of Total Commander
https://www.ghisler.com
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

Okay, thanks. I've tried a bunch of android media players and not one works with google drive shortcuts. It's too bad that google doesn't support google drive software on their android OS.
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

Okay, here's an idea. When I edit the shortcut link with Notepad++ on Windows it contains this info:

{"":"WARNING! DO NOT EDIT THIS FILE! ANY CHANGES MADE WILL BE LOST!","doc_id":"1Rq8ZSMT67GlqXXXXXXXXXXXXXXXXXXXX","resource_key":"","email":"kinsfubar@gmail.com"}

The doc_id is the key information and can be used to create a download link. In this case, the download link will be:

https://drive.google.com/file/d/1Rq8ZSMT67GlqXXXXXXXXXXXXXXXXXXXX/view?usp=sharing

If you try and open this link instead of the shortcut, will you be able to play the file??
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Google Drive Access questions

Post by *ghisler(Author) »

First, I have edited your post so you don't post copyrighted material here.

Second, I will have to check whether I can download the link content on Android somehow, or whether the link target is reported in the directory listing.
Author of Total Commander
https://www.ghisler.com
kinsfubar
Junior Member
Junior Member
Posts: 14
Joined: 2024-10-25, 06:12 UTC

Re: Google Drive Access questions

Post by *kinsfubar »

Okay, thanks. Sorry for posting the copyrighted material.

The file link you create using the shortcut doc_id won't be downloadable if the file doesn't have download permission on Google Drive. Perhaps instead of downloading the file, the file link could be used to play the video contents without downloading?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Google Drive Access questions

Post by *ghisler(Author) »

How would I know whether the file has the download permission or not?
Author of Total Commander
https://www.ghisler.com
Post Reply