Your body was electrostatically charged. When you plugged the cable in to your TV, it provided a path for your body to discharge through.