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
Products
TV-Server
TV Server Plugin: TvWishList
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="huha" data-source="post: 843270" data-attributes="member: 63847"><p>Ben,</p><p></p><p>- the last four options in the MP plugin are for the overwrite of a single tv wish, not the defaults.</p><p>- in my code the episode would be skipped if all matching criteria are disabled and the title is the same. I thaught it is important to give the user a choice to skip based on a title match only.</p><p></p><p>-Ok, I see here we had a major misunderstanding with the AND and OR conjunction for matching criteria.</p><p>The reason i came up with AND was that there were a lot of EPG data which had the same description for all episodes.</p><p>So you can say that´s why the user can disable the description. </p><p></p><p>But based on your proposal what do you think about the following version?</p><p></p><p></p><p>if (useNumbers) //check for seriesnumber and episodenumber must be first</p><p> {</p><p> if ((newSeriesNumber == oldSeriesNumber) && (newSeriesNumber != string.Empty))</p><p> {</p><p> if ((newEpisodeNumber == oldEpisodeNumber)&&(newEpisodeNumber != string.Empty) ) </p><p> {</p><p> return true; //series number and episode number do match</p><p> }</p><p> else if ((newEpisodeNumber != oldEpisodeNumber) && (newEpisodeNumber != string.Empty) && (oldEpisodeNumber != string.Empty))</p><p> {</p><p> return false; //true mismatch of episodenumber</p><p> }</p><p> }// if series number exists but there is no episode number it will not skip.</p><p> else if ((newSeriesNumber != oldSeriesNumber) && (newSeriesNumber != string.Empty) && (oldSeriesNumber != string.Empty))</p><p> {</p><p> return false; //true mismatch of series number</p><p> }</p><p> }</p><p></p><p> if (useName) //check for episode name and episode part </p><p> {</p><p> if ((newEpisodeName == oldEpisodeName) && (newEpisodeName != string.Empty))</p><p> {</p><p> if ((newEpisodePart == oldEpisodePart) || (newEpisodePart == string.Empty))</p><p> {</p><p> return true; //Episode name is matching and episode part is matching or is empty</p><p> }</p><p> else if ((newEpisodePart != oldEpisodePart) && (newEpisodePart != string.Empty) && (oldEpisodePart != string.Empty))</p><p> {</p><p> return false; //true mismatch of episodepart</p><p> }</p><p> }</p><p> else if ((newEpisodeName != oldEpisodeName) && (newEpisodeName != string.Empty) && (oldEpisodeName != string.Empty))</p><p> {</p><p> return false; //true mismatch of episodename</p><p> }</p><p> }</p><p></p><p> if (useDescription) //check for description must be last </p><p> {</p><p> if ((newDescription == oldDescription) && (newDescription != string.Empty) )</p><p> {</p><p> return true; //Description is matching</p><p> }</p><p></p><p> }</p><p></p><p> if (!useNumbers && !useName && !useDescription)</p><p> {</p><p> return true; //enables the user to skip just for identical title if nothing is checked, skip repeated checkbox still needed</p><p> }</p><p></p><p></p><p> return false; //no unique matches or mismatches do not know </p><p> }</p></blockquote><p></p>
[QUOTE="huha, post: 843270, member: 63847"] Ben, - the last four options in the MP plugin are for the overwrite of a single tv wish, not the defaults. - in my code the episode would be skipped if all matching criteria are disabled and the title is the same. I thaught it is important to give the user a choice to skip based on a title match only. -Ok, I see here we had a major misunderstanding with the AND and OR conjunction for matching criteria. The reason i came up with AND was that there were a lot of EPG data which had the same description for all episodes. So you can say that´s why the user can disable the description. But based on your proposal what do you think about the following version? if (useNumbers) //check for seriesnumber and episodenumber must be first { if ((newSeriesNumber == oldSeriesNumber) && (newSeriesNumber != string.Empty)) { if ((newEpisodeNumber == oldEpisodeNumber)&&(newEpisodeNumber != string.Empty) ) { return true; //series number and episode number do match } else if ((newEpisodeNumber != oldEpisodeNumber) && (newEpisodeNumber != string.Empty) && (oldEpisodeNumber != string.Empty)) { return false; //true mismatch of episodenumber } }// if series number exists but there is no episode number it will not skip. else if ((newSeriesNumber != oldSeriesNumber) && (newSeriesNumber != string.Empty) && (oldSeriesNumber != string.Empty)) { return false; //true mismatch of series number } } if (useName) //check for episode name and episode part { if ((newEpisodeName == oldEpisodeName) && (newEpisodeName != string.Empty)) { if ((newEpisodePart == oldEpisodePart) || (newEpisodePart == string.Empty)) { return true; //Episode name is matching and episode part is matching or is empty } else if ((newEpisodePart != oldEpisodePart) && (newEpisodePart != string.Empty) && (oldEpisodePart != string.Empty)) { return false; //true mismatch of episodepart } } else if ((newEpisodeName != oldEpisodeName) && (newEpisodeName != string.Empty) && (oldEpisodeName != string.Empty)) { return false; //true mismatch of episodename } } if (useDescription) //check for description must be last { if ((newDescription == oldDescription) && (newDescription != string.Empty) ) { return true; //Description is matching } } if (!useNumbers && !useName && !useDescription) { return true; //enables the user to skip just for identical title if nothing is checked, skip repeated checkbox still needed } return false; //no unique matches or mismatches do not know } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
TV Server Plugin: TvWishList
Contact us
RSS
Top
Bottom