Improve subtitle selection

This commit is contained in:
2023-03-18 18:07:15 +01:00
parent cf64833d3e
commit ba4c1bc1fe
7 changed files with 129 additions and 13 deletions

View File

@@ -4,6 +4,8 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import java.util.Objects;
@Slf4j
@Getter
@AllArgsConstructor
@@ -15,6 +17,24 @@ public class FileAttribute {
private final boolean forcedTrack;
private final LaneType type;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FileAttribute attribute = (FileAttribute) o;
return id == attribute.id
&& defaultTrack == attribute.defaultTrack
&& forcedTrack == attribute.forcedTrack
&& Objects.equals(language, attribute.language)
&& Objects.equals(trackName, attribute.trackName)
&& type == attribute.type;
}
@Override
public int hashCode() {
return Objects.hash(id, language, trackName, defaultTrack, forcedTrack, type);
}
@Override
public String toString() {
return "[" + "id=" + id +