VoxCommando Forum

Help and Support (Using VoxCommando) => Kodi (XBMC) Frodo / Gotham / Isengard / Jarvis => Topic started by: lja on April 05, 2015, 04:42:13 PM

Title: VC, Kodi and NextfliXBMC
Post by: lja on April 05, 2015, 04:42:13 PM
VC:2.142
Kodi 14.2 Helix
NextfliXbmc installed

Goal: To play movie from Netflix in Kodi using NextfliXBMC and voice commands

Attached is my attempt so far. Presently set to go to Favourites/Movies/Genres in Netflix. This brings up the list of Netflix Genres.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<commandGroup open="False" name="NetflixBMC" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="786" name="Show Favourites" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>{Path.VC}\payloads\NetFlixGenre.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "favourites", "parameters": [ "NetflixBMC" ]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>200</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Locating Netflix</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{ENTER}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>8000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{ENTER}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>300</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{DOWN}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>100</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{DOWN}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>100</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{DOWN}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>100</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>{ENTER}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show Favourites</phrase>
  </command>
  <command id="788" name="Pause,Stop" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>DxInput.KeyPress</cmdType>
      <params>
        <param>space</param>
        <param>pause</param>
        <param>stop</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Pause,Stop</phrase>
    <phrase>Netflix</phrase>
  </command>
</commandGroup>


Requirement: Any guidance on how to play movie from here and to close Netflix when finished. I have tried "Window.Close.chrome" which does close Netflix but re-entering Netflix without closing Kodi starts to replay the same movie again. At the list of genres, I use the command "Select" to go to a specific genre and then "select" again to play the movie.

Any improvement in my coding would also be appreciated.

Thanks.
Title: Re: VC, Kodi and NextfliXBMC
Post by: nime5ter on April 05, 2015, 04:51:34 PM
Hi lja,

Let's see if someone else who uses Kodi and has a Netflix account will be able to help. That would be best, because they will have a better sense of how the site functions and how to use the addon effectively.

If that doesn't happen, I would be willing to look into this a bit for you, but would need someone to give me access to their Netflix account so that I can test commands. If you're open to doing that, you can PM me that information.

(You may want to temporarily change your Netflix password, of course, but either way I have no intention or interest in abusing your privacy or account.)
Title: Re: VC, Kodi and NextfliXBMC
Post by: jitterjames on April 05, 2015, 04:59:44 PM
It's just a guess because I haven't used this plugin, but my experience with Kodi's content plugins is that they generally don't make themselves available to direct manipulation through the API.  Of course there can always be exceptions and this may be one of them.
Title: Re: VC, Kodi and NextfliXBMC
Post by: nime5ter on April 05, 2015, 05:11:13 PM
@jitterjames, looks like the addon developer is relying a lot on various keyboard emulations to interact with Netflix.

e.g. he suggests the following webremote mappings: http://pastebin.com/bbBMbP8G

The "close browser" mapping looks particularly awkward.  ::dis

Main thread: http://forum.kodi.tv/showthread.php?tid=178693
Title: Re: VC, Kodi and NextfliXBMC
Post by: lja on April 05, 2015, 11:08:28 PM
Thanks for the input. Could you give an example on how this could be used in a command?

"Play/Pause : ACTION_SELECT_ITEM"
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 06, 2015, 02:50:27 AM
When I use NetfliXBMC with chrome I use these commands for basic control of video playback

http://voxcommando.com/forum/index.php?topic=1802.msg17156#msg17156 (http://voxcommando.com/forum/index.php?topic=1802.msg17156#msg17156)

I also did some testing by enabling debug log in XBMC/KODI to see what kind of information NetfliXBMC was outputting,
after I enabled debug then I went to genres in NetflIXBMC, then I looked at the log file

this should take you straight to NetfliXBMC genres
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<command id="674" name="Show netflix movie genre" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>GUI.ActivateWindow</param>
      <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=listGenres&amp;thumb&amp;type=movie&amp;url=WiGenre"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Show Netflix Movie genre</phrase>
</command>


