Commits

Jason R. Coombs  committed 9be906a

Movie index now uses a link to the IMDB application.
Fixed response encoding.

  • Participants
  • Parent commits 5c143eb
  • Tags 1.1

Comments (0)

Files changed (1)

File jaraco/media/index.py

 
 	@property
 	def link(self):
+		return 'http://www.imdb.com/find?s=all&'+self.search
+
+	@property
+	def search(self):
 		q = urllib.urlencode(dict(q=self.title))
-		return 'http://www.imdb.com/find?s=all&'+q
+		return q
 
 class Index(object):
 	root = r'\\drake\videos\movies'
 class Site:
 	@cherrypy.expose
 	def index(self):
+		cherrypy.response.headers['Content-Type'] = 'application/xhtml+xml'
 		template = self.get_template()
 		not_watched = lambda m: m.class_ != 'watched'
 		movies = Index(filter=not_watched)
 
 <ul py:for="movie in movies" class="pageitem">
 	<li class="menu">
-		<a href="${movie.link}">
+		<a href="imdb:///find?${movie.search}">
 			<img alt="Description" src="/iweb/thumbs/video.png" />
 			<span class="name">
 				<span py:replace="movie.title">Movie Title</span>