private void playFile(IPlaylist playlist, IAudioItem item, boolean fromNext) {
if ((item instanceof PodcastItem) &&
(Controller.getInstance().getPreferenceStore().getBoolean(PreferenceConstants.PODCAST_DOWNLOAD_BEFORE_PLAY))) {
if (!((PodcastItem) item).doesTemporaryFileExists()) {
PodcastItemDownloaderJob downloadJob = new PodcastItemDownloaderJob(playlist, (PodcastItem) item);
downloadJob.schedule();
// If we come from playNextInPlaylist(), and we start downloading the next item,
// we must stop playback in order to update icons state...
if (fromNext) {
stopPlayback();