Surepeppe_sr wrote:i would like to have a command to clean library from remote i found in the List of built-in functions this command: CleanLibrary(database). is there a way to set a command in the xbmc2 list to do this.
Hope this helps.
jonib
Surepeppe_sr wrote:i would like to have a command to clean library from remote i found in the List of built-in functions this command: CleanLibrary(database). is there a way to set a command in the xbmc2 list to do this.
Any ETA on the next test version? I will finally have some time to test next week. My Vera is running well so I'm anxious to get them integrated...jonib wrote:Jupp, I'll add it in the next test version, I just don't want to make too many special cases based on the events, as I want my plugin to work with any events that XBMC supports. That said I still want the events to be as easy/usable as possible in EventGhost, it's just not straightforward always.Livin wrote:in order to trigger home automation events, including the type is essential.Sorry haven't seen any events like that. But I have only tested with the current release of XBMC, so there might be more events in the development version as there seems to be lot of changes in the JSON-RPC code.Also, will XBMC send notifications based on what Home menu item is chosen (TV Shows, Movies, Music, Photos, etc)?
Edit: Looks like XBMC 12.0 alpha don't either.
jonib
I'll see if I can finish it up this weekend.Livin wrote:Any ETA on the next test version?
Code: Select all
XBMC.Player.OnPlay.episode {u'item': {u'id': 15182}, u'player': {u'playerid': 1, u'speed': 1}}
XBMC.Player.OnStop.episode {u'item': {u'id': 15182}}
XBMC.VideoLibrary.OnUpdate.episode {u'item': {u'id': 15182}}
XBMC.Player.OnPlay.movie {u'title': u'Diablo 3, Max Payne 3, and more! This Week on Rev3Games', u'player': {u'playerid': 1, u'speed': 1}}
XBMC.Player.OnPause.movie {u'title': u'Diablo 3, Max Payne 3, and more! This Week on Rev3Games', u'player': {u'playerid': 1, u'speed': 0}}
XBMC.Player.OnStop.movie {u'title': u'Diablo 3, Max Payne 3, and more! This Week on Rev3Games'}
XBMC.Player.OnPlay.movie {u'title': u'', u'player': {u'playerid': 1, u'speed': 1}}
XBMC.Player.OnSpeedChanged.movie {u'title': u'', u'player': {u'playerid': 1, u'speed': 2}}
XBMC.Player.OnSpeedChanged.movie {u'title': u'', u'player': {u'playerid': 1, u'speed': 1}}
XBMC.Player.OnStop.movie {u'title': u''}20:06:54 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 54239)
20:06:54 EVENT: XBMC2.Broadcast.OnPlayBackStarted
20:06:54 EVENT: Task.Deactivated.EventGhost
20:06:54 EVENT: Task.Activated.XBMC
20:06:54 MACRO: Enable (automatic)
20:06:54 ACTION: Enable: WMC Start Functions
20:06:54 ACTION: Enable exclusive: XBMC controls
20:06:54 ACTION: Trigger event "video.settings.xbmc"
20:06:54 EVENT: Main.video.settings.xbmc
20:06:55 Raw event: '<b>MediaChanged:<li>MovieTitle:Dirty Rotten Scoundrels;192.168.2.11;1</b>' ('192.168.2.11', 54239)
20:06:55 EVENT: XBMC2.Broadcast.MediaChanged.MovieTitle u"Dirty Rotten Scoundrels"
20:08:12 EVENT: Task.Deactivated.XBMC
20:08:12 MACRO: Disable (automatic)
20:08:12 ACTION: Enable: XBMC Start Functions
20:08:12 ACTION: Disable: XBMC controls
20:08:12 EVENT: Task.Activated.Desktop
20:08:32 EVENT: Task.Deactivated.Desktop
20:08:32 EVENT: Task.Activated.EventGhost
20:09:36 EVENT: System.Idle
20:10:38 EVENT: System.UnIdle
20:10:40 EVENT: Task.Deactivated.EventGhost
20:10:40 EVENT: Task.Activated.Desktop
20:10:49 EVENT: Task.Deactivated.Desktop
20:10:49 EVENT: Task.Activated.EventGhost
20:10:54 MACRO: XBMC - close
20:10:54 ACTION: XBMC2: Quit
20:10:54 ACTION: Find Window: XBMC.exe
20:10:54 ACTION: Kill XBMC process
20:10:54 EVENT: Task.Created.cmd
20:10:54 EVENT: Task.NewWindow.cmd
20:10:54 EVENT: Task.Deactivated.EventGhost
20:10:54 EVENT: Task.Activated.cmd
20:10:54 EVENT: Task.ClosedWindow.XBMC
20:10:54 MACRO: Disable (automatic)
20:10:54 ACTION: Enable: XBMC Start Functions
20:10:54 ACTION: Disable: XBMC controls
20:10:54 EVENT: Task.Destroyed.XBMC
20:10:54 MACRO: Disable (automatic)
20:10:54 ACTION: Enable: XBMC Start Functions
20:10:54 ACTION: Disable: XBMC controls
20:10:54 EVENT: Task.Deactivated.cmd
20:10:54 EVENT: Task.ClosedWindow.cmd
20:10:54 EVENT: Task.Destroyed.cmd
20:10:55 EVENT: Task.Activated.EventGhost
20:10:58 EVENT: Task.Created.XBMC
20:10:58 EVENT: Task.NewWindow.XBMC
20:10:58 EVENT: Task.Deactivated.EventGhost
20:10:58 EVENT: Task.Activated.XBMC
20:10:58 MACRO: Enable (automatic)
20:10:58 ACTION: Enable: WMC Start Functions
20:10:58 ACTION: Enable exclusive: XBMC controls
20:10:58 ACTION: Trigger event "video.settings.xbmc"
20:10:58 EVENT: Main.video.settings.xbmc
20:11:03 Raw event: '<b>StartUp;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:11:03 EVENT: XBMC2.Broadcast.StartUp
20:11:18 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:11:18 EVENT: XBMC2.Broadcast.OnPlayBackStarted
20:11:18 Raw event: '<b>MediaChanged:<li>MovieTitle:A Bronx Tale;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:11:18 EVENT: XBMC2.Broadcast.MediaChanged.MovieTitle u"A Bronx Tale"
20:11:37 Raw event: '<b>OnAction:13;192.168.2.11;2</b>' ('192.168.2.11', 56165)
20:11:37 Raw event: '<b>OnPlayBackStopped;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:11:37 EVENT: XBMC2.Broadcast.OnAction.ACTION_STOP
20:11:37 EVENT: XBMC2.Broadcast.OnPlayBackStopped
20:11:59 EVENT: System.Idle
20:12:05 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:12:05 EVENT: XBMC2.Broadcast.OnPlayBackStarted
20:12:06 EVENT: OnkyoSerial.ListeningModes.Surround51ch
20:12:13 Raw event: '<b>OnAction:13;192.168.2.11;2</b>' ('192.168.2.11', 56165)
20:12:13 Raw event: '<b>OnPlayBackStopped;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:12:13 EVENT: XBMC2.Broadcast.OnAction.ACTION_STOP
20:12:13 EVENT: XBMC2.Broadcast.OnPlayBackStopped
20:12:55 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:12:55 EVENT: XBMC2.Broadcast.OnPlayBackStarted
20:12:55 Raw event: '<b>MediaChanged:<li>MovieTitle:Puerto Rico;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:12:55 EVENT: XBMC2.Broadcast.MediaChanged.MovieTitle u"Puerto Rico"
20:12:55 EVENT: OnkyoSerial.ListeningModes.PLIIMusic
20:13:02 Raw event: '<b>OnAction:13;192.168.2.11;2</b>' ('192.168.2.11', 56165)
20:13:02 Raw event: '<b>OnPlayBackStopped;192.168.2.11;1</b>' ('192.168.2.11', 56165)
20:13:02 EVENT: XBMC2.Broadcast.OnAction.ACTION_STOP
20:13:02 EVENT: XBMC2.Broadcast.OnPlayBackStopped
You only seem to get broadcast events and not JSON-RPC events, did you activate them with the JSONRPCEventsConnect action?Livin wrote:Let me know what you think?
Code: Select all
2012-05-20 10:29:37 ACTION: Enable: XBMC Start Functions
2012-05-20 10:29:37 ACTION: Disable: XBMC controls
2012-05-20 10:29:37 EVENT: Task.Activated.EventGhost
2012-05-20 10:30:45 EVENT: Task.Deactivated.EventGhost
2012-05-20 10:30:45 EVENT: Task.Activated.XBMC
2012-05-20 10:30:45 MACRO: Enable (automatic)
2012-05-20 10:30:45 ACTION: Enable: WMC Start Functions
2012-05-20 10:30:45 ACTION: Enable exclusive: XBMC controls
2012-05-20 10:30:45 ACTION: Trigger event "video.settings.xbmc"
2012-05-20 10:30:45 MACRO: XBCM - enable JSON
2012-05-20 10:30:45 ACTION: XBMC2: JSONRPCEventsConnect
2012-05-20 10:30:45 Already connecting.
2012-05-20 10:30:45 EVENT: Main.video.settings.xbmc
2012-05-20 10:31:36 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 64575)
2012-05-20 10:31:37 EVENT: XBMC2.Broadcast.OnPlayBackStarted
2012-05-20 10:31:37 Raw event: {u'params': {u'data': {u'item': {u'type': u'movie'}, u'title': u'', u'player': {u'playerid': 1, u'speed': 1}}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'Player.OnPlay'}
2012-05-20 10:31:37 EVENT: XBMC2.Player.OnPlay.movie {u'title': u'', u'player': {u'playerid': 1, u'speed': 1}}
2012-05-20 10:32:02 Raw event: {u'params': {u'data': {u'item': {u'type': u'movie'}, u'title': u''}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'Player.OnStop'}
2012-05-20 10:32:02 EVENT: XBMC2.Player.OnStop.movie {u'title': u''}
2012-05-20 10:32:02 Raw event: '<b>OnAction:13;192.168.2.11;2</b>' ('192.168.2.11', 64575)
2012-05-20 10:32:03 Raw event: '<b>OnPlayBackStopped;192.168.2.11;1</b>' ('192.168.2.11', 64575)
2012-05-20 10:32:03 EVENT: XBMC2.Broadcast.OnAction.ACTION_STOP
2012-05-20 10:32:03 EVENT: XBMC2.Broadcast.OnPlayBackStopped
2012-05-20 10:32:59 EVENT: System.Idle
2012-05-20 10:33:21 Raw event: {u'params': {u'data': {u'item': {u'type': u'episode', u'id': 1}, u'player': {u'playerid': 1, u'speed': 1}}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'Player.OnPlay'}
2012-05-20 10:33:21 EVENT: XBMC2.Player.OnPlay.episode {u'item': {u'id': 1}, u'player': {u'playerid': 1, u'speed': 1}}
2012-05-20 10:33:21 Raw event: '<b>OnPlayBackStarted;192.168.2.11;1</b>' ('192.168.2.11', 64575)
2012-05-20 10:33:21 EVENT: XBMC2.Broadcast.OnPlayBackStarted
2012-05-20 10:33:21 Raw event: '<b>MediaChanged:<li>MovieTitle:Texas;192.168.2.11;1</b>' ('192.168.2.11', 64575)
2012-05-20 10:33:21 EVENT: XBMC2.Broadcast.MediaChanged.MovieTitle u"Texas"
2012-05-20 10:33:22 EVENT: OnkyoSerial.ListeningModes.PLIIMusic
2012-05-20 10:33:39 EVENT: System.UnIdle
2012-05-20 10:33:42 Raw event: {u'params': {u'data': {u'item': {u'type': u'episode', u'id': 1}}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'Player.OnStop'}
2012-05-20 10:33:42 EVENT: XBMC2.Player.OnStop.episode {u'item': {u'id': 1}}
2012-05-20 10:33:43 Raw event: '<b>OnAction:13;192.168.2.11;2</b>' ('192.168.2.11', 64575)
2012-05-20 10:33:43 Raw event: '<b>OnPlayBackStopped;192.168.2.11;1</b>' ('192.168.2.11', 64575)
2012-05-20 10:33:43 EVENT: XBMC2.Broadcast.OnAction.ACTION_STOP
2012-05-20 10:33:43 EVENT: XBMC2.Broadcast.OnPlayBackStopped
2012-05-20 10:33:43 Raw event: {u'params': {u'data': {u'item': {u'type': u'episode', u'id': 1}}, u'sender': u'xbmc'}, u'jsonrpc': u'2.0', u'method': u'VideoLibrary.OnUpdate'}
2012-05-20 10:That is/was a bug in XBMC see my ticket, it should be fixed in today's nightly build of XBMC.blaher wrote:The same for TV episodes, it says XBMC2.Player.OnStop, instead of XBMC2.Player.OnStop.episode if it's not a manual stop.
EVENT: XBMC2.Player.OnPlay.movie {u'title': u'', u'player': {u'playerid': 1, u'speed': 1}}
EVENT: XBMC2.Player.OnSeek.movie {u'title': u'', u'player': {u'playerid': 1, u'seekoffset': {u'hours': 0, u'seconds': 30, u'minutes': 0, u'milliseconds': 0}, u'speed': 1, u'time': {u'hours': 0, u'seconds': 32, u'minutes': 13, u'milliseconds': 967}}}
Haven't had a chance to look at this, probably a simple fix.Livin wrote:So it seems that only after a restart of my PC would the Broadcast events stopped logging - Not worried but just something to note.
Unfortunately any normal file not in the library or from a plugin has very limited info in the events. here's a response I got when asked about it in the XBMC forum.Also, can you look at what happens when you play a video from a file share - one that is not scanned into your library?
... and my reply -- http://forum.xbmc.org/showthread.php?ti ... pid1108361jonib wrote:Unfortunately any normal file not in the library or from a plugin has very limited info in the events. here's a response I got when asked about it in the XBMC forum.
Is this the problem you had even after you activated the JSON-RPC events?Livin wrote:but does show the Episode name properly. It wold be nice if it logged the Show Name & Episode Title
I was not able to reproduce this, if you can reproduce the problem I'll look into it.So it seems that only after a restart of my PC would the Broadcast events stopped logging - Not worried but just something to note.
Examples pleasejonib wrote:Is this the problem you had even after you activated the JSON-RPC events?Livin wrote:but does show the Episode name properly. It wold be nice if it logged the Show Name & Episode Title
If so you can use the Experimental\JSONRPC\VideoLibrary.GetEpisodeDetails and Experimental\JSONRPC\VideoLibrary.GetTVShowDetails actions.
I can give you example commands if you need.
I was not able to reproduce this, if you can reproduce the problem I'll look into it.[/quote]jonib wrote:So it seems that only after a restart of my PC would the Broadcast events stopped logging - Not worried but just something to note.
I don't have much time right now so hope these work, if you need I'll post other examples tomorrow.Livin wrote:Examples please
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1568">
<Macro Name="XBMC2 #: JSONRPC: get showname and episodename" Expanded="True">
<Event Name="XBMC2.Player.OnPlay.episode" />
<Action>
XBMC2.JSONRPC(u'VideoLibrary.GetEpisodeDetails', u"[{{eg.event.payload['item']['id']}},['tvshowid']]", True)
</Action>
<Action>
XBMC2.JSONRPC(u'VideoLibrary.GetTVShowDetails', u"[{{eg.result['episodedetails']['tvshowid']}}]", True)
</Action>
<Action>
EventGhost.ShowOSD(u"{eg.result['tvshowdetails']['label']}", u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 1, 3.0, False)
</Action>
</Macro>
</EventGhost>Code: Select all
Episode = eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.GetEpisodeDetails', u"["+str(eg.event.payload['item']['id'])+",['tvshowid']]", False)
print 'Episode:',Episode['episodedetails']['label']
Show = eg.plugins.XBMC2.JSONRPC(u'VideoLibrary.GetTVShowDetails', u"["+str(Episode['episodedetails']['tvshowid'])+"]", False)
print 'Show:',Show['tvshowdetails']['label']
eg.result = Show['tvshowdetails']['label']+': '+Episode['episodedetails']['label']