<!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 <angela.schmid@wolke7.net> wrote:<br><br>><br>> I didn't noticed the above code was not used. I have to use some debug<br>> statements to see the actual flow.<br>> Your patch would do something similar as the code above.<br>><br>> When I want to implement a key and select it from MythTV, what I don't <br>> like<br>> from the above code:<br>><br>> Reason 1: is that pictures get renamed or a second file with something <br>> like<br>> *highlight* is added. It overcomplicates programming, when a highlighted<br>> picture already exists.<br>><br>> Reason 2: I keep my pictures synced (Beyond Compare) between a PC <br>> (editing<br>> and source for off-loaded backup) and MythTV Server (second backup), I <br>> don't<br>> want changes of filenames or additions.<br>><br>> Reason 3: When changing Themes it might be needed to drop the <br>> .thumbcache's,<br>> as they might have a different size (another algorithm of mine, was to <br>> copy<br>> the thumb of a favorite picture to the parent directory thumb)<br>><br>> Reason 4: It also does not solve when I have the following structure <br>> where I<br>> want to use a picture say from the second subdirectory for a <br>> parent-parent<br>> directory.<br>><br>> 2003/200301 Egypt/20030101 Cairo<br>> 2003/200301 Egypt/20030101 Cairo/pic0001.tiff<br>> 2003/200301 Egypt/20030102 Abu Simbel<br>> 2003/200301 Egypt/20030102 Abu Simbel/want-this-pic.tiff<br>><br>> I am thinking of another algorithm, which also works for highlighting<br>> directories (when they don't have pictures at that level):<br>><br>> Within "2003/200301 Egypt/20030102 Abu Simbel/" at "want-this-pic.tiff" I<br>> press a key and a file ".directory.thumb.txt" with "want-this-pic.tiff" <br>> is<br>> written.<br>> As I go back to Within "2003/200301 Egypt/" the directory is reread and <br>> code<br>> like above looks first for a file ".directory.thumb.txt" and uses the<br>> content as the filename, which is also checked if it exists, and the <br>> thumb<br>> is used/created, otherwise the original code with recursion is used to <br>> find<br>> a picture.<br>> Within "2003/200301 Egypt/", I can press a key for directory "2003/200301<br>> Egypt/20030102 Abu Simbel" and ".directory.thumb.txt" is written with<br>> "20030102 Abu Simbel". The same applies when going back.<br>> At "2003/200301 Egypt/" the "want-this-pic.tiff" is used.<br>><br>> I only need to take care I have a backup of all ".directory.thumb.txt".<br>><br>> The code above sure has some parts which can be reused. Also my algorithm<br>> can sit nicely next to the *highlight* code.<br>><br>> At the end of the month I have time to program my algorithm and would be<br>> pleased to hear other thoughts/algorithms.<br>><br><br>Firstly, be aware that this plugin is deprecated <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 & 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 ".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. </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. </div></body></html>