[cineoob] search torrent from movie detail
This commit is contained in:
parent
c76db754e9
commit
d4c231cf42
3 changed files with 54 additions and 5 deletions
|
|
@ -141,7 +141,7 @@ class MainWindow(QtMainWindow):
|
|||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search movie results for "%s"'%pattern,self.searchMovieAction,[pattern])
|
||||
self.doAction(u'Search movie "%s"'%pattern,self.searchMovieAction,[pattern])
|
||||
|
||||
def searchMovieAction(self,pattern):
|
||||
self.ui.stackedWidget.setCurrentWidget(self.ui.list_page)
|
||||
|
|
@ -181,7 +181,7 @@ class MainWindow(QtMainWindow):
|
|||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search person results for "%s"'%pattern,self.searchPersonAction,[pattern])
|
||||
self.doAction(u'Search person "%s"'%pattern,self.searchPersonAction,[pattern])
|
||||
|
||||
def searchPersonAction(self,pattern):
|
||||
self.ui.stackedWidget.setCurrentWidget(self.ui.list_page)
|
||||
|
|
@ -221,7 +221,7 @@ class MainWindow(QtMainWindow):
|
|||
pattern = unicode(self.ui.searchEdit.text())
|
||||
if not pattern:
|
||||
return
|
||||
self.doAction(u'Search torrent for "%s"'%pattern,self.searchTorrentAction,[pattern])
|
||||
self.doAction(u'Search torrent "%s"'%pattern,self.searchTorrentAction,[pattern])
|
||||
|
||||
def searchTorrentAction(self,pattern):
|
||||
self.ui.stackedWidget.setCurrentWidget(self.ui.list_page)
|
||||
|
|
@ -230,7 +230,7 @@ class MainWindow(QtMainWindow):
|
|||
mini.hide()
|
||||
mini.deleteLater()
|
||||
|
||||
self.mini = []
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class Movie(QFrame):
|
|||
self.ui.setupUi(self)
|
||||
|
||||
self.connect(self.ui.castingButton, SIGNAL("clicked()"), self.casting)
|
||||
self.connect(self.ui.torrentButton, SIGNAL("clicked()"), self.searchTorrent)
|
||||
|
||||
self.movie = movie
|
||||
self.ui.titleLabel.setText(movie.original_title)
|
||||
|
|
@ -56,6 +57,13 @@ class Movie(QFrame):
|
|||
img = QImage.fromData(data)
|
||||
self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))
|
||||
|
||||
def searchTorrent(self):
|
||||
tosearch = self.movie.original_title
|
||||
if self.movie.release_date != NotAvailable:
|
||||
tosearch += ' %s'%self.movie.release_date.year
|
||||
desc = 'Search torrents for "%s"'%tosearch
|
||||
self.parent.doAction(desc, self.parent.searchTorrentAction,[tosearch])
|
||||
|
||||
def casting(self):
|
||||
role = None
|
||||
tosearch = self.ui.castingCombo.currentText()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>434</width>
|
||||
<width>629</width>
|
||||
<height>552</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
@ -92,6 +92,47 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_12">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QPushButton" name="torrentButton">
|
||||
<property name="text">
|
||||
<string>search torrents</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_11">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="QPushButton" name="subtitleButton">
|
||||
<property name="text">
|
||||
<string>search subtitles</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="langCombo"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue