#15997 closed Bugs (Fixed)

CPVRDirectory::Exists always returns false (prevents reilable VideoInfoScan of pvr://recordings/ sub directory)

Reported by: metaron Owned by: xhaggi
Priority: 4 - Normal
Component: PVR (Personal Video Recoder) - core components Version: 14.2 "Helix" Final
Severity: Major Keywords: VideoInfoScan pvr intermittent failure
Cc: negge, xhaggi Blocked By:
Blocking: Platform: All

Description

After adding pvr://recordings/Films as a Video files directory (pvr.mythtv) using "The Movie Database" as a scraper, updating the video database using XBMC Library Auto Updater was intermittent (i.e. mostly fails), only working when the recordings/Films directory was open in the background (I have a remote key bound to 'Home').

Investigating the debug log showed the following entry when requesting an immediate scan via XBMC Library Auto Updater without the recordings/Films directory open in the background: "Process directory 'pvr://recordings/Films/' does not exist - skipping scan."

Investigating VideoInfoScanner.cpp and filesystem/Directory.cpp highlighted this occurs when the directory isn't already in cache resulting in a call to CPVRDirectory::Exists.

Currently (Kodi Helix 14.2) this states:

bool CPVRDirectory::Exists(const CURL& url)
{
  return (url.IsProtocol("pvr") && url.GetHostName() == "recordings");
}

Unfortunately CURL::Parse on line 292 of xbmc/URL.cpp deliberately sets m_strHostName = "" if the protocol is iso9660, musicdb, videodb, sources or pvr which is what GetHostName() returns.

I didn't investigate further, assuming if this is done in one place it is probably deliberate and intentional.

The attached patch to PVRDirectory.cpp created for an OpenElec compilation environment fixes this (in a sub-optimal way as it actually returns an unncecessary Items list which is then discarded) by using GetDirectory in a similar approach to that used by CPVRFile::Exists.

See original forum thread http://forum.kodi.tv/showthread.php?tid=227628

Attachments (1)

kodi-metaron-PVRDirectory.patch (1.5 KB) - added by metaron at 2015-05-24T11:39:46+01:00.
Patch for OpenElec 5

Change History (4)

Changed at 2015-05-24T11:39:46+01:00 by metaron

Patch for OpenElec 5

comment:1 Changed at 2015-05-26T08:45:55+01:00 by xhaggi

  • Milestone changed from Future / Pending to 15.0 "I*****"
  • Owner changed from opdenkamp to xhaggi
  • Severity changed from Normal to Major
  • Status changed from new to assigned

comment:2 Changed at 2015-05-26T09:07:13+01:00 by xhaggi

  • Resolution set to Fixed
  • Status changed from assigned to closed

comment:3 Changed at 2015-05-29T21:35:51+01:00 by Martijn

  • Milestone changed from 15.0 "I*****" to 15.0 "Isengard"
Note: See TracTickets for help on using tickets.