<!DOCTYPE html><html><head><style type="text/css">body { font-family:'DejaVu Sans'; font-size:13px}</style></head><body><div>On Sun, 12 Oct 2014 10:29:43 +0100, Angela &lt;angela.schmid@wolke7.net&gt; wrote:<br><br>&gt;<br>&gt; I didn't noticed the above code was not used. I have to use some debug<br>&gt; statements to see the actual flow.<br>&gt; Your patch would do something similar as the code above.<br>&gt;<br>&gt; When I want to implement a key and select it from MythTV, what I don't  <br>&gt; like<br>&gt; from the above code:<br>&gt;<br>&gt; Reason 1: is that pictures get renamed or a second file with something  <br>&gt; like<br>&gt; *highlight* is added. It overcomplicates programming, when a highlighted<br>&gt; picture already exists.<br>&gt;<br>&gt; Reason 2: I keep my pictures synced (Beyond Compare) between a PC  <br>&gt; (editing<br>&gt; and source for off-loaded backup) and MythTV Server (second backup), I  <br>&gt; don't<br>&gt; want changes of filenames or additions.<br>&gt;<br>&gt; Reason 3: When changing Themes it might be needed to drop the  <br>&gt; .thumbcache's,<br>&gt; as they might have a different size (another algorithm of mine, was to  <br>&gt; copy<br>&gt; the thumb of a favorite picture to the parent directory thumb)<br>&gt;<br>&gt; Reason 4: It also does not solve when I have the following structure  <br>&gt; where I<br>&gt; want to use a picture say from the second subdirectory for a  <br>&gt; parent-parent<br>&gt; directory.<br>&gt;<br>&gt; 2003/200301 Egypt/20030101 Cairo<br>&gt; 2003/200301 Egypt/20030101 Cairo/pic0001.tiff<br>&gt; 2003/200301 Egypt/20030102 Abu Simbel<br>&gt; 2003/200301 Egypt/20030102 Abu Simbel/want-this-pic.tiff<br>&gt;<br>&gt; I am thinking of another algorithm, which also works for highlighting<br>&gt; directories (when they don't have pictures at that level):<br>&gt;<br>&gt; Within "2003/200301 Egypt/20030102 Abu Simbel/" at "want-this-pic.tiff" I<br>&gt; press a key and a file ".directory.thumb.txt" with "want-this-pic.tiff"  <br>&gt; is<br>&gt; written.<br>&gt; As I go back to Within "2003/200301 Egypt/" the directory is reread and  <br>&gt; code<br>&gt; like above looks first for a file ".directory.thumb.txt" and uses the<br>&gt; content as the filename, which is also checked if it exists, and the  <br>&gt; thumb<br>&gt; is used/created, otherwise the original code with recursion is used to  <br>&gt; find<br>&gt; a picture.<br>&gt; Within "2003/200301 Egypt/", I can press a key for directory "2003/200301<br>&gt; Egypt/20030102 Abu Simbel" and ".directory.thumb.txt" is written with<br>&gt; "20030102 Abu Simbel". The same applies when going back.<br>&gt; At "2003/200301 Egypt/" the "want-this-pic.tiff" is used.<br>&gt;<br>&gt; I only need to take care I have a backup of all ".directory.thumb.txt".<br>&gt;<br>&gt; The code above sure has some parts which can be reused. Also my algorithm<br>&gt; can sit nicely next to the *highlight* code.<br>&gt;<br>&gt; At the end of the month I have time to program my algorithm and would be<br>&gt; pleased to hear other thoughts/algorithms.<br>&gt;<br><br>Firstly, be aware that this plugin is deprecated&nbsp;<a href="https://code.mythtv.org/trac/changeset/9dadc429404358b0d247f259d99d017a4c6fdaeb/mythtv">https://code.mythtv.org/trac/changeset/9dadc429404358b0d247f259d99d017a4c6fdaeb/mythtv</a><br></div><div><br></div><div>A new core image manager has appeared in 0.28 <a href="https://code.mythtv.org/trac/changeset/c1ba0b843608728b75df57fd0973466e86d9995d/mythtv">https://code.mythtv.org/trac/changeset/c1ba0b843608728b75df57fd0973466e86d9995d/mythtv</a></div><div><br></div><div>There's little info about it &amp; I haven't worked out what it does yet, but you may wish to limit your effort on this.</div><div><br></div><div>That said;</div><div><br></div><div>1. Gallery already creates thumbcaches in the picture directories (depending on settings) so your&nbsp;".directory.thumb.txt" should probably mirror that behaviour. </div><div><br></div><div>2. Storing the file within the thumbcache would be convenient. Does gallery ever delete the thumbcache itself ? If so, could you modify that so it cleared the thumbs instead, leaving the directory.thumb in place ?</div><div><br></div><div>2. Storing filenames seems wrong to me (unless you want them to be multi-platform compatible). Wouldn't it be better to create them as symbolic links ? There's no need for photo renaming/duplication.&nbsp;</div><div><br></div><div>3. Whichever, there will always be a problem with breakage due to file renaming/directory rearrangement unless you go for a hash key approach such as MythVideo.&nbsp;</div></body></html>