Index: gtk2_ardour/sfdb_freesound_mootcher.cc
===================================================================
--- gtk2_ardour/sfdb_freesound_mootcher.cc	(revision 11623)
+++ gtk2_ardour/sfdb_freesound_mootcher.cc	(working copy)
@@ -54,10 +54,12 @@
 
 
 //------------------------------------------------------------------------
-Mootcher::Mootcher(const char *saveLocation)
+Mootcher::Mootcher()
 	: curl(curl_easy_init())
 {
-	changeWorkingDir(saveLocation);
+	std::string path;
+	path = Glib::get_home_dir() + "/Freesound/";
+	changeWorkingDir ( path.c_str() );
 };
 //------------------------------------------------------------------------
 Mootcher:: ~Mootcher()
@@ -111,6 +113,8 @@
 //------------------------------------------------------------------------
 
 std::string Mootcher::sortMethodString(enum sortMethod sort) {
+// given a sort type, returns the string value to be passed to the API to
+// sort the results in the requested way.
 
 	switch (sort) {
 		case sort_duration_desc:	return "duration_desc";	
@@ -300,7 +304,7 @@
 	ensureWorkingDir();
 	std::string audioFileName = basePath + "snd/" + ID + "-" + originalFileName;
 
-	//check to see if audio file already exists
+	// check to see if audio file already exists
 	FILE *testFile = fopen(audioFileName.c_str(), "r");
 	if (testFile) {  
 		fseek (testFile , 0 , SEEK_END);
@@ -315,47 +319,49 @@
 		remove( audioFileName.c_str() );  
 	}
 
+	if (!curl) {
+		return "";
+	}
+
 	//now download the actual file
-	if (curl) {
+	FILE* theFile;
+	theFile = fopen( audioFileName.c_str(), "wb" );
 
-		FILE* theFile;
-		theFile = fopen( audioFileName.c_str(), "wb" );
+	if (!theFile) {
+		return "";
+	}
+	
+	// create the download url
+	audioURL += "?api_key=" + api_key;
 
-		if (theFile) {
-		
-			// create the download url
-			audioURL += "?api_key=" + api_key;
-		
-			setcUrlOptions();
-			curl_easy_setopt(curl, CURLOPT_URL, audioURL.c_str() );
-			curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, audioFileWrite);
-			curl_easy_setopt(curl, CURLOPT_WRITEDATA, theFile);
+	setcUrlOptions();
+	curl_easy_setopt(curl, CURLOPT_URL, audioURL.c_str() );
+	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, audioFileWrite);
+	curl_easy_setopt(curl, CURLOPT_WRITEDATA, theFile);
 
-			std::cerr << "downloading " << audioFileName << " from " << audioURL << "..." << std::endl;
-			/* hack to get rid of the barber-pole stripes */
-			caller->progress_bar.hide();
-			caller->progress_bar.show();
+	std::cerr << "downloading " << audioFileName << " from " << audioURL << "..." << std::endl;
+	/* hack to get rid of the barber-pole stripes */
+	caller->progress_bar.hide();
+	caller->progress_bar.show();
 
-			curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
-			curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
-			curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, caller);
+	curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 0); // turn on the progress bar
+	curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
+	curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, caller);
 
-			CURLcode res = curl_easy_perform(curl);
-			fclose(theFile);
+	CURLcode res = curl_easy_perform(curl);
+	fclose(theFile);
 
-			curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1); // turn off the progress bar
-			caller->progress_bar.set_fraction(0.0);
-			
-			if( res != 0 ) {
-				std::cerr <<  "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl;
-				remove( audioFileName.c_str() );  
-				return "";
-			} else {
-				std::cerr << "done!" << std::endl;
-				// now download the tags &c.
-				getSoundResourceFile(ID);
-			}
-		}
+	curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1); // turn off the progress bar
+	caller->progress_bar.set_fraction(0.0);
+	
+	if( res != 0 ) {
+		std::cerr <<  "curl error " << res << " (" << curl_easy_strerror(res) << ")" << std::endl;
+		remove( audioFileName.c_str() );  
+		return "";
+	} else {
+		std::cerr << "done!" << std::endl;
+		// now download the tags &c.
+		getSoundResourceFile(ID);
 	}
 
 	return audioFileName;
