Page 1 of 1
Mark Watched Videos
Posted: 06 Jun 2015 00:03
by jdev21
Is it possible to mark videos/files that have been opened in xyplorer?
Similar to xmbc or similar htpc software, I would like to automatically mark watched videos in a series to know which is the latest unwatched.
Re: Mark Watched Videos
Posted: 06 Jun 2015 00:12
by SkyFrontier
Once I created a concept which allowed me to mark, using PFA and tags/comments, launched files (as well as how many times that action occurred). It just needed a file to launch - so no hassle on the operation at all.
Hope this helps.
If i find my scripts or have time to write a new set, will post here.
Re: Mark Watched Videos
Posted: 06 Jun 2015 00:27
by SkyFrontier
Found it.
Set this as a PFA.
For instance, I'm setting this PFA to intercept JPG (remember to enable TAGs column so you can see the count):
jpg> $label = report("{Tags}", "<curitem>"); if($label == "") { tag "1", , 1, 1; } elseif($label != "") { $label++; tag "$label", , 1, 1; }; run """<curitem>""";
Re: Mark Watched Videos
Posted: 06 Jun 2015 05:42
by jdev21
SkyFrontier wrote:Found it.
Set this as a PFA.
For instance, I'm setting this PFA to intercept JPG (remember to enable TAGs column so you can see the count):
jpg> $label = report("{Tags}", "<curitem>"); if($label == "") { tag "1", , 1, 1; } elseif($label != "") { $label++; tag "$label", , 1, 1; }; run """<curitem>""";
Great, thanks!
Is it possible to use this and add a color filter to the video?
Re: Mark Watched Videos
Posted: 06 Jun 2015 06:58
by bdeshi
Sure, but it's better to use colored labels instead of color filters. Labels move with the file, color filters normally do not.
First of all, you need to set this config option,
Menu > Tools > Configuration > Tags > Coloring style, to "Name column" or "whole row".
And you'll find colored labels listed above this option. Note the index of the color you wish to use.
Now here's Frontier's script with labelling support (the value of $colorNum is the index of the label you chose):
Code: Select all
jpg> $colorNum = 3; $label = report("{Tags}", "<curitem>"); if($label == "") { tag "1", , 1, 1; tag $colorNum;} elseif($label != "") { $label++; tag "$label", , 1, 1; }; run """<curitem>""";
btw, I noticed that pfi will reset all tags of the opened items, so I suggest you use one of the 5 Extratags. Here's another version of the script, using extra tag
1 ($tag = 'ex1';)
Code: Select all
{:Video}>::$colorNum = 3; $tag = 'ex1'; $label = report("{extra 1}", "<curitem>"); if($label == "") { tag "1", , $tag, 1; tag $colorNum;} elseif($label != "") { $label++; tag $label, , $tag, 1; }; run """<curitem>""";
You may have to make the extratag column visible. Select
Menu > View > Columns > Extra 1. Then right-click on the newly-added column's header/sort header, select "Configure Extra Column 1". Set it's Caption to, say, ViewCount, and Type to Number.
Also, if you don't want to type out every kind of video file extensions, use the special pattern "{:Video}", as I did in the last script.
Re: Mark Watched Videos
Posted: 06 Jun 2015 11:54
by SkyFrontier
Sammay: how do I scriptally retrieve the "{:Video}" extensions? Are they system-attached?
On xyini, couldn't find it.
On config, "previewed formats" dispalys "audio & video" altogether.
Intriguing.
Re: Mark Watched Videos
Posted: 06 Jun 2015 14:58
by bdeshi
Re: Mark Watched Videos
Posted: 06 Jun 2015 15:30
by SkyFrontier
Ah, cool... and how to (script, again!) know which GenericFileType categories there are?
Re: Mark Watched Videos
Posted: 06 Jun 2015 15:48
by bdeshi
Code: Select all
text replace(regexmatches(getsectionlist('Settings'),'^\w+PreviewCustomExtensions='),'PreviewCustomExtensions=');
Two exceptions: 'Exe' does not work, 'Executable' is accepted. Also 'Web' is accepted, but can not be found in the ini and therefore not by ^this^ script.
There may be more "hidden" categories, you-know-who knows...
Re: Mark Watched Videos
Posted: 06 Jun 2015 18:10
by SkyFrontier
The problem with exceptions is that they exceptionally occur...

Thanks you, Sammay. Nice tricks.