advanced ts file detection