A suspect was exposed as a drug dealer after police found pictures of his pet dog on his mobile phone.
Detectives were hunting for a supplier who they knew had the nickname "Jonny-on-one" or "On-one".
Their inquiries led them to Jonathan Edwards, a 33-year-old man from Sunderland.
Newcastle Crown Court heard that Edwards was arrested - but denied he was the dealer when questioned by police.
When officers searched searched his home on the city's Bellevue Crescent, they found a notebook with "Jonny-on-one" doodled on its pages and damning pictures of his pet, a dog called Micky, alongside the dealer's nickname.
The search took place in September 2016.
Rupert Doswell, prosecuting, told the court: "A detective made inquiries to identify this defendant as having the nickname.
"A notebook was recovered from the defendant's home address which had written references to 'Jonny-on-one' doodled on the pages.
"A still image on his iPhone showed a photograph of his dog, with 'On-one' spray-painted on the pavement next to the dog.
"A further image from the defendant's iPhone had a picture of the defendant, with his dog, and had been tagged as 'On-one and Micky'."
Edwards pleaded guilty to being concerned in the supply of class B drugs between December 2014 and March 2016.
The court heard "Jonny-on-one" or "On-one" had been identified as a dealer through texts police found on another man's mobile phone, which discussed the sale of MCAT.
Miss Recorder Jo Kidd sentenced Edwards to 16 months imprisonment, suspended for 18 months, with programme and rehabilitation requirements.
The judge told him: "The text messages show clearly you were operating as a street dealer at the material time."
Jamie Adams, mitigating, said Edwards was "hopelessly addicted" to drugs at the time but has made significant progress to deal with his problems and has stayed away from trouble since that time.
Mr Adams added: "His nickname says it all about how everyone regarded him, he always appeared to be stupified with drugs or alcohol.
"It was his addiction to drugs, of one kind or another, which led to him being given the nickname 'Jonny-on-one'."