/** * Mettre un jour un Flux * * @param p_flux */ private void majUnFlux(MlFlux p_flux) { Document doc = RssParserMetier.OuvrirUrl(p_flux.getFluxUrl()); if (doc != null) { p_flux.setDateDerniereSynchro(Calendar.getInstance().getTimeInMillis()); // this.progressDialog.setTitle("Maj " + p_flux.getTitre()); /** Elements du flux RSS */ RssParserMetier.parcourirNodeListeEtValoriseListeEpisode(p_flux, doc); } }
@Override protected Void doInBackground(Void... params) { for (MlFlux unFlux : listeFlux) { this.majUnFlux(unFlux); if (unFlux != null) { for (MlEpisode uneEpisode : unFlux.getListeEpisode()) { if (uneEpisode.isStatutNouveau()) { uneEpisode.setIdFluxParent(unFlux.getIdFlux()); uneEpisode.setVignetteTelechargee(unFlux.getVignetteTelechargee()); tableEpisode.createEpisode(uneEpisode); } } } } progressDialog.dismiss(); return null; }