Index: mythplugins/mythnews/mythnews/mythnews.cpp
===================================================================
--- mythplugins/mythnews/mythnews/mythnews.cpp	(revision 16834)
+++ mythplugins/mythnews/mythnews/mythnews.cpp	(working copy)
@@ -946,20 +946,49 @@
                 if (!dir.exists())
                      dir.mkdir(fileprefix);
 
-                fileprefix += "/MythNews";
+		// Grabs the parent Site name and appends it to the fileprefix
 
-                dir = QDir(fileprefix);
-                if (!dir.exists())
-                    dir.mkdir(fileprefix);
+                fileprefix += "/MythNews/files/";
+		fileprefix += article->parent();
+		fileprefix.replace(" ", "_");
+		
+		// Some seriously dodgy code to grab the file name of the media file to be downloaded
+		QString filename;
 
-                QString sFilename(fileprefix + "/newstempfile");
+		filename = QRegExp::escape(article->title());
+		/* QStringList qstr = QStringList::split("/", cmdURL);
+			for ( QStringList::Iterator it = qstr.begin(); it != qstr.end(); ++it ) {
+	     			filename = QRegExp::escape(*it);
+ 			} */
 
-                if (getHttpFile(sFilename, cmdURL))
-                {
-                    qApp->unlock();
-                    playVideo(sFilename);
-                    qApp->lock();
-                }
+		filename.replace(" ","_");
+                filename.replace("/","-"); // As per above, this ensures that there aren't any conflicts with linux file name formats
+		
+		QFile file(fileprefix + "/" + filename);
+      	        QString sFilename(fileprefix + "/" + filename);
+
+		if(!file.exists())
+		{
+                	dir = QDir(fileprefix);
+	                if (!dir.exists())
+                	    dir.mkdir(fileprefix);
+
+	
+			cout << sFilename << endl;
+
+                	if (getHttpFile(sFilename, cmdURL))
+                	{
+	                    qApp->unlock();
+       		            	playVideo(QRegExp::escape(sFilename));
+                	    qApp->lock();
+                	}
+		} else {
+			qApp->unlock();
+				playVideo(QRegExp::escape(sFilename));
+			qApp->lock();
+		}
+
+
             } else {
                 QString cmdUrl(article->articleURL());
                 cmdUrl.replace('\'', "%27");
@@ -1207,9 +1236,14 @@
     }
     else
     {
+        /* This bit is causing me issues. Video and flash works fine, however audio files cause myth to lose the focus
+           and the external player is launched but doesn't have the focus, so key presses aren't being passed on.
+        */
         if (command_string.contains("%s"))
+            //command_string = "mplayer "+filename;
             command_string = command_string.replace(QRegExp("%s"), filename);
-
+		
+        cout << command_string << endl;
         myth_system(command_string);
     }
 
Index: mythplugins/mythnews/mythnews/newsengine.cpp
===================================================================
--- mythplugins/mythnews/mythnews/newsengine.cpp	(revision 16834)
+++ mythplugins/mythnews/mythnews/newsengine.cpp	(working copy)
@@ -55,6 +55,14 @@
 
 }
 
+const QString& NewsArticle::parent()
+{
+	//Added this function to allow for media downloads
+
+	return m_parent->name();
+}
+
+
 NewsSite::NewsSite(const QString& name,
                    const QString& url,
                    const QDateTime& updated)
Index: mythplugins/mythnews/mythnews/newsengine.h
===================================================================
--- mythplugins/mythnews/mythnews/newsengine.h	(revision 16834)
+++ mythplugins/mythnews/mythnews/newsengine.h	(working copy)
@@ -52,6 +52,8 @@
     const QString& thumbnail() const { return m_thumbnail; }
     const QString& mediaURL() const { return m_mediaURL; }
     const QString& enclosure() const { return m_enclosure; }
+    const QString& parent();
+    const QString& type() const {return m_enclosureType; }
 
 private:
 

