FR 3194 then FR 8631 at Barcelona
Riga → Barcelona → Tangier
Timetable, Barcelona time
23:45FR 3194 from Riga at the gate
21:50FR 8631 to Tangier leaves the gate
22 h 05 apart on the timetable, overnight
FR 8631 leaves 22 h 05 after FR 3194 arrives on the timetable: more than half a day, so not a connection we count.