Search for video file name

How to search for a video file in a catalog

Here is a short sample script to search for a video file in the catalog given a filename.

Simply use the search api and provide the VideoQueryProperties. FilePath is a part of the video path you are searching for.

If the search failes to find any videos it will return null.

If it finds videos it will return an array of VideoFileEntry. The entries includes, among other things, the ID of the video. You use the id as key for the other APIs.

As usual, copy paste the script into the script window in Fast video cataloger. This is just a small sample, if you are developing your own script make sure to check our other developer resources.

using System.Runtime;
using System.Collections.Generic;
using VideoCataloger;
using VideoCataloger.RemoteCatalogService;
class Script
{
  static public async System.Threading.Tasks.Task Run ( IScripting scripting, string arguments ) 
  { 
    scripting.GetConsole().Clear();

    VideoQuery query = new VideoQuery();
    query.Properties = new VideoQueryProperties();
    query.Properties.Description = "";
    query.Properties.Link="";
    query.Properties.Title = "";
    query.Properties.FilePath = "part_of_filename";
    VideoFileEntry[] result = scripting.GetVideoCatalogService().SearchVideos( query );
    if (result!=null)
    {
      foreach (VideoFileEntry entry in result)
      {
        scripting.GetConsole().WriteLine( "ID=" + entry.ID );
      }
    }
  }
}