<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Video thumbnails for MythTV</title>
	<atom:link href="http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv</link>
	<description>scratched tallies on the prison wall</description>
	<pubDate>Mon, 01 Dec 2008 21:45:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: https://launchpad.net/~mthaddon</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109350</link>
		<dc:creator>https://launchpad.net/~mthaddon</dc:creator>
		<pubDate>Tue, 18 Mar 2008 20:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109350</guid>
		<description>Here's&#160;a&#160;diff&#160;that&#160;captures&#160;the&#160;error&#160;output&#160;(in&#160;my&#160;case,&#160;I&#160;was&#160;having&#160;a&#160;problem&#160;where&#160;I&#160;hadn't&#160;installed&#160;certain&#160;codecs&#160;in&#160;totem,&#160;so&#160;it&#160;couldn't&#160;capture&#160;the&#160;thumbnail)&#160;and&#160;displays&#160;them&#160;(and&#160;doesn't&#160;update&#160;the&#160;DB&#160;unless&#160;there's&#160;no&#160;error).


===&#160;modified&#160;file&#160;'covers_for_missing.py'
---&#160;covers_for_missing.py&#160;&#160;&#160;&#160;&#160;&#160;&#160;2008-03-18&#160;19:05:17&#160;+0000
+++&#160;covers_for_missing.py&#160;&#160;&#160;&#160;&#160;&#160;&#160;2008-03-18&#160;19:11:58&#160;+0000
@@&#160;-1,5&#160;+1,9&#160;@@
&#160;#!/usr/bin/python
-import&#160;MySQLdb,&#160;os,&#160;re
+
+import&#160;os
+import&#160;re
+import&#160;commands
+import&#160;MySQLdb
&#160;
&#160;if&#160;not&#160;os.path.exists("/usr/bin/totem-video-thumbnailer"):
&#160;&#160;&#160;raise&#160;"This&#160;script&#160;requires&#160;totem-video-thumbnailer"
@@&#160;-26,7&#160;+30,7&#160;@@
&#160;crs.execute(sql)
&#160;VIDEO_DIR&#160;=&#160;crs.fetchone()[0]
&#160;#&#160;get&#160;all&#160;files&#160;without&#160;covers
-cmd&#160;=&#160;'totem-video-thumbnailer&#160;-j&#160;-s&#160;600&#160;"%s"&#160;"%s"&#160;&#62;/dev/null&#160;2&#62;&#38;1'
+cmd&#160;=&#160;'totem-video-thumbnailer&#160;-j&#160;-s&#160;600&#160;"%s"&#160;"%s"'
&#160;sql&#160;=&#160;"select&#160;intid,&#160;filename&#160;from&#160;videometadata&#160;where&#160;coverfile&#160;=&#160;'No&#160;Cover';"
&#160;crs.execute(sql)
&#160;VIDEOS&#160;=&#160;[]
@@&#160;-42,8&#160;+46,11&#160;@@
&#160;&#160;&#160;else:
&#160;&#160;&#160;&#160;&#160;cmd_exec&#160;=&#160;cmd&#160;%&#160;(filename,&#160;full_output)
&#160;&#160;&#160;&#160;&#160;print&#160;"Thumbnailing",&#160;os.path.split(filename)[1]
-&#160;&#160;&#160;&#160;os.system(cmd_exec)
-&#160;&#160;&#160;&#160;VIDEOS.append((intid,full_output))
+&#160;&#160;&#160;&#160;status,&#160;output&#160;=&#160;commands.getstatusoutput(cmd_exec)
+&#160;&#160;&#160;&#160;if&#160;not&#160;status:
+&#160;&#160;&#160;&#160;&#160;&#160;VIDEOS.append((intid,full_output))
+&#160;&#160;&#160;&#160;else:
+&#160;&#160;&#160;&#160;&#160;&#160;print&#160;status,&#160;output,&#160;cmd_exec
&#160;
&#160;sql&#160;=&#160;"update&#160;videometadata&#160;set&#160;coverfile&#160;=&#160;%s&#160;where&#160;intid&#160;=&#160;%s&#160;limit&#160;1;"
&#160;for&#160;intid,&#160;thumbnail&#160;in&#160;VIDEOS:

