Fixed selected episode jumping to the top of the list after playen an item (issue #371)

Additionally reworked the code that searches for the last unwatched
episode for better performance and readability.