add support for writing python strings directly
[enigma2.git] / lib / service / servicedvb.cpp
index 2d770fb05eb2486bcce401a284a106af238859b2..a8485fa4888c9cd4a7d6f706b3934fb8f2601e1a 100644 (file)
@@ -809,7 +809,7 @@ PyObject *eDVBServiceList::getContent(const char* format, bool sorted)
                                                        sptr->getName(ref, name);
 
                                                        // filter short name brakets
-                                                       unsigned int pos;
+                                                       size_t pos;
                                                        while((pos = name.find("\xc2\x86")) != std::string::npos)
                                                                name.erase(pos,2);
                                                        while((pos = name.find("\xc2\x87")) != std::string::npos)
@@ -2563,7 +2563,16 @@ void eDVBServicePlay::cutlistToCuesheet()
                        }
                }
                
-               if (in != out)
+               if (in < 0)
+                       in = 0;
+               if (out < 0)
+                       out = 0;
+               if (in > length)
+                       in = length;
+               if (out > length)
+                       out = length;
+               
+               if (in < out)
                        m_cue->addSourceSpan(in, out);
                
                in = length;