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
Support
Electronic Program Guide
xmlTV
TVServer Import error episode-num field
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="mbb" data-source="post: 261609" data-attributes="member: 10503"><p>Ok I take time to run it in debug mode and I found the problem <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> ... and the the solution</p><p></p><p>in XMLTVImport.cs the code doesnt work for this example 3..38/40 because it presume that p as only one digit, but 38 have 2 digits <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p>we have to replace</p><p>[code] </p><p>int p = 0;</p><p>int t = 0;</p><p>if (Convert.ToInt32(episodePart.Substring(0, 1)) == 0)</p><p>{</p><p> p = Convert.ToInt32(episodePart.Substring(0, 1)) + 1;</p><p>}</p><p>else</p><p>{</p><p> p = Convert.ToInt32(episodePart.Substring(0, 1));</p><p>}</p><p>t = Convert.ToInt32(episodePart.Substring(2, 1));</p><p>episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);[/code] </p><p></p><p>by</p><p>[code] </p><p>int p = 0;</p><p>int t = 0;</p><p>if (Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) == 0)</p><p>{</p><p> p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) + 1;</p><p>}</p><p>else</p><p>{</p><p> p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0)));</p><p>}</p><p>t = Convert.ToInt32(episodePart.Substring(episodePart.IndexOf("/", 0) + 1, episodePart.Length - episodePart.IndexOf("/", 0) + 1)));</p><p>episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);[/code]</p></blockquote><p></p>
[QUOTE="mbb, post: 261609, member: 10503"] Ok I take time to run it in debug mode and I found the problem :) ... and the the solution in XMLTVImport.cs the code doesnt work for this example 3..38/40 because it presume that p as only one digit, but 38 have 2 digits ;) we have to replace [code] int p = 0; int t = 0; if (Convert.ToInt32(episodePart.Substring(0, 1)) == 0) { p = Convert.ToInt32(episodePart.Substring(0, 1)) + 1; } else { p = Convert.ToInt32(episodePart.Substring(0, 1)); } t = Convert.ToInt32(episodePart.Substring(2, 1)); episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);[/code] by [code] int p = 0; int t = 0; if (Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) == 0) { p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))) + 1; } else { p = Convert.ToInt32(episodePart.Substring(0, episodePart.IndexOf("/", 0))); } t = Convert.ToInt32(episodePart.Substring(episodePart.IndexOf("/", 0) + 1, episodePart.Length - episodePart.IndexOf("/", 0) + 1))); episodePart = Convert.ToString(p) + "/" + Convert.ToString(t);[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Electronic Program Guide
xmlTV
TVServer Import error episode-num field
Contact us
RSS
Top
Bottom