Liam Gardiner fled HMP Sudbury - an open Category D prison in Derbyshire - on March 31, sparking a nationwide manhunt.
Leeds Crown Court heard the 36-year-old 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 two days later at the Wentvale hotel on Great North Road, 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."
Also in court: Leeds judge issues 'exceptional' sentence for asylum seeker
He jailed him for 12 months, with the additional time 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 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 - thought to have been fired by Gardiner - were shot into the living room of the house and one went into a bedroom. Nobody was injured.
Gardiner, who was living at The Ridgeway, Knottingley, at the time, was jailed for 15.5 years.