@@ -1550,11 +1550,10 @@ void EITFixUp::FixRTL(DBEventEIT &event) const
1550
1550
/* if we do not have an episode title by now try some guessing as last resort */
1551
1551
if (event.subtitle .length () == 0 )
1552
1552
{
1553
- int position;
1554
1553
const uint SUBTITLE_PCT = 35 ; // % of description to allow subtitle up to
1555
1554
const uint SUBTITLE_MAX_LEN = 50 ; // max length of subtitle field in db
1556
1555
1557
- if ((position = tmpExp1.indexIn (event.description ) ) != -1 )
1556
+ if (tmpExp1.indexIn (event.description ) != -1 )
1558
1557
{
1559
1558
uint tmpExp1Len = tmpExp1.cap (1 ).length ();
1560
1559
uint evDescLen = max (event.description .length (), 1 );
@@ -1733,34 +1732,33 @@ void EITFixUp::FixNL(DBEventEIT &event) const
1733
1732
}
1734
1733
1735
1734
// Get stereo info
1736
- int position;
1737
- if ((position = fullinfo.indexOf (m_Stereo)) != -1 )
1735
+ if (fullinfo.indexOf (m_Stereo) != -1 )
1738
1736
{
1739
1737
event.audioProps |= AUD_STEREO;
1740
1738
fullinfo = fullinfo.replace (m_Stereo, " ." );
1741
1739
}
1742
1740
1743
1741
// Get widescreen info
1744
- if ((position = fullinfo.indexOf (m_nlWide) ) != -1 )
1742
+ if (fullinfo.indexOf (m_nlWide) != -1 )
1745
1743
{
1746
1744
fullinfo = fullinfo.replace (" breedbeeld" , " ." );
1747
1745
}
1748
1746
1749
1747
// Get repeat info
1750
- if ((position = fullinfo.indexOf (m_nlRepeat) ) != -1 )
1748
+ if (fullinfo.indexOf (m_nlRepeat) != -1 )
1751
1749
{
1752
1750
fullinfo = fullinfo.replace (" herh." , " ." );
1753
1751
}
1754
1752
1755
1753
// Get teletext subtitle info
1756
- if ((position = fullinfo.indexOf (m_nlTxt) ) != -1 )
1754
+ if (fullinfo.indexOf (m_nlTxt) != -1 )
1757
1755
{
1758
1756
event.subtitleType |= SUB_NORMAL;
1759
1757
fullinfo = fullinfo.replace (" txt" , " ." );
1760
1758
}
1761
1759
1762
1760
// Get HDTV information
1763
- if ((position = event.title .indexOf (m_nlHD) ) != -1 )
1761
+ if (event.title .indexOf (m_nlHD) != -1 )
1764
1762
{
1765
1763
event.videoProps |= VID_HDTV;
1766
1764
event.title = event.title .replace (m_nlHD, " " );
@@ -1791,6 +1789,7 @@ void EITFixUp::FixNL(DBEventEIT &event) const
1791
1789
1792
1790
// This is trying to catch the case where the subtitle is in the main title
1793
1791
// but avoid cases where it isn't a subtitle e.g cd:uk
1792
+ int position;
1794
1793
if (((position = event.title .indexOf (" :" )) != -1 ) &&
1795
1794
(event.title [position + 1 ].toUpper () == event.title [position + 1 ]) &&
1796
1795
(event.subtitle .isEmpty ()))
@@ -1833,15 +1832,15 @@ void EITFixUp::FixNL(DBEventEIT &event) const
1833
1832
// Try to find year
1834
1833
QRegExp tmpYear1 = m_nlYear1;
1835
1834
QRegExp tmpYear2 = m_nlYear2;
1836
- if ((position = tmpYear1.indexIn (fullinfo) ) != -1 )
1835
+ if (tmpYear1.indexIn (fullinfo) != -1 )
1837
1836
{
1838
1837
bool ok;
1839
1838
uint y = tmpYear1.cap (0 ).toUInt (&ok);
1840
1839
if (ok)
1841
1840
event.originalairdate = QDate (y, 1 , 1 );
1842
1841
}
1843
1842
1844
- if ((position = tmpYear2.indexIn (fullinfo) ) != -1 )
1843
+ if (tmpYear2.indexIn (fullinfo) != -1 )
1845
1844
{
1846
1845
bool ok;
1847
1846
uint y = tmpYear2.cap (2 ).toUInt (&ok);
@@ -1852,26 +1851,26 @@ void EITFixUp::FixNL(DBEventEIT &event) const
1852
1851
// Try to find director
1853
1852
QRegExp tmpDirector = m_nlDirector;
1854
1853
QString tmpDirectorString;
1855
- if ((position = fullinfo.indexOf (m_nlDirector) ) != -1 )
1854
+ if (fullinfo.indexOf (m_nlDirector) != -1 )
1856
1855
{
1857
1856
tmpDirectorString = tmpDirector.cap (0 );
1858
1857
event.AddPerson (DBPerson::kDirector , tmpDirectorString);
1859
1858
}
1860
1859
1861
1860
// Strip leftovers
1862
- if ((position = fullinfo.indexOf (m_nlRub) ) != -1 )
1861
+ if (fullinfo.indexOf (m_nlRub) != -1 )
1863
1862
{
1864
1863
fullinfo = fullinfo.replace (m_nlRub, " " );
1865
1864
}
1866
1865
1867
1866
// Strip category info from description
1868
- if ((position = fullinfo.indexOf (m_nlCat) ) != -1 )
1867
+ if (fullinfo.indexOf (m_nlCat) != -1 )
1869
1868
{
1870
1869
fullinfo = fullinfo.replace (m_nlCat, " " );
1871
1870
}
1872
1871
1873
1872
// Remove omroep from title
1874
- if ((position = event.title .indexOf (m_nlOmroep) ) != -1 )
1873
+ if (event.title .indexOf (m_nlOmroep) != -1 )
1875
1874
{
1876
1875
event.title = event.title .replace (m_nlOmroep, " " );
1877
1876
}
@@ -1929,33 +1928,30 @@ void EITFixUp::FixNO(DBEventEIT &event) const
1929
1928
*/
1930
1929
void EITFixUp::FixNRK_DVBT (DBEventEIT &event) const
1931
1930
{
1932
- int position;
1933
1931
QRegExp tmpExp1;
1934
1932
// Check for "title (R)" in the title
1935
- position = event.title .indexOf (m_noRerun);
1936
- if (position != -1 )
1933
+ if (event.title .indexOf (m_noRerun) != -1 )
1937
1934
{
1938
1935
event.previouslyshown = true ;
1939
1936
event.title = event.title .replace (m_noRerun, " " );
1940
1937
}
1941
1938
// Check for "(R)" in the description
1942
- position = event.description .indexOf (m_noRerun);
1943
- if (position != -1 )
1939
+ if (event.description .indexOf (m_noRerun) != -1 )
1944
1940
{
1945
1941
event.previouslyshown = true ;
1946
1942
}
1947
1943
// Move colon separated category from program-titles into description
1948
1944
// Have seen "NRK2s historiekveld: Film: bla-bla"
1949
1945
tmpExp1 = m_noNRKCategories;
1950
- while (((position = tmpExp1.indexIn (event.title ) ) != -1 ) &&
1946
+ while ((tmpExp1.indexIn (event.title ) != -1 ) &&
1951
1947
(tmpExp1.cap (2 ).length () > 1 ))
1952
1948
{
1953
1949
event.title = tmpExp1.cap (2 );
1954
1950
event.description = " (" + tmpExp1.cap (1 ) + " ) " + event.description ;
1955
1951
}
1956
1952
// Remove season premiere markings
1957
1953
tmpExp1 = m_noPremiere;
1958
- if ((position = tmpExp1.indexIn (event.title )) >=3 )
1954
+ if (tmpExp1.indexIn (event.title ) >= 3 )
1959
1955
{
1960
1956
event.title .remove (m_noPremiere);
1961
1957
}
@@ -1965,7 +1961,7 @@ void EITFixUp::FixNRK_DVBT(DBEventEIT &event) const
1965
1961
!event.title .startsWith (" CD:" ) &&
1966
1962
!event.title .startsWith (" Distriktsnyheter: fra" ))
1967
1963
{
1968
- if ((position = tmpExp1.indexIn (event.title ) ) != -1 )
1964
+ if (tmpExp1.indexIn (event.title ) != -1 )
1969
1965
{
1970
1966
1971
1967
if (event.subtitle .length () <= 0 )
0 commit comments