I tried to go straight to a specific genre but I didn't have any luck with that, and I need to get some sleep  ::zzz, I hope this helps
Title: Re: VC, Kodi and NextfliXBMC
Post by: Haddood on April 06, 2015, 03:01:08 AM
in a perfect world ... Kodi will launch Netflix in RoboB ... then we'll have all the control that we can think of ...
Title: Re: VC, Kodi and NextfliXBMC
Post by: lja on April 06, 2015, 11:20:23 AM
Quote from: PegLegTV on April 06, 2015, 02:50:27 AM
When I use NetfliXBMC with chrome I use these commands for basic control of video playback

http://voxcommando.com/forum/index.php?topic=1802.msg17156#msg17156 (http://voxcommando.com/forum/index.php?topic=1802.msg17156#msg17156)

I also did some testing by enabling debug log in XBMC/KODI to see what kind of information NetfliXBMC was outputting,
after I enabled debug then I went to genres in NetflIXBMC, then I looked at the log file

this should take you straight to NetfliXBMC genres
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="NETFLIXBMC GENRE" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="612" name="show Genres" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=listGenres&amp;thumb&amp;type=movie&amp;url=WiGenre"]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>show Genres</phrase>
  </command>
</commandGroup>


I tried to go straight to a specific genre but I didn't have any luck with that, and I need to get some sleep  ::zzz, I hope this helps

@PegLegTV

Thanks for the above, it does help . While it achieves the same as my post, I certainly think it is a shorter and better approach. I hope after your much needed sleep, you will be refreshed and full of new ideas. I will continue to see if I can develop this any further.
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 06, 2015, 11:55:35 AM
I was able to get it to go straight to a specific movie genre, when I get done with work I'll work on a command to navigate netflix in XBMC/KODI  ;D
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 06, 2015, 10:38:02 PM
 ::banana UPDATE: This group of commands now contains the video playback commands for NetfliXBMC (for chrome browser)  ::banana

this group of commands and payload.xmls (attached Below) will give you the ability to launch NetfliXBMC to any specific window in XBMC/KODI

NetfliXBMC Navigation
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="NetfliXBMC Navigation" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="652" name="Show Netflix movie genre {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=listVideos&amp;thumb&amp;type=movie&amp;url=https%3a%2f%2fwww.netflix.com%2fWiGenre%3fagid%3d{1}"]</param>
        <param>Action Adventure</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>show netflix movie genre</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcNetflixMovieGenre.xml</payloadFromXML>
  </command>
  <command id="664" name="Show Netflix TV Show Genre {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=listVideos&amp;thumb&amp;type=tv&amp;url=https%3a%2f%2fwww.netflix.com%2fWiGenre%3fagid%3d{1}"]</param>
        <param>Action Adventure</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show Netflix TV Show Genre</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcNetflixTVShowGenre.xml</payloadFromXML>
  </command>
  <command id="661" name="Show netflix {1} window" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["{1}"]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show Netflix</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\xbmcNetflixwindows.xml</payloadFromXML>
    <phrase optional="true">Window</phrase>
  </command>
  <command id="627" name="Netflix Find Netflix" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Find Netflix</phrase>
  </command>
  <command id="610" name="Netflix play/pause" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SendKeys</cmdType>
      <params>
        <param>{ENTER}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Pause Netflix, Play Netflix</phrase>
  </command>
  <command id="575" name="Netflix Stop/Close" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Window.Close</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>XBMC</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Stop Netflix, Close Netflix</phrase>
  </command>
  <command id="614" name="Netflix Step back" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>SendKeys</cmdType>
      <params>
        <param>{LEFT}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Step back, I missed that, What was that</phrase>
  </command>
  <command id="620" name="Netflix Step Forward" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>SendKeys</cmdType>
      <params>
        <param>{RIGHT}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Step Forward, Jump forward</phrase>
  </command>
  <command id="615" name="Netflix Rewind" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="True" loopDelay="200" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>vk:left</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Rewind Netflix</phrase>
  </command>
  <command id="616" name="Netflix Fast Forward" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="True" loopDelay="200" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>vk:right</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Fast Forward Netflix</phrase>
  </command>
  <command id="1004" name="Netflix Frame Selection" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="True" loopDelay="500" loopMax="0" description="">
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>Chrome</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>InputKeys.Send</cmdType>
      <params>
        <param>vk:right</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Show frame Selection, Show Frames, Hide Frame Selection, Hide Frames</phrase>
  </command>
