Author Topic: Playing TV Episode by name in Frodo  (Read 5070 times)

0 Members and 1 Guest are viewing this topic.

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Playing TV Episode by name in Frodo
« on: May 21, 2013, 06:56:46 AM »
Here is a guide for being able to play an episode by name:

Step 1:- Making the Payload.xml file
Open the Xsql plugin, select Plugins then select Xsql

Settings:
Export XML to Folder: .\\XbmcPayloads (or where ever you choose to save this file, adjust the command to point to it.)

In the OutPut (XML payload files) section, add this:
Type: video
Query: select idEpisode, c00 from episode
Filename: xbmcTvEpisodes
Sub: tick
Click Save and Generate
This will create a new PayloadXML with 'episode ID' and 'episode Titles' from all the TVSeries in your database.

This is the command to play:
Code: [Select]
<command id="688" name="Play Episode" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Player.Open&amp;&amp;"item" : {"episodeid" : {1} }</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Play Episode</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone">XbmcPayloads\xbmcTvEpisodes.xml</payloadFromXML>
</command>

Should look like this:


Any episodes with the same name will just play the first instance of that name in the database. Currently I have about 1500 episodes in my database and haven't had this happened yet. A common example is most TV series start with a “pilot “ episode, this will just play the pilot episode of the first TV series in the database.

Enjoy :)
« Last Edit: May 21, 2013, 09:06:56 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #1 on: May 21, 2013, 07:31:30 AM »
It may be possible to make a command that works the same way as "play song X by artist Y" to get around that problem.

Personally, I have no idea what any of the episodes are called, except maybe for some of the Friends episodes...  "The one where Joey wears all of Chandlers clothes, goes commando, and does lunges"... no that probably wouldn't work.  ;D

I think I would be more likely to specify a season and episode number, but usually I used "unwatched episodes of ..." to continue with a particular show.  If I'm going to re-watch something, I'll probably browse around with my remote to find it!
« Last Edit: May 21, 2013, 09:07:15 AM by jitterjames »

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Playing TV Episode by name in Frodo
« Reply #2 on: May 21, 2013, 09:42:05 AM »
Hmm interesting point.

Only it would need to be "play song x" which in the back ground executed- "play song x by artist y from album w"

I wonder if mysql can pull this type of data.

After all that you didn't even give the name of the episode? now i'm going to have to google it.

I tossed my remote out the window when I installed VC. No point doing things by halves.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #3 on: May 21, 2013, 09:59:54 AM »
not sure what the actual name is but here:



I guess it is "the one where no one is ready"

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Playing TV Episode by name in Frodo
« Reply #4 on: May 21, 2013, 10:08:39 AM »
Haha classic Friends, love it.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #5 on: May 21, 2013, 12:03:50 PM »
Only it would need to be "play song x" which in the back ground executed- "play song x by artist y from album w"

I wonder if mysql can pull this type of data.

I'm not sure what you mean by this: "play song x by artist y from album w".

We have used a command like "play song watch tower by Dylan" in the past and it works.  The payloadXML stores the exact ID for that song so the actions in the LCB are straightforward.

We could do the same thing with episode names, allowing for the clarification of what series we want.  We don't need to use albums and artist for music (artist is enough) and similarly, for TV we don't need to specify the season, just the name of the show, since for any given show the episode names are sure to be unique.  Again, this is something I would never use, but it can be done without too much difficulty.  It's just that I think it would be difficult for the user to actually use these commands, so why bother using up resources on storing all those word combinations...

yes I'm sure we can do this with MySQL quite easily.  It is more powerful than SqLite so I don't imagine it would be a problem.  Maybe I'll do it as an exercise.

In case some people are wondering what the HECK we are talking about here... Mace and I have been working on a new plugin that works with XBMC using the MySQL database instead of the SqLite database.  The plugin will look very similar to the xSql plugin and will be called xMySql, and I'll be shipping it with the next version of VC.

If you are not already using MySQL with XBMC and you are interested to know more, check this link out: http://wiki.xbmc.org/index.php?title=HOW-TO:Share_libraries_using_MySQL

