FR 6274 then BT 684 at Barcelona
Edinburgh → Barcelona → Riga
Timetable, Barcelona time
21:00FR 6274 from Edinburgh at the gate
14:05BT 684 to Riga leaves the gate
17 h 05 apart on the timetable, overnight
BT 684 leaves 17 h 05 after FR 6274 arrives on the timetable: more than half a day, so not a connection we count.