</commandGroup>


you will need all 3 payloads that are attached for these commands to work
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 07, 2015, 12:21:06 AM
I also came across these two commands for Searching Movies or TV shows, these will only launch the search box for Netflix movies or Netflix TV Shows,

The third command is a search command that I tried to make  :bonk but the results where not consistent, I made it a payload list for testing normally a command like this would require payload dictation 

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="Netflix search windows for Movies/TV Shows" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="679" name="Search Netflix TV Shows" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=search&amp;thumb&amp;type=tv&amp;url"]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="675" name="Search Netflix Movies" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=search&amp;thumb&amp;type=movie&amp;url"]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
  <command id="681" name="Netflix Movie seach test  (Failed)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=search&amp;thumb&amp;type=movie&amp;url"]</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>5000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>(\D)</param>
        <param />
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Window.Focus</cmdType>
      <params>
        <param>xbmc</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>500</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>SendKeys</cmdType>
      <params>
        <param>{Match.{i}.1}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Input.ExecuteAction</param>
        <param>"action":"select"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Search Netflix Movies for </phrase>
    <payloadList>the smurfs two, the punisher</payloadList>
  </command>
</commandGroup>


Maybe someone else will have some better ideas on how to use these commands
Title: Re: VC, Kodi and NextfliXBMC
Post by: lja on April 07, 2015, 01:13:27 AM
@PegLegTV

Thanks for taking the time to work on this. I will try them. Actually I was also researching how to use "search".
Title: Re: VC, Kodi and NextfliXBMC
Post by: nime5ter on April 07, 2015, 12:40:50 PM
Quote from: PegLegTV on April 07, 2015, 12:21:06 AM
I also came across these two commands for Searching Movies or TV shows, these will only launch the search box for Netflix movies or Netflix TV Shows,

Is this a search box in a browser window? What I mean is, could you emulate a text entry in the search box field? Along the lines of:

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="706" name="search netflix movies for {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>GUI.ActivateWindow</param>
      <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=search&amp;thumb&amp;type=movie&amp;url"]</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.Pause</cmdType>
    <params>
      <param>1000</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.TextEntry</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>InputKeys.Send</cmdType>
    <params>
      <param>{enter}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>search for netflix movie</phrase>
  <payloadList>World War Z, Short Term 12, Mud, Star Trek Into Darkness </payloadList>
</command>


[I edited this command after the fact, so if you got the initial post by email, ignore that.]

... If you have some way of determining the URL for opening the webpage of specific movies, that would likely be nicer than having to search for a title via basic emulation.
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 07, 2015, 01:37:28 PM
It's a Pop up search box in xbmc,

the keyboard emulation works in both of our commands,
the problem that I can't get around is that if I perform a search a second time (either the same movie title or a different movie title) the search box doesn't show up, it goes straight to the last results of the previous search,
I have tried reloading the skin at the beginning of the command, but still have the same results

As for a direct url, I found that it does show a url in the log, but I haven't been able to get it to work


This is from my Log file, I added a empty line above and below the url
21:46:40 T:4956   DEBUG: ------ Window Deinit (DialogKeyboard.xml) ------
21:46:40 T:4956   DEBUG: CAnnouncementManager - Announcement: OnInputFinished from xbmc
21:46:40 T:4956   DEBUG: GOT ANNOUNCEMENT, type: 128, from xbmc, message OnInputFinished
21:46:40 T:6524   DEBUG: DialogProgress::StartModal called
21:46:40 T:6524   DEBUG: ------ Window Init (DialogProgress.xml) ------
21:46:40 T:6524    INFO: Loading skin file: DialogProgress.xml, load type: KEEP_IN_MEMORY

21:46:40 T:6524  NOTICE: URL: http://api-global.netflix.com/desktop/search/instantsearch?esn=www&term=GODS+NOT+DEAD&locale=en-US&country=US&authURL=1428374769292.DRcPEJzdAKjw99RAgKHuxgMxoGc=&_retry=0&routing=redirect

