NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 4 5 6 7 8 … 93 Next »
Show artwork method

 
  • 0 Vote(s) - 0 Average
Show artwork method
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#21
2015-04-04, 05:30 AM
I'm wondering if it's a case of needing a real sid, instead of "plex". My debug builds don't enforce the session security, for my own convenience when testing, but for you in a release build, you may need to have a real session. I'm not 100% sure though, because there is some special case stuff if you're on the local network. If other calls are working, like getting recording lists, then its unlikely to be that. (I'm not sure what other calls you're using)

Here is some example code of a login happening from XBMC:
Code:
bool cPVRClientNextPVR::Connect()
{
  string result;

  // initiate session
  CStdString response;
  if (DoRequest("/service?method=session.initiate&ver=1.0&device=xbmc", response) == HTTP_OK)
  {
    TiXmlDocument doc;
    if (doc.Parse(response) != NULL)
    {
      TiXmlElement* saltNode = doc.RootElement()->FirstChildElement("salt");
      TiXmlElement* sidNode = doc.RootElement()->FirstChildElement("sid");

      if (saltNode != NULL && sidNode != NULL)
      {
        // extract and store sid
        PVR_STRCPY(m_sid, sidNode->FirstChild()->Value());

        // extract salt
        char salt[64];
        PVR_STRCPY(salt, saltNode->FirstChild()->Value());

        // a bit of debug
        XBMC->Log(LOG_DEBUG, "session.initiate returns: sid=%s salt=%s", m_sid, salt);
        

        CStdString pinMD5 = PVRXBMC::XBMC_MD5::GetMD5(g_szPin);
        pinMD5.ToLower();

        // calculate combined MD5
        CStdString combinedMD5;
        combinedMD5.append(":");
        combinedMD5.append(pinMD5);
        combinedMD5.append(":");
        combinedMD5.append(salt);

        // get digest
        CStdString md5 = PVRXBMC::XBMC_MD5::GetMD5(combinedMD5);

        // login session
        CStdString loginResponse;
        char request[512];
        sprintf(request, "/service?method=session.login&sid=%s&md5=%s", m_sid, md5.c_str());
        if (DoRequest(request, loginResponse) == HTTP_OK)
        {
          if (strstr(loginResponse, "<rsp stat=\"ok\">"))
          {
            m_bConnected = true;
            XBMC->Log(LOG_DEBUG, "session.login successful");
            return true;
          }
          else
          {
            XBMC->Log(LOG_DEBUG, "session.login failed");
            XBMC->QueueNotification(QUEUE_ERROR, XBMC->GetLocalizedString(30052));
            m_bConnected = false;
          }
        }
      }
    }  
  }

  return false;
}
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#22
2015-04-04, 05:54 AM
Thinking about it, I don't think it's that. I'm pretty sure since you're accessing from a local network it'll auto validate your sid.

