lekma / plugin.video.invidious

Invidious Addon for Kodi
GNU General Public License v3.0
50 stars 7 forks source link

feature request: log in #41

Open salfter opened 3 years ago

salfter commented 3 years ago

I don't see an option anywhere to log in. I've exported my YouTube subscriptions and imported them into an Invidious instance, and /api/v1/auth/feed on that instance returns the newest videos. I could add subscriptions manually to the plugin's feed list,or convert with something like this and dump the file into the plugin's data directory:

from xml.etree import ElementTree
from pprint import pprint
from collections import OrderedDict
import pickle

def extract_rss_urls_from_opml(filename):
    urls = OrderedDict()
    with open(filename, 'rt') as f:
        tree = ElementTree.parse(f)
    for node in tree.findall('.//outline'):
        url = node.attrib.get('xmlUrl')
        name=node.attrib.get("title")
        id=str(url)[52:]
        if (id!=""):
            urls[str(url)[52:]]=name
    return urls

channels = extract_rss_urls_from_opml("youtube.opml")
f=open("feed.pickle","wb")
pickle.dump(channels,f,protocol=2)
f.close()

but it takes several minutes to load the 70+ subscriptions I have that way, and I suspect it'd take several minutes every time. It also has to be repeated across every Kodi installation I have. Since Invidious supports logins and subscriptions, it seems it'd be better if this plugin supported them, as assembling the feed list on the Invidious server is likely going to be faster.

trymeouteh commented 3 years ago

I would like to see a way to login to multiple accounts on any instance and be able to get thr subscription feed, history, and subscription list, playlists