IB 415 then IB 5388 at Barcelona
Madrid → Barcelona → Bari
Timetable, Barcelona time
16:15IB 415 from Madrid at the gatealso LA 1522, LL 3015, VY 5057, AV 6016, QR 6889, BA 7134, AA 8630
11:40IB 5388 to Bari leaves the gatealso LL 5388, VY 6112
19 h 25 apart on the timetable, overnight
IB 5388 leaves 19 h 25 after IB 415 arrives on the timetable: more than half a day, so not a connection we count.