21:46:41 T:7848   DEBUG: XFILE::CPluginDirectory::WaitOnScriptResult- plugin returned successfully
21:46:41 T:4956   DEBUG: Saving fileitems [plugin://plugin.video.netflixbmc/?mode=search&thumb&type=movie&url]
21:46:41 T:4956   DEBUG:   -- items: 1, sort method: 0, ascending: false
21:46:41 T:2492  NOTICE: Thread BackgroundLoader start, auto delete: false
21:46:41 T:6524    INFO: CPythonInvoker(28, C:\Users\*****\AppData\Roaming\XBMC\addons\plugin.video.netflixbmc\default.py): script successfully run
21:46:41 T:6524    INFO: Python script stopped
21:46:41 T:6524   DEBUG: Thread LanguageInvoker 6524 terminating
21:46:41 T:2492   DEBUG: Thread BackgroundLoader 2492 terminating
21:46:41 T:5472   DEBUG: CImageLoader::DoWork - took 107 ms to load



this is the command that I have tried, all it does is cause xbmc to hang for a second or two but nothing happens
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="Search Netflix by url" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="696" name="search netflix by url" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>GUI.ActivateWindow</param>
        <param>"window": "video", "parameters": ["plugin://plugin.video.netflixbmc/?mode=search&amp;thumb&amp;type=movie&amp;url"]</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Player.Open</param>
        <param>"item": {"file":"http://api-global.netflix.com/desktop/search/instantsearch?esn=www&amp;term=GODS+NOT+DEAD&amp;locale=en-US&amp;country=US&amp;authURL=1428374769292.DRcPEJzdAKjw99RAgKHuxgMxoGc=&amp;_retry=0&amp;routing=redirect"} , "options":{ "resume":true }</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>


Title: Re: VC, Kodi and NextfliXBMC
Post by: nime5ter on April 07, 2015, 02:38:02 PM
Quote from: PegLegTV on April 07, 2015, 01:37:28 PM
It's a Pop up search box in xbmc,
As for a direct url, I found that it does show a url in the log, but I haven't been able to get it to work

What do you see in your kodi log once you've started actually playing a movie?

Does it show you the URL for the movie player? Based on what I'm seeing in the plugin's default.py file, I would expect something along the lines of :

https://www.netflix.com/WiPlayer?movieid=70262893

or, if you have more than one user profile, maybe:

https://www.netflix.com/SwitchProfile?tkn=somekindofuserprofiletoken&nextpage=https://www.netflix.com/WiPlayer?movieid=70262893

... I don't really know how people want to use Netflix or this plugin with VC, so maybe this thought process is not relevant:

From the standpoint of how VC works, I think it might be nice if people could start playing a Netflix movie or show directly, by name. That would probably require figuring out the Netflix movie IDs for each title of interest and generating a payload xml file for that.

I don't know if the plugin makes this feasible or not (e.g., if it stores Netflix movie data in users' XBMC databases, in which case we may be able to query that; do you see anything like that in your XBMC database?). But to me, that would be a nicer experience than trying to navigate by voice through multiple screens in order to play a particular title.

Still, sorry I can't be more useful in solving the existing search problem. No can see, no can do.  :D
Title: Re: VC, Kodi and NextfliXBMC
Post by: Haddood on April 07, 2015, 03:28:45 PM
Quote from: nime5ter on April 07, 2015, 02:38:02 PM
From the standpoint of how VC works, I think it might be nice if people could start playing a Netflix movie or show directly, by name. That would probably require figuring out the Netflix movie IDs for each title of interest and generating a payload xml file for that.

I don't know if the plugin makes this feasible or not (e.g., if it stores Netflix movie data in users' XBMC databases, in which case we may be able to query that; do you see anything like that in your XBMC database?). But to me, that would be a nicer experience than trying to navigate by voice through multiple screens in order to play a particular title.


