Anthony McShane, 29, admitted being in possession of indecent photos of children at his home in St Leonards on May 26 last year.

During the search they detected an Xbox gaming console which McShane confirmed belonged to him.

A preliminary examination of the device found 29 movies in a folder entitled ‘Downloads’ and officers were able to preview thumbnail images.

The court was told the movies were known to examiners as being synonymous with child sex abuse.

Officers viewed one of the movies on the console which was described by the fiscal depute as a “compilation”.

All the children featured in the clip were female aged between three and eight and who were being abused by adult males.

The court heard that all the images in the movie were at the most extreme level Category A, which shows penetrative abuse, rape and torture of children

Prosecuting, Michael McIntosh told the court that log-in details provided by McShane linked to a verification code on an old mobile phone belonging to him where the full extent of the movies could be extracted.

Mr McIntosh added that officers contacted computer software giant Microsoft for their assistance in the matter.

However, he told the court: “That avenue was fruitless.”

McShane’s defence lawyer said his client had been receiving psychiatric assistance.

The pervert was snared back in 2014 when a police search of his home uncovered 1219 indecent images of children.

Despite having images at the most extreme level, he was given a community payback order and placed on the sex offenders’ register for three years.

Adjourning this case until May 29 for background reports, Sheriff Thomas Millar said: “You are on the register at this present time.

“You will be subject to further notifications. The term will not be disclosed until the next hearing.”