IB 5389 then VY 1008 at Barcelona
Bari → Barcelona → Madrid
Timetable, Barcelona time
23:20IB 5389 from Bari at the gatealso LL 5389, VY 6113
17:30VY 1008 to Madrid leaves the gatealso QR 5529, IB 5992, LL 5992
18 h 10 apart on the timetable, overnight
VY 1008 leaves 18 h 10 after IB 5389 arrives on the timetable: more than half a day, so not a connection we count.