When a judgment for specific personal property is affirmed by an appellate court, or an injunction to such judgment is dissolved, the person who is entitled to execution of such judgment, or who would be entitled if execution had not been had, may, on motion to the court from which such execution has issued, or might issue, after twenty days' notice to the defendant or his personal representative, have a jury impaneled to ascertain the damages sustained by reason of the detention of such property subsequent to such judgment; or if it was on a verdict, subsequent to such verdict; and judgment shall be rendered for the damages so ascertained, if any.