Korin McPhail, 46, was jailed for 20 months and placed on the Sex Offenders’ Register for life after pleading guilty to collecting the haul of extreme pornographic images in November 2020.
He was released from custody earlier this year and was living at a guest house in the Leith area of Edinburgh when police called to check up on him in September.
McPhail tried to con the officers into believing he only owned one mobile phone that did not connect to the internet.
Edinburgh news: Emergency services called to street in Capital after bin lorry hits block of flats
Edinburgh weather: Here is when the storm is set to hit the Capital and the Lothians today
St James Quarter: Video shows leaking in Edinburgh's new shopping centre as a storm set to hit the Capital
A71 crash: Edinburgh commuters face delays after ‘serious’ two-vehicle crash at Dalmahoy Junction
East Lothian crime news: Woman taken to hospital after serious assault in Musselburgh
But during the meeting the pervert was caught out when a second phone which was hidden under his mattress began ringing.
McPhail was arrested and charged with breaching the strict rules of his SOPO and he pleaded guilty to the offence when he appeared via a video link at Edinburgh Sheriff Court.
Prosecutor Rosie Cook told the court two Police Scotland detectives turned up at the guest house to check up on McPhail and were allowed access to his room.
Ms Cook said the officers read out the SOPO rules to McPhail and while he said he said he understood them he also “indicated his mobile phone was on the bed”.
The fiscal said the standard white mobile phone found in the room was “not capable of accessing the internet”.
Ms Cook added: “The accused and the officers were thereafter engaged in conversation with regards to his lifestyle.
“And during the conversation a mobile phone notification was heard within the room. It sounded from the direction of the accused who was sitting on his bed.
“It sounded like an iPhone notification which was very familiar to the officers.”
McPhail, originally from Kirkcaldy, Fife, was subsequently searched by the officers and his voice was said to have “notably changed and began to quiver”.
The officers then discovered the second mobile phone hidden beneath McPhail’s mattress.
Solicitor Steven Donald, defending, said the phone had been analysed by police and it was found the device did not contain any indecent images of children or any extreme pornographic images.
Mr Donald said McPhail had been living in a room within the guest house that had no windows and he had purchased the iPhone after becoming “bored” during lockdown.
He said McPhail used the device to watch YouTube videos and play the Pokemon Go video game.
Sheriff Fiona Tait said she could deal with the matter without the benefit of reports and sentenced McPhail to an 18 month jail sentence backdated to September.
McPhail was previously jailed for 20 months after police found “videos of a female engaging in sexual activity with animals” hidden within a games console.
The images were said to have shown “adults engaged in sexual activity with animals including dogs, horses, snakes and pigs”.
Police discovered a total of 2604 extreme pornographic images and 13 movies stored on several devices at McPhail’s home in June 2020.
He was also jailed for seven years in 1997 for indecently assaulting a 71-year-old woman and attacking a 17-year-old woman with the intention of raping her on separate occasions in Kirkcaldy, Fife.