Release gdrive - Google Drive Video/Music Add-on
For anyone using this plugin to stream media with ddurdle's encryption, I have updated the plugin to be compatible with Kodi 19 and added new features. There's also a branch for Kodi 18.

https://github.com/JDRIVO/GDrive-for-KODI

Improvements:

1. Ability to add media flags to movies and episodes in their respective libraries
2. Resume support now functional for encrypted files
3. Watch status marking now functional featuring separate control of movie and episode watch status'

For media flags to be added the format of a STRM file must resemble the following:

python:
plugin://plugin.video.gdrive/?mode=video&encfs=True&title=Ted (2012)&video_codec=h264&video_width=1920&video_height=1040&video_duration=6282.326000&aspect_ratio=1.84615384615&audio_codec=dts&audio_channels=6&filename=5DfVdkGdGvpGdWgJm

An example of STRM builder script to achieve the above.

python:
import sys
import commands
import subprocess
import shlex
import json

videoName = sys.argv[1]
videoPath = sys.argv[2]
encryptedFilePath = sys.argv[3]
strmPath = sys.argv[4]

cmd = "ffprobe -v quiet -print_format json -show_format -show_streams"
args = shlex.split(cmd)
args.append(videoPath)
ffprobeOutput = subprocess.check_output(args).decode('utf-8')
ffprobeOutput = json.loads(ffprobeOutput)

if "codec_name" in ffprobeOutput['streams'][0]:
    videoCodec = str(ffprobeOutput['streams'][0]['codec_name'])
else:
    videoCodec = "unknown"

videoWidth = str(ffprobeOutput['streams'][0]['width'])
videoHeight = str(ffprobeOutput['streams'][0]['height'])
videoDuration = str(ffprobeOutput['format']['duration'])
aspectRatio = str(float(videoWidth) / float(videoHeight) )
audioCodec = str(ffprobeOutput['streams'][1]['codec_name'])
audioChannels = str(ffprobeOutput['streams'][1]['channels'])

fileID = commands.getstatusoutput("rclone lsf --format i '%s'" % encryptedFilePath)[1]

with open(strmPath + "/" + videoName + ".strm", "w+") as strm:
    strm.write("plugin://plugin.video.gdrive/?mode=video&encfs=True&title=%s&video_codec=%s&video_width=%s&video_height=%s&video_duration=%s&aspect_ratio=%s&audio_codec=%s&audio_channels=%s&filename=%s" % ( videoName, videoCodec, videoWidth, videoHeight, videoDuration, aspectRatio, audioCodec, audioChannels, fileID) )
Reply


Messages In This Thread
u - by Kraevin - 2015-05-13, 17:37
RE: gdrive - Google Drive Video/Music Add-on - by SEIKT - 2020-12-13, 03:00
Logout Mark Read Team Forum Stats Members Help
gdrive - Google Drive Video/Music Add-on12