Mark Watched Videos

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
jdev21
Posts: 45
Joined: 08 Oct 2014 22:13

Mark Watched Videos

Post 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.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Mark Watched Videos

Post 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.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Mark Watched Videos

Post 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>""";
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

jdev21
Posts: 45
Joined: 08 Oct 2014 22:13

Re: Mark Watched Videos

Post 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?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Mark Watched Videos

Post 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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Mark Watched Videos

Post 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.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Mark Watched Videos

Post by bdeshi »

Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Mark Watched Videos

Post by SkyFrontier »

Ah, cool... and how to (script, again!) know which GenericFileType categories there are?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Mark Watched Videos

Post 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...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Mark Watched Videos

Post by SkyFrontier »

The problem with exceptions is that they exceptionally occur... :roll:
Thanks you, Sammay. Nice tricks.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply