@SuppressWarnings("unchecked")
    public synchronized void partialUpdate(String myEpisodesUsername, String pwdmd5, String cookie) {
        log.info("Starting partialUpdate");
        MyEpisodesHTTPClient myEpisodesHTTPClient = new MyEpisodesHTTPClient(cookie);
        try {
            List<Show> currentShows = myEpisodesHTTPClient.getAllShows();
            List<Show> dbShows = showService.getAllShows();

            List<Show> newShows = ListUtils.removeAll(currentShows, dbShows);
            List<Show> removedShows = ListUtils.removeAll(dbShows, currentShows);

            log.info("partialUpdate - currentShows: count(" + currentShows.size() + ") :" + currentShows);
            log.info("partialUpdate - dbShows: count(" + dbShows.size() + ") :" + dbShows);
            log.info("partialUpdate - newShows: count(" + newShows.size() + ") :" + newShows);
            log.info("partialUpdate - removedShows: count(" + removedShows.size() + ") :" + removedShows);

            log.info("Starting partialUpdate - remove shows");
            for (Show show : removedShows) {
                // TODO set on delete cascade to delete all episodes for show
                List<Episode> episodes = episodeService.getAllEpisodesForShow(show.getId());
                for (Episode episode : episodes) {
                    episodeService.deleteEpisode(episode.getEpisodeKey());
                }
                showService.deleteShow(show.getId());
            }
            showService.flush();

            log.info("Starting partialUpdate - add new shows");
            for (Show show : newShows) {
                Long showId = showService.addShow(show);
                List<Episode> episodesForShow = myEpisodesHTTPClient.getAllEpisodesForShow(showId);
                for (Episode newEpisode : episodesForShow) {
                    episodeService.addEpisode(newEpisode);
                }
                // pause for 1 second
                try {
                    Thread.sleep(1000);
                }
                catch (InterruptedException e) {
                }
            }

            log.info("Starting partialUpdate - rss update");
            RSSParser rssParser = new RSSParser(myEpisodesUsername, pwdmd5);
            List<Episode> episodesFromRSSFeed = rssParser.getEpisodesFromRSSFeed();
            for (Episode episode : episodesFromRSSFeed) {
                Episode dbEpisode = episodeService.getEpisode(episode.getEpisodeKey());
                if (dbEpisode != null) {
                    // episode exists in DB
                    if (!dbEpisode.equals(episode)) {
                        // episode data in DB is different from one in RSS feed - update it
                        dbEpisode.setAirDate(episode.getAirDate());
                        dbEpisode.setName(episode.getName());
                        episodeService.updateEpisode(dbEpisode);
                    }
                }
                else {
                    // episode doesn't exist in DB - add it
                    episodeService.addEpisode(episode);
                }
            }
        }
        catch (Exception e) {
            log.error(e, e);
        }
        finally {
            // TODO check this
            myEpisodesHTTPClient.shutdown();
        }
        log.info("Exiting partialUpdate");
    }