That can't be right. It's either in the list or it isn't. It can't be both. Unless something changed over time.

What does the output say for this one? I've added even more debug output:
Groovy: Select all
def host = '192.168.0.5'
def port = 8096
def auth = '1aa3449d1862402f92bb6e5d6e4aab58'
// refresh and wait
curl "http://${host}:${port}/Library/Refresh", [:], Authorization: "MediaBrowser Token=$auth"
sleep 5000
// get all items
def r = curl "http://$host:$port/Items?Recursive=true&Fields=Path,Genres,SortName,Studios,Writer,Taglines,LocalTrailerCount,OfficialRating,CumulativeRunTimeTicks,ItemCounts,Metascore,AirTime,DateCreated,People,Overview,CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,MediaSources,VoteCount,RecursiveItemCount,PrimaryImageAspectRatio", Authorization: "MediaBrowser Token=$auth"
// index items by folder name / file name
def index = r.Items.findAll{ it.MediaType == 'Video' }.groupBy{ it.Path.toFile().getRelativePathTail(2) }
println "INDEX: ${index.size()}"
model.each{ source, target ->
def key = target.getRelativePathTail(2)
if (key in index) {
// lookup item by folder name / file name
index[key].each{
println "UPDATE: $it.Id"
it.DateCreated = d.format(/yyyy-MM-dd/)
// update item
curl "http://$host:$port/Items/$it.Id", it, Authorization: "MediaBrowser Token=$auth"
}
} else {
index.each{ k, v -> println "* [$key] ≠ [$k]" }
}
}
println ""
That'll either print
UPDATE or
* [A] ≠ [A] and the latter can't possibly be because A = A.