My guess would be the distribution companies provide them a hash table of MD5s that maps popular torrents to places where they can be purchased. The company that makes the TV sells this services to the distribution company and/or gets a cut of the sales. Furthermore, it probably logs the IP of the person watching the pirated file and sells that data also.