If you bring up the browser home page (http://127.0.0.1:8866), so you see NEWA first, then try the url, does it make any difference?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#23
2015-04-04, 07:49 AM
I'll try. Also re the Sid thing, every other request happily accepts plex (although for live TV I do put a client identifier donut starts two sessions.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#24
2015-04-04, 07:51 AM
Also in the same browser (different tab) I'm normally accessing the recording list method song can get the recording-ids but I'll try from local host.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#25
2015-04-04, 08:03 AM
Ahh ok, problems were being caused...the recording service needed restart as even a normal log in was not working. Something that previous had beem.

So now after a service restart guide2 has come up.

Trying the localhost gets me the 404 resource not found error (coming from iis). Trying the localhost:8866 and getting guide, then back to services still gets the 404 error.

So the service was giving funny results, but now I back to the 404 errors/
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#26
2015-04-04, 07:30 PM
Can you give me the new log now you've restarted it?
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#27
2015-04-04, 08:34 PM
sub Wrote:Can you give me the new log now you've restarted it?

Atached.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,953
Threads: 770
Joined: Nov 2003
#28
2015-04-04, 08:37 PM
To be honest, I'm at a bit of a loss. If you're willing to update to a 3.4 pre-release build, I can add some debug logging around this area so we can work out what's happening.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#29
2015-04-04, 08:46 PM
Yep. I'll put down the latest, or should i wait for a changed one?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,466
Threads: 963
Joined: May 2006
#30
2015-04-04, 09:05 PM
Sub, I do see the same error as psycik until the last update for my 404 problem, now I get this if it helps

A real sid doesn't help,

Code:
2015-04-04 17:02:38.011    [DEBUG][30]    Got Web Request (172.16.3.50): /service    method=recording.artwork&sid=plex&recording_id=25
2015-04-04 17:02:38.011    [DEBUG][30]    method=recording.artwork
2015-04-04 17:02:38.011    [DEBUG][30]    parameters:
2015-04-04 17:02:38.011    [DEBUG][30]       method: recording.artwork
2015-04-04 17:02:38.011    [DEBUG][30]       sid: plex
2015-04-04 17:02:38.011    [DEBUG][30]       recording_id: 25
2015-04-04 17:02:38.011    [DEBUG][30]       client_ip: 172.16.3.50
2015-04-04 17:02:38.011    [DEBUG][30]       host_callback: 172.16.3.2:8866
2015-04-04 17:02:38.011    [DEBUG][30]       physical_path: C:\Users\Public\NPVR\web\
2015-04-04 17:02:38.011    [DEBUG][30]       user_agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
2015-04-04 17:02:38.011    [DEBUG][30]       range:
2015-04-04 17:02:38.011    [DEBUG][30]       requested_path: /service
2015-04-04 17:02:38.011    [DEBUG][30]       verb: GET
2015-04-04 17:02:38.021    [DEBUG][30]    StreamArtwork()
015-04-04 17:02:38.026    [DEBUG][30]    returning channe icon file: C:\Users\Public\NPVR\Media\Shows\The Simpsons.jpg
2015-04-04 17:02:38.084    [ERROR][30]    System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.get_RemoteEndPoint()
   at Cassini.Connection.get_RemoteIP()
   at Cassini.Request.GetRemoteAddress()
   at System.Web.HttpWorkerRequest.IsLocal()
   at System.Web.Configuration.CustomErrorsSection.CustomErrorsEnabled(HttpRequest request)
   at System.Web.Configuration.UrlAuthFailedErrorFormatter.GetErrorText(HttpContext context)
   at System.Web.Security.UrlAuthorizationModule.WriteErrorMessage(HttpContext context)
   at System.Web.Security.UrlAuthorizationModule.ReportUrlAuthorizationFailure(HttpContext context, Object webEventSource)
   at System.Web.Security.UrlAuthorizationModule.OnEnter(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2015-04-04 17:02:38.134    [DEBUG][30]    Got Web Request (172.16.3.50): /service    method=recording.artwork&sid=plex&recording_id=25

Note this doesn't stop the image from streaming.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 7,899 2022-04-11, 04:30 PM
Last Post: mandai
  Another Artwork question scJohn 15 8,879 2019-09-10, 05:33 PM
Last Post: nonob
  Artwork by show name psycik 4 4,851 2017-07-12, 03:47 AM
Last Post: psycik
  API access to artwork and deleting recordings cncb 29 16,713 2016-11-06, 02:20 AM
Last Post: mvallevand
  Media\Show Directory mvallevand 12 6,489 2014-07-02, 10:58 AM
Last Post: sub
  couple of issues with recording.recurring.save method reven 10 5,222 2014-01-03, 11:11 PM
Last Post: reven
  Advice on which streaming method to use fred250 17 6,906 2013-09-14, 11:14 AM
Last Post: fred250
  getting recurring recordings from service?method API? reven 2 2,170 2013-08-03, 10:50 PM
Last Post: reven
  sabnzbd plugin to show processed files Wakalaka 1 2,176 2013-03-12, 06:48 AM
Last Post: psycik
  Reinitialise method scb147 6 2,791 2009-07-22, 02:23 PM
Last Post: scb147

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

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

Linear Mode
Threaded Mode