This is useful if you want to maintain one media library on your network and access it from several different XBMCs on different computers/devices.  This way you can watch a show on one device, and when you browse XBMC on another device, it will show that this show has been watched.  If you update the library on one machine, it will be updated everywhere etc.

It also means that you'll have the same ID numbers for the same items, which is a good thing when you want to use VC to control multiple XBMCs!  If Avatar has an ID of 501 on one machine, it will have an ID of 501 on all machines, so you can use a single payloadXML file to control any XBMC on your network.

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Playing TV Episode by name in Frodo
« Reply #6 on: May 22, 2013, 05:30:13 AM »
I'm not sure what you mean by this: "play song x by artist y from album w".

I mean to play an episode by the episode number we would need the tvshow title, what season it is and then the number - x - y - w.
But not something VC could do as the phrase would be the same, unless the phrase contained the show title and episode title, as you say this seems like an unnecessary waste of processing power.

Quote
We could do the same thing with episode names, allowing for the clarification of what series we want.  We don't need to use albums and artist for music (artist is enough) and similarly, for TV we don't need to specify the season, just the name of the show, since for any given show the episode names are sure to be unique.  Again, this is something I would never use, but it can be done without too much difficulty.  It's just that I think it would be difficult for the user to actually use these commands, so why bother using up resources on storing all those word combinations...

Interesting idea, specifying TV show title to call the episode would alleviate the problem of episodes with the same name. However, creating a payload with show title and episode title seems like an awful long phrase, even using two payload xml's.
Saying just the episode title seems a lot easier.
I am curious though, if you have all this functionality with VoxCommando, what do you use to play episodes? I know there is the navigation commands for XBMC built into VoxCommando, but why use those when you can just say the episode name? I like that I can add new episodes, they show up on the home screen, and I can just say the episode named to play it. Completely hands-free. 


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #7 on: May 22, 2013, 12:17:32 PM »
I am curious though, if you have all this functionality with VoxCommando, what do you use to play episodes? I know there is the navigation commands for XBMC built into VoxCommando, but why use those when you can just say the episode name? I like that I can add new episodes, they show up on the home screen, and I can just say the episode named to play it. Completely hands-free. 
In my regular everyday life I use the amulet remote anyway, so I tend to switch between using voice for somethings, and using the buttons for simple stuff, life pause, volume, and arrows / select.  But that's just me.

Asking for new episodes by name, makes sense if they are showing up on your home screen.  My current skin setup doesn't have that, so it never even occurred to me!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #8 on: May 22, 2013, 12:49:24 PM »
YEAH.  I just added the "recommended episodes" widget to my home screen in nox.  Now am using the play episode {1} command.  It totally rocks!

"Recommended Episodes" seems to show the next unwatched episode from shows that I have been watching recently which is pretty much exactly what I want.

I've also added the "Random Movies" Widget.  It would be nice if we could customize these widgets without our own sql or smart playlist criteria.  I'd love to have a "recently added, unwatched, random movies that are less than 2.5 hours widget"  :biglaugh

Alas, for some reason, it seems that we can't have everything. :-[

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Playing TV Episode by name in Frodo
« Reply #9 on: May 22, 2013, 09:49:26 PM »
YEAH.  I just added the "recommended episodes" widget to my home screen in nox.  Now am using the play episode {1} command.  It totally rocks!

Yep, if there's an lazy way to do something....I'll find it. :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Playing TV Episode by name in Frodo
« Reply #10 on: May 22, 2013, 10:16:04 PM »
ah the age old question.  Is it really laziness when it takes this much thought and effort in advance, to make it possible?!

I'm pretty sure VC doesn't make my life any easier.  But I hope for most people, it makes it more fun, or for those that have a disability, and have people that can help them get set up, that it makes more more things possible for them, and gives them some more autonomy and freedom.

Mace

  • $upporter
  • Contributor
  • *****
  • Posts: 77
  • Karma: 1
    • View Profile
Re: Playing TV Episode by name in Frodo
« Reply #11 on: May 23, 2013, 03:54:34 AM »
VC has definitely made my home entertainment experience more fun.
And i'll happily contribute my thoughts and efforts, in the hope it will save others the time spent staring at a computer screen screaming "Why won't you just work damn it!".