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 2
General
Making RegEx list for series/movie matching extensible for users
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="morpheus_xx" data-source="post: 1172377" data-attributes="member: 48495"><p>Currently all regular expressions used inside our MDEs are hard coded. There are requests to make them extensible:</p><p></p><p></p><p></p><p></p><p>Question at [USER=17886]@MJGraf[/USER]:</p><p></p><p>did you already implement a serialization for Regex instances?</p><p></p><p>This we would need for putting them into settings and sending them to server (via ServerSettings).</p><p></p><p>I could also image some more attributes like</p><p>[CODE=XML]<Pattern Enabled="True" Code="(?<series>[^\\]*)\\[^\\]*(?<seasonnum>\d+)[^\\]*\\S*(?<seasonnum>\d+)[EX](?<episodenum>\d+)*(?<episode>.*)\." Option="IgnoreCase" />[/CODE]</p><p>the "Enabled" attribute could be used for temporary disabling patterns without needing them to be removed/commented from code. Construction of an RegExp by (string, RegexOptions) is possible when we deserialize this type. With a custom class we probably not even need to implement own XML serialization, just using strings and enum and creating the RegEx instance once both properties are set.</p><p></p><p>How should the extension be provided to users? Once the serialization is implemented, the user could manually edit .xml files inside configf folder. Would that be enough for advanced users? </p><p>If not, how could a GUI in MP2 could look like to edit RegExs?</p><p></p><p>The change itself is quite easy to make, but a config GUI would be quite complicated I think.</p><p></p><p>[USERGROUP=39]@Developers[/USERGROUP] [USERGROUP=40]@Testers[/USERGROUP]</p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1172377, member: 48495"] Currently all regular expressions used inside our MDEs are hard coded. There are requests to make them extensible: Question at [USER=17886]@MJGraf[/USER]: did you already implement a serialization for Regex instances? This we would need for putting them into settings and sending them to server (via ServerSettings). I could also image some more attributes like [CODE=XML]<Pattern Enabled="True" Code="(?<series>[^\\]*)\\[^\\]*(?<seasonnum>\d+)[^\\]*\\S*(?<seasonnum>\d+)[EX](?<episodenum>\d+)*(?<episode>.*)\." Option="IgnoreCase" />[/CODE] the "Enabled" attribute could be used for temporary disabling patterns without needing them to be removed/commented from code. Construction of an RegExp by (string, RegexOptions) is possible when we deserialize this type. With a custom class we probably not even need to implement own XML serialization, just using strings and enum and creating the RegEx instance once both properties are set. How should the extension be provided to users? Once the serialization is implemented, the user could manually edit .xml files inside configf folder. Would that be enough for advanced users? If not, how could a GUI in MP2 could look like to edit RegExs? The change itself is quite easy to make, but a config GUI would be quite complicated I think. [USERGROUP=39]@Developers[/USERGROUP] [USERGROUP=40]@Testers[/USERGROUP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
General
Making RegEx list for series/movie matching extensible for users
Contact us
RSS
Top
Bottom