• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 18
[RELEASE] SageTV recordings
#46
What items can we map to? For example the TV Episodes .nfo file structure has a field for premiered and aired. Can we use the premiered option to map our OrigianlAirdate to and use that as a sorting option? Or use the recorded date as XBMC's dateAdded and OriginalAirDate as XBMC's date.
Reply
#47
It would also be nice if we could figure out how to replace the delete option in the context menu with the "delete show" option instead of having both. Or better yet, completely replace the default context menu with all our own options. We could have delete show, add as favorite and maybe some other options. We also need a refresh of the list once a show is deleted.
Reply
#48
(2012-08-30, 02:26)kricker Wrote: What items can we map to? For example the TV Episodes .nfo file structure has a field for premiered and aired. Can we use the premiered option to map our OrigianlAirdate to and use that as a sorting option? Or use the recorded date as XBMC's dateAdded and OriginalAirDate as XBMC's date.

Great idea. I didn't realize there was a .nfo structure that XBMC natively supports. I'll look to implement additional metadata that XBMC can pull in... and agree... we should plan for the SageTV recording date to be the XBMC aired date, and the SageTV original air date to be the XBMC premiered date.

NFO file: http://wiki.xbmc.org/index.php?title=Imp...V_Episodes
Reply
#49
I'm just not sure how much of that we can pull in and store when we aren't really writing to the library. Where does all this info we pull get stored?
Reply
#50
(2012-08-30, 02:54)kricker Wrote: I'm just not sure how much of that we can pull in and store when we aren't really writing to the library. Where does all this info we pull get stored?

No clue. It may not get stored anywhere... it may just be cached as "listitem" objects and loaded each time the plugin loads. I implemented the premiered piece but have no clue how to get it to display (or use for sorting). Hmm...
Reply
#51
(2012-08-30, 02:31)kricker Wrote: It would also be nice if we could figure out how to replace the delete option in the context menu with the "delete show" option instead of having both. Or better yet, completely replace the default context menu with all our own options. We could have delete show, add as favorite and maybe some other options. We also need a refresh of the list once a show is deleted.

I don't see two delete options... I just see the Delete Show option in the context menu of an episode. Regardless, I do think we can look into using the Container.Refresh or Container.Update function mentioned here to refresh the listing after deletion: http://wiki.xbmc.org/index.php?title=Lis..._functions

The challenge though is to figure out how we can call two functions when the "addContextMenuItems" method is used... one would perform the delete operation like is in there right now and then right behind that would be the Container.Refresh call to refresh the listing. Not sure...
Reply
#52
You don't see list context menu on an episode?
Image

Notice the Delete Show at the top (which is the command added by the addon) and Delete near the bottom (the default context menu item).

I've been trying to call a refresh of the container from within the delete command, but so far no luck. I don't know if you can have a context menu item send 2 commands. I'm looking at some other addons and how they do it. Problem is I suck at Python and there seems to be many ways to do the same thing. The other add-ons structure look so different it is hard for me to compare.
Reply
#53
(2012-08-30, 03:41)kricker Wrote: You don't see list context menu on an episode?
Image

Notice the Delete Show at the top (which is the command added by the addon) and Delete near the bottom (the default context menu item).

I've been trying to call a refresh of the container from within the delete command, but so far no luck. I don't know if you can have a context menu item send 2 commands. I'm looking at some other addons and how they do it. Problem is I suck at Python and there seems to be many ways to do the same thing. The other add-ons structure look so different it is hard for me to compare.

Not sure why your context menu looks like that. What skin are you using? I'm using the default Confluence skin that comes with Frodo. My context menu looks like below and you can see I only have one Delete option.

Image
Reply
#54
Very odd. I'm also using the default Confluence skin. In a vanilla install of Eden I see a menu similar to yours, but it also has a menu item called "Play from here" after queue item.

Ahhha. I found it. Under Settings\Appearance\File Lists "Allow file renaming and deletion". I usually have this option on.
Reply
#55
EDIT: Checked in an updated version of this addon with some enhancements to the context menu items.

-Choosing the Delete Show context menu item will now refresh the list of episodes after the delete occurs
-Enhanced the context menu to only show this add ons menu items and not all of the other xbmc menu items that aren't relevant to this addon
-Added ability for the context menus to be dynamically generated... the first example that I added is where we check to see if a file is in the process of recording... and if it is... show a new "Cancel Recording" menu option. If it isn't recording, simply don't show that option (it will just show the "Delete Show" context menu item for now)

TODO:
-Add additional context menu items (both static and dynamic)
-Add error handling to handle situation where you delete the last episode in the list and the call to refresh fails (ideally if you delete the list episode in the list it would take you up a level back to the list of shows) [DONE... SEE POST 57]

Reply
#56
Nice work. I'll be sure to test out the new code tonight. Great idea making the dynamic menu options.
Reply
#57
Updates are coming fast and furious here... just checked in a new version with even more enhancements.

Key changes include:
-Added season number and episode number support (you may/may not see it depending on what skin and view you are using)
-Added error handling when deleting an episode and it's the last episode for a show (when this occurs, it should refresh the list and just show the ".." option)
-Added ability to sort by episode number

See github for the latest code: https://github.com/kricker/plugin.video.SageTV

TODO:
-Figure out how best to sort by season and episode numbers (one option is to include SxEx format in the title... another option is to see if xbmc can sort on these fields natively) [DONE... ADDED SORTING BY EPISODE NUMBER]
Reply
#58
does this work for ATV?
Reply
#59
(2012-08-31, 04:02)erhan75 Wrote: does this work for ATV?

sure... why wouldn't it? just upload the addon folder to atv, configure the addon in the xbmc interface, and you should be on your way...
Reply
#60
thanks LehighBri
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 18

Logout Mark Read Team Forum Stats Members Help
[RELEASE] SageTV recordings2