[qcineoob] maybe better that backends handle capital letters
This commit is contained in:
parent
fe0b3b23de
commit
1c7e7b9dec
5 changed files with 7 additions and 8 deletions
|
|
@ -69,7 +69,7 @@ class SubtitlesPage(BasePage):
|
||||||
return subtitle
|
return subtitle
|
||||||
|
|
||||||
def iter_subtitles(self,language, pattern):
|
def iter_subtitles(self,language, pattern):
|
||||||
pattern = pattern.strip().replace('+',' ')
|
pattern = pattern.strip().replace('+',' ').lower()
|
||||||
pattern_words = pattern.split()
|
pattern_words = pattern.split()
|
||||||
tab = self.parser.select(self.document.getroot(),'table[bordercolor="#B8C0B2"]')
|
tab = self.parser.select(self.document.getroot(),'table[bordercolor="#B8C0B2"]')
|
||||||
if len(tab) == 0:
|
if len(tab) == 0:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
from weboob.tools.test import BackendTest
|
from weboob.tools.test import BackendTest
|
||||||
|
|
||||||
import urllib
|
|
||||||
from random import choice
|
from random import choice
|
||||||
|
|
||||||
class TvsubtitlesTest(BackendTest):
|
class TvsubtitlesTest(BackendTest):
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ class MainWindow(QtMainWindow):
|
||||||
self.searchSubtitle()
|
self.searchSubtitle()
|
||||||
|
|
||||||
def searchMovie(self):
|
def searchMovie(self):
|
||||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
pattern = unicode(self.ui.searchEdit.text())
|
||||||
if not pattern:
|
if not pattern:
|
||||||
return
|
return
|
||||||
self.doAction(u'Search movie "%s"'%pattern,self.searchMovieAction,[pattern])
|
self.doAction(u'Search movie "%s"'%pattern,self.searchMovieAction,[pattern])
|
||||||
|
|
@ -203,7 +203,7 @@ class MainWindow(QtMainWindow):
|
||||||
QApplication.restoreOverrideCursor()
|
QApplication.restoreOverrideCursor()
|
||||||
|
|
||||||
def searchPerson(self):
|
def searchPerson(self):
|
||||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
pattern = unicode(self.ui.searchEdit.text())
|
||||||
if not pattern:
|
if not pattern:
|
||||||
return
|
return
|
||||||
self.doAction(u'Search person "%s"'%pattern,self.searchPersonAction,[pattern])
|
self.doAction(u'Search person "%s"'%pattern,self.searchPersonAction,[pattern])
|
||||||
|
|
@ -246,7 +246,7 @@ class MainWindow(QtMainWindow):
|
||||||
QApplication.restoreOverrideCursor()
|
QApplication.restoreOverrideCursor()
|
||||||
|
|
||||||
def searchTorrent(self):
|
def searchTorrent(self):
|
||||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
pattern = unicode(self.ui.searchEdit.text())
|
||||||
if not pattern:
|
if not pattern:
|
||||||
return
|
return
|
||||||
self.doAction(u'Search torrent "%s"'%pattern,self.searchTorrentAction,[pattern])
|
self.doAction(u'Search torrent "%s"'%pattern,self.searchTorrentAction,[pattern])
|
||||||
|
|
@ -288,7 +288,7 @@ class MainWindow(QtMainWindow):
|
||||||
self.current_info_widget = wtorrent
|
self.current_info_widget = wtorrent
|
||||||
|
|
||||||
def searchSubtitle(self):
|
def searchSubtitle(self):
|
||||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
pattern = unicode(self.ui.searchEdit.text())
|
||||||
lang = unicode(self.ui.langCombo.currentText())
|
lang = unicode(self.ui.langCombo.currentText())
|
||||||
if not pattern:
|
if not pattern:
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class Movie(QFrame):
|
||||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
||||||
|
|
||||||
def searchSubtitle(self):
|
def searchSubtitle(self):
|
||||||
tosearch = unicode(self.movie.original_title).lower()
|
tosearch = unicode(self.movie.original_title)
|
||||||
lang = unicode(self.ui.langCombo.currentText())
|
lang = unicode(self.ui.langCombo.currentText())
|
||||||
desc = 'Search subtitles for "%s" (lang:%s)'%(tosearch,lang)
|
desc = 'Search subtitles for "%s" (lang:%s)'%(tosearch,lang)
|
||||||
self.parent.doAction(desc, self.parent.searchSubtitleAction,[lang,tosearch])
|
self.parent.doAction(desc, self.parent.searchSubtitleAction,[lang,tosearch])
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ from PyQt4.QtCore import Qt,SIGNAL
|
||||||
from PyQt4.QtGui import QFrame, QFileDialog
|
from PyQt4.QtGui import QFrame, QFileDialog
|
||||||
|
|
||||||
from weboob.applications.qcineoob.ui.subtitle_ui import Ui_Subtitle
|
from weboob.applications.qcineoob.ui.subtitle_ui import Ui_Subtitle
|
||||||
from weboob.capabilities.base import NotAvailable, NotLoaded
|
from weboob.capabilities.base import NotAvailable
|
||||||
|
|
||||||
class Subtitle(QFrame):
|
class Subtitle(QFrame):
|
||||||
def __init__(self, subtitle, backend, parent=None):
|
def __init__(self, subtitle, backend, parent=None):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue