Liam Gardiner fled HMP Sudbury - an open Category D prison in Derbyshire - on March 31, sparking a nationwide manhunt for the 36-year-old.
Leeds Crown Court heard he got a taxi from Derbyshire to West Yorkshire where he visited his father due to concerns over his health.
It was heard that Gardiner then went "partying" and was eventually located at the Wentvale hotel on the Great North Road two days later where he was staying with a woman.
Considered a dangerous prisoner, police scrambled an armed team to arrest him.
He had been convicted in 2017 of possessing a firearm with an intent to endanger life.
Appearing at Leeds Crown Court via video link from HMP Leeds, he admitted a charge of escaping lawful custody and possession of cannabis.
Mitigating, James Littlehales said that Gardiner had made a spur of the moment decision to flee prison, and had intended to hand himself in.
Judge Geoffrey Marson QC told him: "Escapes from prison vary greatly in their gravity.
"You were serving a substantial sentence for a firearms offence which can cause fear in the public.
"That's why firearms officers attended to arrest you.
"You say you intended to hand yourself in , but after you had seen your father you went partying for two days, and were found in a hotel room with a lady."
He gave him 12 months' jail, to begin after he has completed his previous sentence.
Gardiner was part of a gang of four that fired shots at a house in Sharlston Common in 2017 during a bitter dispute between rival drug gangs.
Leeds Crown Court had heard that Gardiner was a dealer in the Knottingley area and swore revenge after two of his street dealers were robbed of drugs and cash.
Five bullets were fired into the living room of the house and one went into a bedroom, and were thought to have been fired by Liam Gardiner.
Nobody was injured.
Gardiner, who was living at The Ridgeway, Knottingley, at the time, was jailed for 15-and-a-half years.