Added difference ignore button

This commit is contained in:
2018-03-09 14:48:00 +01:00
parent 1e63498fa3
commit cb9e277718
10 changed files with 84 additions and 18 deletions

View File

@ -2,8 +2,9 @@ package animediff
// CanonicalTitle describes differing titles.
type CanonicalTitle struct {
TitleA string
TitleB string
TitleA string
TitleB string
NumericHash uint64
}
// Type returns the diff type.
@ -25,3 +26,8 @@ func (diff *CanonicalTitle) DetailsA() string {
func (diff *CanonicalTitle) DetailsB() string {
return diff.TitleB
}
// Hash returns the hash for the suggested value (from anime B).
func (diff *CanonicalTitle) Hash() uint64 {
return diff.NumericHash
}

View File

@ -4,8 +4,9 @@ import "strings"
// Genres describes differing genres.
type Genres struct {
GenresA []string
GenresB []string
GenresA []string
GenresB []string
NumericHash uint64
}
// Type returns the diff type.
@ -27,3 +28,8 @@ func (diff *Genres) DetailsA() string {
func (diff *Genres) DetailsB() string {
return strings.Join(diff.GenresB, ", ")
}
// Hash returns the hash for the suggested value (from anime B).
func (diff *Genres) Hash() uint64 {
return diff.NumericHash
}

View File

@ -6,4 +6,5 @@ type Difference interface {
Explanation() string
DetailsA() string
DetailsB() string
Hash() uint64
}

View File

@ -2,8 +2,9 @@ package animediff
// JapaneseTitle describes differing Japanese titles.
type JapaneseTitle struct {
TitleA string
TitleB string
TitleA string
TitleB string
NumericHash uint64
}
// Type returns the diff type.
@ -25,3 +26,8 @@ func (diff *JapaneseTitle) DetailsA() string {
func (diff *JapaneseTitle) DetailsB() string {
return diff.TitleB
}
// Hash returns the hash for the suggested value (from anime B).
func (diff *JapaneseTitle) Hash() uint64 {
return diff.NumericHash
}

View File

@ -2,8 +2,9 @@ package animediff
// Synopsis describes differing synopsis.
type Synopsis struct {
SynopsisA string
SynopsisB string
SynopsisA string
SynopsisB string
NumericHash uint64
}
// Type returns the diff type.
@ -25,3 +26,8 @@ func (diff *Synopsis) DetailsA() string {
func (diff *Synopsis) DetailsB() string {
return diff.SynopsisB
}
// Hash returns the hash for the suggested value (from anime B).
func (diff *Synopsis) Hash() uint64 {
return diff.NumericHash
}