Skip to content

Commit

Permalink
fix crush on people lists
Browse files Browse the repository at this point in the history
  • Loading branch information
keystroke3 authored and cecobask committed Jul 29, 2024
1 parent a6b8800 commit 95e8eb9
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions pkg/client/imdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,12 +562,20 @@ func transformListData(data []byte) ([]entities.IMDbItem, error) {
}
var items []entities.IMDbItem
for i, record := range csvData {
if i > 0 {
items = append(items, entities.IMDbItem{
ID: record[1],
TitleType: record[8],
})
if i == 0 {
if len(record) == 8 {
if record[7] == "Birth Date" {
slog.Info("people lists are not yet supported")
return items, nil
}
}
continue
}

items = append(items, entities.IMDbItem{
ID: record[1],
TitleType: record[8],
})
}
return items, nil
}
Expand Down

0 comments on commit 95e8eb9

Please sign in to comment.