[confirm] Mediaportal randomly stops playing videos from networkshare (1 Viewer)

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
Home Country
I created a simple fileSystemWatcher program to monitor a UNC path. It does work for correctly for sub directories. So it appears that GetUniqueTopLevelFolders is the cause. When only the parent directory is returned then its unlikely there will be a major issue with how many fileSystemWatchers are created. I'll hopefully have a better patch shortly.
 

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
Home Country
This new patch fixes the issue where by instead of the share being added as a watcher each directory of the share was. I've added logic to not add watchers where the parent is already being watched.

The whole file watcher and file cache setup is problematic due to watchers being driven off is this file cached. I have changed virtualDirectory to add shares to a watcher directly with a new public method.

The only case I haven't tested it a samba share. I'll try and look at it later.


Lastly FileExistsInCache is called with and without full paths. Is this expected? I didn't investigate it to determine if it caches relative addressed files.
 

Attachments

  • watchers.patch
    7.8 KB

davidf

Retired Team Member
  • Premium Supporter
  • April 3, 2006
    796
    348
    Scotland
    Home Country
    Scotland Scotland
    The internal patch is now in SVN (I included the sqlite journal check from your patch). If you have any remaining issues then let me know.
     

    draclich

    Portal Member
    March 4, 2007
    21
    3
    melb.vic.au
    Home Country
    Cache is disabled by default in the svn and it doesn't exhibit the issue. Enabling it causes the same hang when to many UNC watchers are created. The issue can be solved by ensuring all shares are added at parent watchers. I put a change in my patch for virtualdirectory.GetRootExt to force create a watcher for each share.

    There is still the annoying performance overhead where every directory in the share attempts to be added as a watcher instead of being filtered out by util.GetUniqueTopLevelFolders. Most of my changes where to try and clean that up as well.
     

    draclich

    Portal Member
    March 4, 2007
    21
    3
    melb.vic.au
    Home Country
    This patch enhances GetUniqueTopLevelFolders by simplifying the logic and returning only the minimum number of directories to be watched.

    edit - minor change to remove relative paths
     

    Attachments

    • GetUniqueTopLevelFolders.patch
      3.7 KB

    Users who are viewing this thread

    Top Bottom