DumbKeyboard+DumbPrefs: my workaround for clients lacking InputDirectoryObjects and PrefsObjects

Plex seems to not like implementing the InputDirectoryObject/PrefsObject on newer clients.

I’ve made a thing called DumbKeyboard, which uses a series of DirectoryObjects to build a string. This is tedious and stupid, but its better than having 0 ways to input to the channel. Any query that is submitted will be saved to a ‘Search History’ menu, so it can be searched again without re-entering the string.

DumbKeyboard

iOS:


Plex Media Player:

it should be pretty simple to add this to any channel. see the readme on github.

example: YouTubeTV’s main menu search option looks like:

    oc.add(InputDirectoryObject(
        key=Callback(
            Search,
            s_type='video',
            title=u'%s' % L('Search Video')
        ),
        title=u'%s' % L('Search'), prompt=u'%s' % L('Search Video'),
        thumb=ICONS['search']
    ))

this can be replicated with:

from DumbKeyboard import DumbKeyboard

...

    DumbKeyboard(PREFIX, oc, Search,
        dktitle=u'%s' % L('Search'),
        dkthumb=ICONS['search'],
        s_type='video', title=u'%s' % L('Search Video'))

I’ve also added it to my Twitch.tv channel TwitchMod dev branch

DumbPrefs

Not implementing InputDirectoryObject can be debated, not implementing preferences as well means the logic is that preferences should be set via plex/web once and for all, like logging in. Then the clients can use the Channel without having to log in.

A statement on an official cpacity would be nice though than to make devs like us redo stuff to maybe only find out they may add something back again in the future.

The plex official plugin devs seem to be left out as well (clueless).

Just checked out your channel, very, very neat! I would call it a smart keyboard for dumb clients :wink:
Thanks.

I added a replacement for the PrefsObject. It uses DumbKeyboard/InputDirectoryObjects for text prefs, bools can be toggled, and enums let you pick a value.

So far only tested on iOS, PMP, and OpenPHT (pht wants the channel to have elevated PlexPluginCodePolicy)

@coryo123 said:
I added a replacement for the PrefsObject. It uses DumbKeyboard/InputDirectoryObjects for text prefs, bools can be toggled, and enums let you pick a value.

So far only tested on iOS, PMP, and OpenPHT (pht wants the channel to have elevated PlexPluginCodePolicy)

You Sir are a true champion of the masses :smiley:

Any chance getting this to work on the new roku client ?
They added some sort of search finally but it doesn’t work on the channel level.

@eetjtl Just add the Roku Client.Product to the DumbKeyboard.clients list for your channel. Client.Product list can be found here, it’s not a complete list but does included Roku.

Cool.
Then can you add it to your channels that you just updated ?
I just tested it on your “kiss network” it does add the search on the new roku client. So I can move to the supported roku client and move away from the classic client. Search was the only thing holding me back.

This is a great work around by the way and I do appreciate all your work.

ahh wait their is no distinction between roku clients. Might want to hold off making it official.

Family just complained that the New version of Kiss search sucks :slight_smile: she is still using the roku classic client and it switched to using the “dumb keyboard” version of search.
Will have to slowly get them ready for supported roku client.

This is really good work. Does it work in iOS? I tried implementing the keyboard and it works fine in Plex Media Player, but my users report that it doesn’t work in iOS.

My code looks like this:

DUMB_KEYBOARD_CLIENTS = ['Plex for iOS', 'Plex Media Player', 'Plex Home Theater', 'OpenPHT', 'Plex for Roku', 'iOS', 'Roku', 'tvOS' 'Konvergo']

if Client.Product in DUMB_KEYBOARD_CLIENTS or Client.Platform in DUMB_KEYBOARD_CLIENTS: Log.Debug("Client does not support Input. Using DumbKeyboard") DumbKeyboard(prefix=PREFIX, oc=oc, callback=SearchMovie, dktitle=title, dkthumb=R('search.png'), locked=locked) else: oc.add( InputDirectoryObject(key=Callback(SearchMovie, locked=locked), title=title, prompt="Enter the name of the movie:", thumb=R('search.png')))

You can find my whole repo here:

Any help implementing it would great! Thanks.

I think the way you are using ObjectContainers is causing problems.

creating an ObjectContainer with header and message set should be used for sending a message to the client and not for a list of Directories. This is how iOS seems to behave at least. For example if you catch an error you can return ObjectContainer(header='error', message='something happened...') to notify the client.

On your /addtvshow route I changed the oc to just have a title2 property, and iOS then presents the DumbKeyboard directory object.

Anyone got this to work on Tivo client?

@coryo123 Thanks, that was the problem. I like posting messages for feedback without interrupting the workflow but that doesn’t seem to be how Plex developers have in mind.

Thanks for making this tool. It works really well…

Thank you for all the hard work @coryo123! Question: Has anyone had success adding the code for this to BitTorrent? I tried doing so myself, but was unsuccessful =. This would be great to have so that I don’t have to go back/forth between plex classic to search/add to favorites. If anyone could provide some guidance i’d be eternally grateful…thank you!

@Strychnidin
try this. https://github.com/coryo/BitTorrent.bundle
I tested on Plex Media Player. You may have to add to DumbKeyboard.clients for whatever client you may be using. the Bittorrent channel logs the Client.Product string in com.plexapp.plugins.bittorrent.log.

@coryo123 Thanks a lot!!! I am at work now, so I’ll give it a go later tonight. I’m using a Roku 3 :slight_smile:

Thank you, @coryo123…it worked perfectly!

@coryo123 I integrated DumbKeyboard in my channel thanks to your fork!
Thanks man!

Just ran by this thread today and wanted to touch base on the status of the Roku. The recent update (4.1.0) to the Roku channel has implemented a full keyboard. It’s only available for Plex Pass users for now, and will release it official when it’s ready.

@coryo123 Thanks for this wonderful tool and the simple implementation. I see you have Plex Web among the clients as well. Is that intended since there is a search field in my browser (Chrome) already ?