[pvr] fix built-in PlayMedia with PVR channels and recordings (Trac #15164)

This should fixes the playback of PVR channels and recordings with the built-in PlayMedia as reported at http://trac.kodi.tv/ticket/15164
partially agree with negge. this method should play the file if it's a 
pvr file (recording, channel) and return false when it's not. when it 
returns false, then capp can do whatever with it.

and if you add a check for IsMainThread() (or something with a similar 
name, don't remember, the one that checks if you're the main thread) and 
send it through appmsngr if needed, then you can get rid of the similar 
method(s) in the dialog/window code too. that's not important for fixing 
this issue now though, just nice for later.

On 08-12-14 13:01, Sam Stenvall wrote:
>
> In xbmc/pvr/PVRManager.cpp:
>
> > +    return false;
> > +  }
> > +  if (!item.HasPVRChannelInfoTag() && StringUtils::StartsWith(item.GetPath(), "pvr://channels/"))
> > +  {
> > +    CFileItemPtr fileItem = g_PVRChannelGroups->GetByPath(item.GetPath());
> > +    if (fileItem->HasPVRChannelInfoTag())
> > +      return PlayMedia(*fileItem);
> > +  }
> > +  else if (!item.HasPVRRecordingInfoTag() && StringUtils::StartsWith(item.GetPath(), "pvr://recordings/"))
> > +  {
> > +      CFileItemPtr fileItem = g_PVRRecordings->GetByPath(item.GetPath());
> > +      if (fileItem->HasPVRRecordingInfoTag())
> > +        return PlayMedia(*fileItem);
> > +  }
> > +
> > +  return g_application.PlayFile(item, false) == PLAYBACK_OK;
>
> This is why I suggested that |CPVRManager| handles getting a 
> |CFileItem| instance and |CApplication| is the one that actually calls 
> |PlayMedia|, now we have to duplicate the last line instead. I still 
> think we could just return false here, since if an item |IsPVR| but 
> not actually a channel or a recording, what is it and why should we 
> even try to play it?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/xbmc/xbmc/pull/5897/files#r21448481>.
>