Pretty sure this is false. This song is based on a poem by Aleksandr Ammosov from 1858.
The infallible Wikipedia aggregates evidence that the melody from the Star Spangled Banner comes from an English drinking song of the The Anacreontic Society. The song was called ‘To Anacreon in Heaven’ and the melody was written by John Stafford Smith, with the earliest instance listed as 1773.
Supposedly, if you couldn’t get through the song, it meant you were too drunk for another round…
I don’t watch UK TV, except for the stuff that my PBS station puts up (Midsomer Murders, Victoria, Keeping up Appearances, the Father Brown Mysteries, Murder In Paradise etc.)