I am trying to use Plex for more than just media and I was wondering if it's possible to just make a Channel plug-in that can browse sites and download files (direct URLs) without requiring everything to be some type of media. I know how to scrape sites and get direct URLs but when I look at the documentation for Plex Channel Development everything is based around media (which makes sense obviously), but I don't even see an Item object that can have varying suboptions. For example I want the user to see something like this:
Directory1
Directory2
Directory3
Upon selecting Directory1 they will see:
Item1
Item2
Item3
Pressing C on Item1 (or whatever the button is for more options) will give a customized list of options and just selecting the Item1 with Enter will do a default action. All of the customized actions and options will perform an action in some other function.
This is awesome, thanks so much. I think this is enough for me to figure it out. Am I correct in guessing (since I haven't tried any of those channels yet) that you are using the PopupDirectoryObject to do the "Context"-type menus? What did you mean by yes and no? I guess the answer no is because it is not possible to do what I wanted which is pressing C to get more options? I'm guessing the popup is a good close second?
Yes. I use PopuDirectoryObjects rather extensively since Context-menus have been inaccessible to channels for quite a while now.
My "No" short answer bundles a few things together. As you surmised, the press "c" for context menu is not possible, but downloading content is not really supported either. That being said, just because it isn't supported doesn't mean it isn't possible. The Unsupported Appstore downloads and extracts zip files from Github for the purposes of installing other plugins. SS-Plex allows users to download media and add it to their library with the use of either curl or wget install on the system. Anytime you start messing with unsupported use cases, especially if it involves file-system access, you'll likely need to add the "elevated" code policy flag to the plugin's Info.plist as seen in the Unsupported Appstore.
Gotcha. Thanks a bunch for the info. I have used urllib.urlretrieve() in other Python scripts I have written and it works very well. I'm assuming that isn't used because it locks up the plugin? I have used wget before to download from PHP so I should be able to figure it out. I did see something about Threading in the documentation and was wondering how that works as well... specifically if it's possible to thread multiple downloads at the same time.