Elegant 10 Posted June 4, 2017 Posted June 4, 2017 (edited) Hi guys, First time posting here, just setting up my HTPC with Emby running on my server and hit a bit of a snag. I have a sub-directory I wish to exclude from Kodi specifically; Emby can continue to have the file in it's library. I figured this would be rather simple: create the exception in advancedsettings.xml, reset the local database and be done. Unfortunately, this does not seem to work. I am wondering if I am missing a step or if this a limitation/feature not yet implemented. For reference, my advancedsettings.xml is the following: <advancedsettings> <video> <!-- VideoExtras: Section Start --> <excludefromscan action="append"> <regexp>/Extras/</regexp> <regexp>[\\/]Extras[\\/]</regexp> </excludefromscan> <excludetvshowsfromscan action="append"> <regexp>/Extras/</regexp> <regexp>[\\/]Extras[\\/]</regexp> </excludetvshowsfromscan> <!-- VideoExtras: Section End --> </video> </advancedsettings> Anyone else experiencing this? I'm using Kodi 17.3 with Emby for KodiĀ 2.3.48 on Arch Linux. Thanks! Edited June 4, 2017 by Elegant
Angelblue05 4131 Posted June 4, 2017 Posted June 4, 2017 What you are trying to do is not supported. The add-on doesn't use the kodi scan to import content, therefore this has no effect. I don't think there is a solution unless your extras are in a separate library from your content.
Elegant 10 Posted June 5, 2017 Author Posted June 5, 2017 (edited) I believe there is a solution, it just comes down to whether or not the add-on can access the path for advancedsettngs.xml. Once we have access to the XML we would just parse the entries and modify the below portion of code to then "return False" should the entry match what is in the XML. This should prevent Emby for Kodi from adding it to the database however it should not prevent other addons like VideoExtras from working as the path to the Extras folder would still be valid just not tracked by the add-on. ##### GET THE FILE AND PATH ##### playurl = API.get_file_path() if self.direct_path: # Direct paths is set the Kodi way if "\\" in playurl: # Local path path = "%s\\" % playurl toplevelpath = "%s\\" % dirname(dirname(path)) else: # Network path path = "%s/" % playurl toplevelpath = "%s/" % dirname(dirname(path)) if not self.path_validation(path): return False To access the XML we need, we would parse the following (should it exist): self.advSettingsXmlFile = xbmc.translatePath('special://masterprofile/advancedsettings.xml').decode("utf-8") I might be able to make some time to actually flesh the whole thing out. Your thoughts on having this pushed? Edited June 5, 2017 by Elegant
Elegant 10 Posted June 11, 2017 Author Posted June 11, 2017 Been a busy week, I actually solved this a few hours after I put up my last reply just didn't have time to sit down and do a pull request. This completely covers the scenario described and will not impact anyone negatively. Please accept the request. Thanks!
Recommended Posts