Index: gtk2_ardour/sfdb_freesound_mootcher.h
===================================================================
--- gtk2_ardour/sfdb_freesound_mootcher.h	(revision 11623)
+++ gtk2_ardour/sfdb_freesound_mootcher.h	(working copy)
@@ -49,7 +49,7 @@
 class Mootcher
 {
 public:
-	Mootcher(const char *saveLocation);
+	Mootcher();
 	~Mootcher();
 
 	std::string	getAudioFile(std::string originalFileName, std::string ID, std::string audioURL, SoundFileBrowser *caller);
Index: gtk2_ardour/sfdb_ui.cc
===================================================================
--- gtk2_ardour/sfdb_ui.cc	(revision 11623)
+++ gtk2_ardour/sfdb_ui.cc	(working copy)
@@ -177,6 +177,7 @@
 	main_box.pack_start (table, false, false);
 
 	tags_entry.set_editable (true);
+	tags_entry.set_wrap_mode(Gtk::WRAP_WORD);
 	tags_entry.signal_focus_out_event().connect (sigc::mem_fun (*this, &SoundFileBox::tags_entry_left));
 
 	Label* label = manage (new Label (_("Tags:")));
@@ -562,6 +563,9 @@
 		freesound_list_view.append_column(_("ID")      , freesound_list_columns.id);
 		freesound_list_view.append_column(_("Filename"), freesound_list_columns.filename);
 		// freesound_list_view.append_column(_("URI")     , freesound_list_columns.uri);
+		freesound_list_view.append_column(_("Duration"), freesound_list_columns.duration);
+		freesound_list_view.get_column(1)->set_expand(true);
+
 		freesound_list_view.get_selection()->signal_changed().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_list_view_selected));
 
 		freesound_list_view.get_selection()->set_mode (SELECTION_MULTIPLE);
@@ -737,10 +741,7 @@
 		set_response_sensitive (RESPONSE_OK, false);
 	} else {
 
-		string path;
-		path = Glib::get_home_dir();
-		path += "/Freesound/";
-		Mootcher theMootcher(path.c_str()); // XXX should be a member of SoundFileBrowser
+		Mootcher theMootcher; // XXX should be a member of SoundFileBrowser
 
 		string file;
 
@@ -820,10 +821,7 @@
 #ifdef FREESOUND
 	freesound_list->clear();
 
-	string path;
-	path = Glib::get_home_dir();
-	path += "/Freesound/";
-	Mootcher theMootcher(path.c_str());
+	Mootcher theMootcher;
 
 	string search_string = freesound_entry.get_text ();
 	enum sortMethod sort_method = (enum sortMethod) freesound_sort.get_active_row_number();
@@ -879,15 +877,30 @@
 		XMLNode *id_node  = node->child ("id");
 		XMLNode *uri_node = node->child ("serve");
 		XMLNode *ofn_node = node->child ("original_filename");
+		XMLNode *dur_node = node->child ("duration");
 
 		if (id_node && uri_node && ofn_node) {
 			
 			std::string  id =  id_node->child("text")->content();
 			std::string uri = uri_node->child("text")->content();
 			std::string ofn = ofn_node->child("text")->content();
+			std::string dur = dur_node->child("text")->content();
 
 			std::string r;
-			// cerr << "id=" << id << ",uri=" << uri << ",ofn=" << ofn << endl;
+			// cerr << "id=" << id << ",uri=" << uri << ",ofn=" << ofn << ",dur=" << dur << endl;
+			
+			double duration_seconds = atof(dur.c_str());
+			double h, m, s;
+			char duration_hhmmss[16];
+			if (duration_seconds >= 99 * 60 * 60) {
+				strcpy(duration_hhmmss, ">99h");
+			} else {
+				s = modf(duration_seconds/60, &m) * 60;
+				m = modf(m/60, &h) * 60;
+				sprintf(duration_hhmmss, "%02.fh:%02.fm:%04.1fs",
+					h, m, s
+				);
+			}
 
 			TreeModel::iterator new_row = freesound_list->append();
 			TreeModel::Row row = *new_row;
@@ -895,6 +908,7 @@
 			row[freesound_list_columns.id      ] = id;
 			row[freesound_list_columns.uri     ] = uri;
 			row[freesound_list_columns.filename] = ofn;
+			row[freesound_list_columns.duration] = duration_hhmmss;
 
 		}
 	}
@@ -934,10 +948,7 @@
 #ifdef FREESOUND
 		typedef TreeView::Selection::ListHandle_Path ListPath;
 
-		string path;
-		path = Glib::get_home_dir();
-		path += "/Freesound/";
-		Mootcher theMootcher(path.c_str()); // XXX should be a member of SoundFileBrowser
+		Mootcher theMootcher; // XXX should be a member of SoundFileBrowser
 
 
 		ListPath rows = freesound_list_view.get_selection()->get_selected_rows ();
Index: gtk2_ardour/sfdb_ui.h
===================================================================
--- gtk2_ardour/sfdb_ui.h	(revision 11623)
+++ gtk2_ardour/sfdb_ui.h	(working copy)
@@ -126,8 +126,14 @@
 		Gtk::TreeModelColumn<std::string> id;
 		Gtk::TreeModelColumn<std::string> uri;
 		Gtk::TreeModelColumn<std::string> filename;
+		Gtk::TreeModelColumn<std::string> duration;
 
-		FreesoundColumns() { add(id); add(filename); add(uri); }
+		FreesoundColumns() {
+			add(id); 
+			add(filename); 
+			add(uri);
+			add(duration);
+		}
 	};
 
 	FoundTagColumns found_list_columns;
