Monday, November 08, 2010 at 12:00 AM.

river2Suite.podcasts.checkQueue

on checkQueue (adrcal) {
	<<Changes
		<<9/15/09; 10:07:11 AM by DW
			<<Don't download stuff from feeds that have been unsubbed. Otherwise they magically re-appear! :-(
		<<9/8/09; 1:44:05 PM by DW
			<<Takes a parameter, the address of the calendar structure, so we can download photos or podcasts.
		<<8/24/09; 9:03:35 PM by DW
			<<Created. If there's a new podcast ready to download, and one isn't already downloading, fire it up.
	local (adrdata = river2suite.init ());
	if not defined (system.temp.river2.idDownloadThread) { //there isn't a download thread running
		on visit (adritem) {
			if typeof (adritem^) != tabletype {
				local (name = nameof (adritem^));
				local (adrday = mainresponder.calendar.getdayaddress (@adrdata^.river, adritem^));
				adritem = @adrday^.[name]};
			river2Suite.initRiverItem (adritem);
			if defined (adrdata^.feeds.[adritem^.feedurl]) { //9/15/09 by DW
				if not defined (adritem^.podcast.whenDownloadBegan) {
					local (id = thread.callscript (@river2Suite.podcasts.downloadOne, {adritem}));
					system.temp.river2.idDownloadThread = id;
					return (false)}};
			return (true)};
		mainresponder.calendar.visitReverseChronologic (adrcal, @visit)}};
bundle { //test code
	checkQueue (@config.river2.river)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.