big refactoring to enable plugin API
improved handling of when a video is marked as watched