Page 87 of 94
Re: Using Original Sharp Remote for Kodi, reuse the same but
Posted: Fri Oct 21, 2016 8:31 am
by jonib
jang430 wrote:The problem is, I wanted to use the D-pad of the remote to control directions, up, down, left, right in Kodi. At the same time, I want to use the same D-pad to jump forward on the scene, while in fullscreen video, or backward.
Read the first post in this
thread, ask again if you need more (in this thread if Kodi/XBMC related).
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Oct 23, 2016 6:58 am
by jang430
I believe "t" triggers subtitle search window, which is what I exactly what I want. But at the same time someone's watching kodi and doing these commands, I am also playing, surfing, or doing other stuff on the same pc's main monitor. Will the key press of "t" affect the main focus of the pc?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Sun Oct 23, 2016 10:15 pm
by egbaud
Kodi Janitor doesn't work with Krypton yet, and the author said he's not sure when he'll be able to fix it. Here's a python script that replaces (some of) the functionality of Kodi Janitor.
You'll have to replace the string values for MediaDrive, MediDir and WatchedDir at the beginning of the script with the appropriate values for your installation. This script will only work when both the media and the watched folders are on the same local drive. It will handle smb: references to files as long as those references resolve to the same local drive as the watched folder.
One other important note: it depends on the Kodi Watchdog addon to update the Kodi library after the files are moved, so install and enable that in Kodi if you want the library updated automatically.
I have it set up to run after XBMC2.Player.OnStop.episode and XBMC2.VideoLibrary.OnUpdate.episode events. You may want to do the same.
Don't use this script if you don't understand what it's doing.
If you're a better Python programmer than I am (not hard), I'm sure this script could use lots of improvement. Have at it!
Code: Select all
import socket
import os
import glob
import sys
import time
MediaDrive = "D"
MediaDir = "\MEDIA"
WatchedDir = "\WATCHED"
WatchedPath = MediaDrive + ":" + MediaDir + WatchedDir
time.sleep(1)
Episodes = eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.GetEpisodes', u'{ "filter": {"field": "playcount", "operator": "greaterthan", "value": "0"}}', False)
epcount = Episodes['limits']['total']
if epcount == 0:
print "No watched episodes"
sys.exit()
print "Moving " +str(epcount) + " Episodes to " + WatchedPath
watched = Episodes['episodes']
for dict in watched:
epId = dict['episodeid']
Episode = eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.GetEpisodeDetails', u"["+str(epId)+",['file']]", False)
path = Episode['episodedetails']['file']
unc, rest = os.path.splitunc(path)
unc = unc.upper
path = path.upper().replace("SMB://" + socket.gethostname().upper() + "/" + MediaDrive, MediaDrive + ":")
wildpath = os.path.splitext(path)[0] + ".*"
files = glob.glob(wildpath)
for src in files:
print src
dst = WatchedPath + "\\" + os.path.basename(src)
if os.path.isfile(dst):
print "Replacing existing watched file ", dst
os.remove(dst)
time.sleep(1)
os.rename(src, dst)
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 5:06 am
by jang430
Hi All,
I am using this plugin. And I see actions, with default keys already inside.
My question is, since I'm using my Sharp remote for this, is it better to to leave those default keys inside? And add the keys that show up when I press my Sharp?
Any new instructions to so ActviateWindow of Subtitle?
Regards
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 10:52 pm
by jonib
jang430 wrote:I believe "t" triggers subtitle search window, which is what I exactly what I want.
"XBMC2\Actions\Fullscreen video\ShowSubtitle" seems to be what the "t" key triggers.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 10:59 pm
by jonib
jang430 wrote:I am using this plugin. And I see actions, with default keys already inside.
What default keys? There should be no default keys for any XBMC2 action.
In a macro all you should need is a event from your remote and the action you want to use, anything else is up to you. And any actions you don't use you can delete as you can always add them back if you need then again.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 11:07 pm
by jang430
jonib wrote:jang430 wrote:I believe "t" triggers subtitle search window, which is what I exactly what I want.
"XBMC2\Actions\Fullscreen video\ShowSubtitle" seems to be what the "t" key triggers.
jonib
Hi Jon is, yes, T only triggers show subtitle. Any way we can activateWindow for subtitle search?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 11:11 pm
by jang430
jonib wrote:jang430 wrote:I am using this plugin. And I see actions, with default keys already inside.
What default keys? There should be no default keys for any XBMC2 action.
In a macro all you should need is a event from your remote and the action you want to use, anything else is up to you. And any actions you don't use you can delete as you can always add them back if you need then again.
jonib
With a newly added XBMC2 plugin, I noticed some commands seem to have 'keypresses' predefined. I don't know what those stand for? Is it for use with standard Microsoft remotes? So I am wondering if I won't be using Microsoft remotes, do I take them out for quicker response when I am gonna use event generated by my Sharp remote?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 11:24 pm
by jonib
jang430 wrote:Any way we can activateWindow for subtitle search?
A search on this thread gives
this.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Mon Oct 24, 2016 11:29 pm
by jonib
jang430 wrote:I noticed some commands seem to have 'keypresses' predefined.
Could you post a screenshot or maybe your config file? As I don't know anyway they could have any defaults unless you use a ready made config from somewhere.
jonib
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Tue Oct 25, 2016 12:06 am
by jang430
Jonib, will do that once I get chance tonight. Thanks
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Oct 26, 2016 12:40 pm
by jang430
Hi Jonib,
In my Buttons/ Remote/ Left, It already has MceRemote.Unknown.15D55155D55550 & MceRemote.Unknown.15D55555D55550.
Are this default buttons from Microsoft remote?
Does it help to remove them if I'm to use a different remote?
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Wed Oct 26, 2016 1:28 pm
by jang430
jonib wrote:This is how I do it:
JSON-RPC action: GUI.GetProperties with parameter:
Then a Python script action:
Code: Select all
if eg.result["fullscreen"] == True:
eg.result = True
else:
eg.result = False
Then a Jump action to another macro based on the result.
I can elaborate if this is not enough.
jonib
Hello Jonib,
I see under your Experimental, there is JSONRPC, with action XBMC2: JSONRPC under it. Is this where you do the above? Can you elaborate further how to do this?
I am still after the activatewindow for subtitle thing with a single press.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Nov 11, 2016 2:33 pm
by bernd
Hello,
Just a short question, is it possible with this plugin to capture the selected main menu points in kodi? I have a background led light and want to change the color for ervery menu point. Thank you in advance.
Re: Support for XBMC2 plugin (formerly XBMCRepeat)
Posted: Fri Nov 11, 2016 4:21 pm
by jonib
bernd wrote:Just a short question,
The best kind.
is it possible with this plugin to capture the selected main menu points in kodi?
I'm not sure what you mean with "main menu points", If you mean the selected menu text?
The plugin supports using
JSON-RPC and using the
XBMC.GetInfoLabels method with parameter
ListItem.Title.
When you clarify what you mean exactly I can check if it can be done, and can give you an example.
jonib