FR 3194 then FR 4597 at Barcelona
Riga → Barcelona → Porto
Timetable, Barcelona time
23:45FR 3194 from Riga at the gate
15:00FR 4597 to Porto leaves the gate
15 h 15 apart on the timetable, overnight
FR 4597 leaves 15 h 15 after FR 3194 arrives on the timetable: more than half a day, so not a connection we count.