</description>
		<content:encoded><![CDATA[<p>Here&#8217;s&nbsp;a&nbsp;diff&nbsp;that&nbsp;captures&nbsp;the&nbsp;error&nbsp;output&nbsp;(in&nbsp;my&nbsp;case,&nbsp;I&nbsp;was&nbsp;having&nbsp;a&nbsp;problem&nbsp;where&nbsp;I&nbsp;hadn&#8217;t&nbsp;installed&nbsp;certain&nbsp;codecs&nbsp;in&nbsp;totem,&nbsp;so&nbsp;it&nbsp;couldn&#8217;t&nbsp;capture&nbsp;the&nbsp;thumbnail)&nbsp;and&nbsp;displays&nbsp;them&nbsp;(and&nbsp;doesn&#8217;t&nbsp;update&nbsp;the&nbsp;DB&nbsp;unless&nbsp;there&#8217;s&nbsp;no&nbsp;error).</p>
<p>===&nbsp;modified&nbsp;file&nbsp;&#8217;covers_for_missing.py&#8217;<br />
&#8212;&nbsp;covers_for_missing.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2008-03-18&nbsp;19:05:17&nbsp;+0000<br />
+++&nbsp;covers_for_missing.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2008-03-18&nbsp;19:11:58&nbsp;+0000<br />
@@&nbsp;-1,5&nbsp;+1,9&nbsp;@@<br />
&nbsp;#!/usr/bin/python<br />
-import&nbsp;MySQLdb,&nbsp;os,&nbsp;re<br />
+<br />
+import&nbsp;os<br />
+import&nbsp;re<br />
+import&nbsp;commands<br />
+import&nbsp;MySQLdb<br />
&nbsp;<br />
&nbsp;if&nbsp;not&nbsp;os.path.exists(&#8221;/usr/bin/totem-video-thumbnailer&#8221;):<br />
&nbsp;&nbsp;&nbsp;raise&nbsp;&#8221;This&nbsp;script&nbsp;requires&nbsp;totem-video-thumbnailer&#8221;<br />
@@&nbsp;-26,7&nbsp;+30,7&nbsp;@@<br />
&nbsp;crs.execute(sql)<br />
&nbsp;VIDEO_DIR&nbsp;=&nbsp;crs.fetchone()[0]<br />
&nbsp;#&nbsp;get&nbsp;all&nbsp;files&nbsp;without&nbsp;covers<br />
-cmd&nbsp;=&nbsp;&#8217;totem-video-thumbnailer&nbsp;-j&nbsp;-s&nbsp;600&nbsp;&#8221;%s&#8221;&nbsp;&#8221;%s&#8221;&nbsp;&gt;/dev/null&nbsp;2&gt;&amp;1&#8242;<br />
+cmd&nbsp;=&nbsp;&#8217;totem-video-thumbnailer&nbsp;-j&nbsp;-s&nbsp;600&nbsp;&#8221;%s&#8221;&nbsp;&#8221;%s&#8221;&#8216;<br />
&nbsp;sql&nbsp;=&nbsp;&#8221;select&nbsp;intid,&nbsp;filename&nbsp;from&nbsp;videometadata&nbsp;where&nbsp;coverfile&nbsp;=&nbsp;&#8217;No&nbsp;Cover&#8217;;&#8221;<br />
&nbsp;crs.execute(sql)<br />
&nbsp;VIDEOS&nbsp;=&nbsp;[]<br />
@@&nbsp;-42,8&nbsp;+46,11&nbsp;@@<br />
&nbsp;&nbsp;&nbsp;else:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd_exec&nbsp;=&nbsp;cmd&nbsp;%&nbsp;(filename,&nbsp;full_output)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&#8221;Thumbnailing&#8221;,&nbsp;os.path.split(filename)[1]<br />
-&nbsp;&nbsp;&nbsp;&nbsp;os.system(cmd_exec)<br />
-&nbsp;&nbsp;&nbsp;&nbsp;VIDEOS.append((intid,full_output))<br />
+&nbsp;&nbsp;&nbsp;&nbsp;status,&nbsp;output&nbsp;=&nbsp;commands.getstatusoutput(cmd_exec)<br />
+&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;not&nbsp;status:<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIDEOS.append((intid,full_output))<br />
+&nbsp;&nbsp;&nbsp;&nbsp;else:<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;status,&nbsp;output,&nbsp;cmd_exec<br />
&nbsp;<br />
&nbsp;sql&nbsp;=&nbsp;&#8221;update&nbsp;videometadata&nbsp;set&nbsp;coverfile&nbsp;=&nbsp;%s&nbsp;where&nbsp;intid&nbsp;=&nbsp;%s&nbsp;limit&nbsp;1;&#8221;<br />
&nbsp;for&nbsp;intid,&nbsp;thumbnail&nbsp;in&nbsp;VIDEOS:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109309</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Mon, 17 Mar 2008 12:43:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109309</guid>
		<description>mat: should just work, as far as I am aware.</description>
		<content:encoded><![CDATA[<p>mat: should just work, as far as I am aware.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mat</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109299</link>
		<dc:creator>mat</dc:creator>
		<pubDate>Mon, 17 Mar 2008 08:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-109299</guid>
		<description>Do I have to change passwords aor anything? Yunno, alter the script in any way - or just run it?</description>
		<content:encoded><![CDATA[<p>Do I have to change passwords aor anything? Yunno, alter the script in any way - or just run it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107859</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Mon, 18 Feb 2008 10:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107859</guid>
		<description>hads: ooh, that's rather cool. I like the sound of those!</description>
		<content:encoded><![CDATA[<p>hads: ooh, that&#8217;s rather cool. I like the sound of those!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hads</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107858</link>
		<dc:creator>hads</dc:creator>
		<pubDate>Mon, 18 Feb 2008 10:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107858</guid>
		<description>Just so you know there are some Python bindings in MythTV now which make writing little scripts like this easier. They handle connecting to the myth backend and database getting settings etc. They will be included in the upcoming 0.21 release.</description>
		<content:encoded><![CDATA[<p>Just so you know there are some Python bindings in MythTV now which make writing little scripts like this easier. They handle connecting to the myth backend and database getting settings etc. They will be included in the upcoming 0.21 release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107530</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 11 Feb 2008 17:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107530</guid>
		<description>.</description>
		<content:encoded><![CDATA[<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107529</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 11 Feb 2008 17:32:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107529</guid>
		<description>.</description>
		<content:encoded><![CDATA[<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sil</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107483</link>
		<dc:creator>sil</dc:creator>
		<pubDate>Mon, 11 Feb 2008 12:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107483</guid>
		<description>Thom: that'd require MythTV itself to do some of the work, I think. Hm...I wonder if animated gifs would work?</description>
		<content:encoded><![CDATA[<p>Thom: that&#8217;d require MythTV itself to do some of the work, I think. Hm&#8230;I wonder if animated gifs would work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thom</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107476</link>
		<dc:creator>Thom</dc:creator>
		<pubDate>Mon, 11 Feb 2008 09:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107476</guid>
		<description>What would be cool is if you could get moving thumbnails ala youporn.com (best example I could think of!), I imagine this wouldn't be much harder to do</description>
		<content:encoded><![CDATA[<p>What would be cool is if you could get moving thumbnails ala youporn.com (best example I could think of!), I imagine this wouldn&#8217;t be much harder to do</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elzapp</title>
		<link>http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107474</link>
		<dc:creator>Elzapp</dc:creator>
		<pubDate>Mon, 11 Feb 2008 07:57:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.kryogenix.org/days/2008/02/11/video-thumbnails-for-mythtv#comment-107474</guid>
		<description>Nice solution :)</description>
		<content:encoded><![CDATA[<p>Nice solution :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
