NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Noobie Here!

 
  • 0 Vote(s) - 0 Average
Noobie Here!
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#121
2014-03-28, 07:30 PM
That's the area I have been working with.
I have tried several changes already.
I'm sure it's due to my inexperience; I'll keep trying.
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#122
2014-03-29, 02:38 PM
This is kind of ironic, but, the "end of recording playback prompting for deletion" feature you added in your latest release doesn't work for me using my plugin.
It does work with your Recordings menu.
If you remember, this was a feature I asked for Smile
Is it possible for me to add this code to my plugin?

Also, I wanted to test the new single/multi screens, but couldn't find where to turn it on?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,843
Threads: 954
Joined: May 2006
#123
2014-03-29, 02:45 PM
jrockow Wrote:This is kind of ironic, but, the "end of recording playback prompting for deletion" feature you added in your latest release doesn't work for me using my plugin.
It does work with your Recordings menu.
If you remember, this was a feature I asked for Smile
Is it possible for me to add this code to my plugin?

If you call PlayVideo yourself you would be responsible for your own post functions, just like you do with resume.

Quote:Also, I wanted to test the new single/multi screens, but couldn't find where to turn it on?

This isn't the jrockow support sub-forum. Make a general post if you have questions that others might benefit from

Martin
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#124
2014-03-29, 03:21 PM
mvallevand,

Sorry if I offended you, but your response wasn't very helpfull.

Hopefully Sub will give me some guidedance with my first question; he has been very patient with me.

I will repost the second question as you suggested.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,843
Threads: 954
Joined: May 2006
#125
2014-03-29, 03:48 PM
jrockow Wrote:Sorry if I offended you, but your response wasn't very helpfull.

Sorry, I guess I am not as keen as writing you plugin for you as sub is, but what I meant to say is is you call PlayVideo() in your plugin, you will be responsible for the plugin actions like resume and delete that wrap around the call. Anyway I'll back off know and let sub continue his tutorial.

Martin
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#126
2014-03-29, 04:59 PM
mvallevand Wrote:Sorry, I guess I am not as keen as writing you plugin for you as sub is
lol - same thought has crossed my mind a few times through this thread, but I remind myself that the answers will be useful for other people thinking about developing plugins too.
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#127
2014-03-29, 05:07 PM
jrockow Wrote:This is kind of ironic, but, the "end of recording playback prompting for deletion" feature you added in your latest release doesn't work for me using my plugin.
It does work with your Recordings menu.
This is a feature of the Recordings screen. If you want a similar feature on your screen, then you'd need to implement it.

To find out when playback stops, you'd do this:

Have your class implement the IEventNotification interface.

In you initialization routine, subscribe for notification of events:
Code:
EventBus.GetInstance().AddListener(this);

Handle the PLAYBACK_STOPPED event:
Code:
public void Notify(string eventName, object eventArg)
        {
            if (eventName == "PLAYBACK_STOPPED")
            {
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#128
2014-03-29, 05:51 PM
FYI, that last code would probably be followed by something like this:
Code:
int duration = 0;
                        int position = PlaybackPositionHelper.GetPlaybackPosition(scheduledRecording.Filename, out duration);
                        if ((position + 20) > duration)
                        {
                            Logger.Debug("play to completion");

                            Hashtable args = new Hashtable();
                            args["@message"] = "This recording was watched to completion. Would you like to delete this recording?";
                            NUtility.Base.SimpleMessageBox popup = new NUtility.Base.SimpleMessageBox(args, "OK", "Cancel", this);
                            PluginHelperFactory.GetPluginHelper().ActivatePopup(popup);
                        }
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#129
2014-03-29, 10:19 PM
I can't get past this code I put in my Initialise sub:
EventBus.GetInstance().AddListener(Me)

As soon as I launch the plugin I get an error:
"Unable to cast object of type "NewRec.Test3.class1" to type "NUtility.IEventNotification"

I have been reading for hours, but nothing I have tried has helped.
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#130
2014-03-29, 10:30 PM
As I said, your class needs to implement the IEventNotification interface:

Code:
namespace TestEvents
{
    public class TestEvents: IEventNotification
    {
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (17): « Previous 1 … 11 12 13 14 15 … 17 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode