Griffith - media collection manager
May 21, 2012, 08:01:13 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please check ask.griffith.cc and wiki.griffith.cc before asking questions.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: [SOLVED] OFDb Plugin didnt work for me  (Read 863 times)
Jessica
Newbie
*
Offline Offline

Posts: 35


View Profile
« on: December 04, 2006, 06:25:21 AM »

with a little change its working for me now

Quote
--- PluginMovieOFDb.py  2006-12-04 04:55:13.000000000 +0100
+++ PluginMovieOFDb.py  2006-12-04 06:11:17.000000000 +0100
@@ -121,6 +121,6 @@ class SearchPlugin(movie.SearchMovie):

                if (elements[0]<>''):
                        for element in elements:
-                               self.ids.append(gutils.trim(element,"<a href='view.php?page=film&fid=","'>"))
+                               self.ids.append(gutils.trim(element,"<a href=\"view.php?page=film&fid=","\">"))
                                self.titles.append(gutils.trim(element,">","</a>"))
« Last Edit: December 04, 2006, 10:50:37 AM by POX » Logged
POX
Administrator
Hero Member
*****
Offline Offline

Posts: 512



View Profile WWW
« Reply #1 on: December 04, 2006, 10:50:09 AM »

commited, thanks!
Logged

Please, feel free to correct my English.
Jessica
Newbie
*
Offline Offline

Posts: 35


View Profile
« Reply #2 on: December 04, 2006, 07:06:03 PM »

i did some more changes

1. Full Actor List
2. Title != Original Title ... its now showing the correct Title and not two times the same name
3. i didnt like the ending "," char in the actors list and genre and removed it
4. actors are with capitals now (was in before but didnt work right)

diff file
Quote
--- PluginMovieOFDb.py.svn      2006-12-04 18:49:55.000000000 +0100
+++ PluginMovieOFDb.py  2006-12-04 19:02:04.000000000 +0100
@@ -19,7 +19,7 @@ class Plugin(movie.Movie):
        def __init__(self, id):
                self.encode='iso-8859-1'
                self.movie_id = id
-               self.url = "http://www.ofdb.de/view.php?page=film&fid=" + str(self.movie_id)
+               self.url = "http://www.ofdb.de/view.php?page=film&fid=" + str(self.movie_id) + "&full=1"

        def picture(self):
                self.picture_url = "http://www.ofdb.de/images/film/" + gutils.trim( self.page, "<img src=\"images/film/", "\"" )
@@ -34,7 +34,7 @@ class Plugin(movie.Movie):
             <td width="99%"><font face="Arial,Helvetica,sans-serif" size="2" class="Daten"><b>""","<") )

        def title(self):
-               self.title = self.original_title
+               self.title = gutils.trim(self.page,"size=\"3\"><b>","<")

        def director(self):
                self.director = gutils.trim(self.page,"""Regie:
@@ -62,7 +62,8 @@ class Plugin(movie.Movie):
             <td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Daten"><b>""","</b></font></td>")
                self.genre = string.replace( self.genre, "<br>", ", " )
                self.genre = string.replace( self.genre, "/", ", " )
-               self.genre = string.capwords(self.genre)
+               self.genre = self.genre[0:-2]
+               string.capwords(self.genre)

        def with(self):
                self.with = ""
@@ -72,6 +73,7 @@ class Plugin(movie.Movie):
             <td><font face="Arial,Helvetica,sans-serif" size="2" class="Daten"><b>""","</b></font></td>")
                self.with = string.replace(self.with,"</a><br>", ", ")
                self.with = string.strip(gutils.strip_tags(self.with))
+               self.with = self.with[0:-1]

        def classification(self):
                self.classification = gutils.trim(self.page,"MPAA</a>:</b> ",".<br>")

for the full story line (self.plot) i have to fetch a new site from ofdb.de
how can i do this in the plugin?

have fun
jessica
Logged
POX
Administrator
Hero Member
*****
Offline Offline

Posts: 512



View Profile WWW
« Reply #3 on: December 04, 2006, 08:29:28 PM »

i did some more changes
committed, thanks again! I have a tiny request, could you send your patches to griffith-devel mailing list (as attachments)?

Quote
for the full story line (self.plot) i have to fetch a new site from ofdb.de
how can i do this in the plugin?

See PluginMovieKinoDe.py file (it's a temporary solution, we need to figure something easier than that...)
Logged

Please, feel free to correct my English.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!