and that is why exactly why I shared this http://voxcommando.com/forum/index.php?topic=1802.0  :) as for me NetFlix through xbmc is a bit pain to navigate and kinda slow ... on top all it does in fact launch it into a browser ... which Robob can do perfectly
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 07, 2015, 07:06:48 PM
QuoteWhat do you see in your kodi log once you've started actually playing a movie?

this is what the log shows (I use single user, no profiles)

plugin://plugin.video.netflixbmc/?mode=playVideoMain&name=A%20Haunted%20House%202&thumb=C%3a%5cUsers%5cnancy%5cAppData%5cRoaming%5cXBMC%5cuserdata%5caddon_data%5cplugin.video.netflixbmc%5ccache%5ccovers%5c70295062.jpg&url=70295062 (http://plugin://plugin.video.netflixbmc/?mode=playVideoMain&name=A%20Haunted%20House%202&thumb=C%3a%5cUsers%5cnancy%5cAppData%5cRoaming%5cXBMC%5cuserdata%5caddon_data%5cplugin.video.netflixbmc%5ccache%5ccovers%5c70295062.jpg&url=70295062)

this is the simplest command that works for me to launch a Netflix movie through XBMC
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="Plays A Haunted house 2" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="696" name="play A Haunted House 2 Movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Player.Open</param>
        <param>"item": {"file":"plugin://plugin.video.netflixbmc/?mode=playVideoMain&amp;url=70295062"} , "options":{ "resume":true }</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>


Quote... I don't really know how people want to use Netflix or this plugin with VC, so maybe this thought process is not relevant:

From the standpoint of how VC works, I think it might be nice if people could start playing a Netflix movie or show directly, by name. That would probably require figuring out the Netflix movie IDs for each title of interest and generating a payload xml file for that.

I don't know if the plugin makes this feasible or not (e.g., if it stores Netflix movie data in users' XBMC databases, in which case we may be able to query that; do you see anything like that in your XBMC database?). But to me, that would be a nicer experience than trying to navigate by voice through multiple screens in order to play a particular title.

I'm not sure how to query a database file but i did find several .cache files (C:\Users\****\AppData\Roaming\XBMC\userdata\addon_data\plugin.video.netflixbmc\cache) and there are 1,336 files in that location each file is named by ID Number (ex: 70295062.cache)

I Attached the cache file that goes with the url above ( I used Notepad++ to view the file)

Edit: thinking about it more, the cache files are for items that have had metadata downloaded so far, so in order to use those you would have to navigate NetfliXBMC and then update the XML file then you would be able to use the xml file, not really ideal for by passing NetfliXBMC navigation
Title: Re: VC, Kodi and NextfliXBMC
Post by: nime5ter on April 07, 2015, 09:32:38 PM
Yup, I think you're right; it's not worth the trouble.

In the meantime, you've given other Kodi/Netflix folks quite a bit to work with within the limits of the addon, which is much appreciated.
Title: Re: VC, Kodi and NextfliXBMC
Post by: lja on April 07, 2015, 10:29:07 PM
Quote from: nime5ter on April 07, 2015, 09:32:38 PM
In the meantime, you've given other Kodi/Netflix folks quite a bit to work with within the limits of the addon, which is much appreciated.

@PegLegTV
+1. Thanks for your work. However I will continue to play with it.
Title: Re: VC, Kodi and NextfliXBMC
Post by: PegLegTV on April 08, 2015, 12:08:22 AM
I found that Allflicks.com (http://allflicks.com) has the Netflix video ID in the url while viewing the individual movie/tv shows

http://www.allflicks.net/movies/70295062/ (http://www.allflicks.net/movies/70295062/)

you might be able to use this and robobrowser and some regex to perform a search and play command

did some test with the ID's and with TV Shows it starts where you left off in the series (not sure if it will resume the video or not)


play movie A Haunted House 2
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="Plays A Haunted house 2" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="696" name="play A Haunted House 2 Movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <params>
        <param>Player.Open</param>
        <param>"item": {"file":"plugin://plugin.video.netflixbmc/?mode=playVideoMain&amp;url=70295062"} , "options":{ "resume":true }</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
  </command>
</commandGroup>



I hope this helps, I don't know Robobrowser that well and my head is yelling no more netflix  :bonk  :o