Fix restricted video check + add some JSON api stuff.