private static string GetPictureId(File file, IPicture picture, ArtworkType type) { //Year + (Album | Checksum) + Type var hashCode = default(long); unchecked { if (file.Tag.Year != 0) { hashCode = (hashCode * 29) + file.Tag.Year.GetHashCode(); } if (!string.IsNullOrEmpty(file.Tag.Album)) { hashCode += file.Tag.Album.ToLower().GetHashCode(); } else { hashCode += picture.Data.Checksum; } hashCode = (hashCode * 29) + type.GetHashCode(); } return(Math.Abs(hashCode).ToString()); }