It's literally the plot of Casablanca...saw this, liked it, saw that, loved it, then saw this again and made the connection...guy and girl break up due to unforeseen circumstances, then girl shows up with more admirable/noble partner, and then same ending.