[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
|
||||
|
||||
def iter_subtitles(self,language, pattern):
|
||||
pattern = pattern.strip().replace('+',' ')
|
||||
pattern = pattern.strip().replace('+',' ').lower()
|
||||
pattern_words = pattern.split()
|
||||
tab = self.parser.select(self.document.getroot(),'table[bordercolor="#B8C0B2"]')
|
||||
if len(tab) == 0:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
from weboob.tools.test import BackendTest
|
||||
|
||||
import urllib
|
||||
from random import choice
|
||||
|
||||
class TvsubtitlesTest(BackendTest):
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class MainWindow(QtMainWindow):
|
|||
self.searchSubtitle()
|
||||
|
||||
def searchMovie(self):
|
||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
||||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search movie "%s"'%pattern,self.searchMovieAction,[pattern])
|
||||
|
|
@ -203,7 +203,7 @@ class MainWindow(QtMainWindow):
|
|||
QApplication.restoreOverrideCursor()
|
||||
|
||||
def searchPerson(self):
|
||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
||||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search person "%s"'%pattern,self.searchPersonAction,[pattern])
|
||||
|
|
@ -246,7 +246,7 @@ class MainWindow(QtMainWindow):
|
|||
QApplication.restoreOverrideCursor()
|
||||
|
||||
def searchTorrent(self):
|
||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
||||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search torrent "%s"'%pattern,self.searchTorrentAction,[pattern])
|
||||
|
|
@ -288,7 +288,7 @@ class MainWindow(QtMainWindow):
|
|||
self.current_info_widget = wtorrent
|
||||
|
||||
def searchSubtitle(self):
|
||||
pattern = unicode(self.ui.searchEdit.text()).lower()
|
||||
pattern = unicode(self.ui.searchEdit.text())
|
||||
lang = unicode(self.ui.langCombo.currentText())
|
||||
if not pattern:
|
||||
return
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Movie(QFrame):
|
|||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
||||
|
||||
def searchSubtitle(self):
|
||||
tosearch = unicode(self.movie.original_title).lower()
|
||||
tosearch = unicode(self.movie.original_title)
|
||||
lang = unicode(self.ui.langCombo.currentText())
|
||||
desc = 'Search subtitles for "%s" (lang:%s)'%(tosearch,lang)
|
||||
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 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):
|
||||
def __init__(self, subtitle, backend, parent=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue