home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
MPDB.TV french scrapper
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RoChess" data-source="post: 1219134" data-attributes="member: 18896"><p>[USER=50218]@Recma[/USER], found problem.</p><p></p><p>First off you changed the XML syntax, and moved value attribute to a different position, which causes the RegExp to fail and consider the file corrupt with default values being used. I'm not using an XML processor to read the file, but a raw solution, so to prevent failure/crashes I have to sanitize the input via Regular Expression.</p><p></p><p>But the RegExp would have failed anyway, because the valid values I look for are \w{12,} which allows a-z, A-Z, 0-9, and underscores, but I did not account for '-' in the MPDb key.</p><p></p><p>Also looking for 12 chars minimum seems a little extreme if a user has a short username, so I will change that to include hyphens, and lower it to 4+</p><p></p><p>But you do have to fix your XML file back to the correct syntax of: <set[\t\s]+id="\d+"[\t\s]+name="global_options_[^"]+"[\t\s]+value="(?:true|false|[\w-]{12,})"[\t\s]*/></p><p></p><p>Example: <set id="00" name="global_options_xxxxx" value="some" />, but TABs are allowed, so if you like all your "values" to be lined up, just insert TABs.</p><p></p><p>Original file not touched in 4 years @ <strong><a href="https://raw.githubusercontent.com/RoChess/IMDbPlus/master/Options%20IMDb%2B%20Scraper.xml" target="_blank">https://raw.githubusercontent.com/RoChess/IMDbPlus/master/Options IMDb+ Scraper.xml</a></strong></p><p></p><p>v4.9.72 is released that fixes the '-' and lowers it to 4+ chars, but you will need to fix your XML.</p></blockquote><p></p>
[QUOTE="RoChess, post: 1219134, member: 18896"] [USER=50218]@Recma[/USER], found problem. First off you changed the XML syntax, and moved value attribute to a different position, which causes the RegExp to fail and consider the file corrupt with default values being used. I'm not using an XML processor to read the file, but a raw solution, so to prevent failure/crashes I have to sanitize the input via Regular Expression. But the RegExp would have failed anyway, because the valid values I look for are \w{12,} which allows a-z, A-Z, 0-9, and underscores, but I did not account for '-' in the MPDb key. Also looking for 12 chars minimum seems a little extreme if a user has a short username, so I will change that to include hyphens, and lower it to 4+ But you do have to fix your XML file back to the correct syntax of: <set[\t\s]+id="\d+"[\t\s]+name="global_options_[^"]+"[\t\s]+value="(?:true|false|[\w-]{12,})"[\t\s]*/> Example: <set id="00" name="global_options_xxxxx" value="some" />, but TABs are allowed, so if you like all your "values" to be lined up, just insert TABs. Original file not touched in 4 years @ [B][URL]https://raw.githubusercontent.com/RoChess/IMDbPlus/master/Options%20IMDb%2B%20Scraper.xml[/URL][/B] v4.9.72 is released that fixes the '-' and lowers it to 4+ chars, but you will need to fix your XML. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
MPDB.TV french scrapper
Contact us
RSS
Top
Bottom