dirkvranckaert / my-episodes-watch-manager

Automatically exported from code.google.com/p/my-episodes-watch-manager
1 stars 2 forks source link

Mark all episodes of a show as watched or acquired #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Long press on the show (group headers) should popup a menu in which you can 
select to mark all it's episodes as watched. On the acquire tab there will be a 
second option mark acquired.

Original issue reported on code.google.com by dirkvran...@gmail.com on 9 Sep 2010 at 9:14

GoogleCodeExporter commented 8 years ago

Original comment by dirkvran...@gmail.com on 15 Sep 2010 at 7:21

GoogleCodeExporter commented 8 years ago

Original comment by ivoniftrik on 17 Sep 2010 at 3:46

GoogleCodeExporter commented 8 years ago
Done.

Note: If you want to mark a show with 80 episodes, it does 80 connections to 
the site, takes some time.

Original comment by ivoniftrik on 23 Oct 2010 at 11:08

GoogleCodeExporter commented 8 years ago
Ivo,

currently you do this:
for (Episode tempEp : show.getEpisodes())
                {
                    markEpisode(EpisodeStatus, tempEp);
                }

Doing so makes that for each episode to mark acquired or watched you have to 
login to myepisodes and execute the mark watched.

As you mention this can take a while, however you could do something like this 
instead of the previous code block:
markAllEpisodes(show.getEpisodes());

No need in the activity to loop over all the episodes, loop over them in the 
service method (so a new service method should be created). Then in the service 
you would login once, and with the same httpClient instance you can execute all 
the mark watched actions, so you win the time of the login every time! It's not 
that much amount of time we win but it's the best we can do!

Check out the source code, I refactored it!

Original comment by dirkvran...@gmail.com on 24 Oct 2010 at 1:55

GoogleCodeExporter commented 8 years ago
You're right, this is better ;).
Thnx for the refactore.

Original comment by ivoniftrik on 24 Oct 2010 at 8:53