Do not delete fields about an episode when we already have them Update the polochon and trakttv libs
20 lines
313 B
Go
20 lines
313 B
Go
package models
|
|
|
|
func updateIfNonEmpty(old *string, newValue string) {
|
|
if newValue != "" {
|
|
*old = newValue
|
|
}
|
|
}
|
|
|
|
func updateIfNonZeroInt(old *int, newValue int) {
|
|
if newValue != 0 {
|
|
*old = newValue
|
|
}
|
|
}
|
|
|
|
func updateIfNonZeroFloat(old *float32, newValue float32) {
|
|
if newValue != 0. {
|
|
*old = newValue
|
|
}
|
|
}
|