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