diff -Naur mythplugins.orig/mythmusic/mythmusic/avfdecoder.cpp mythplugins/mythmusic/mythmusic/avfdecoder.cpp
--- mythplugins.orig/mythmusic/mythmusic/avfdecoder.cpp	2009-03-21 23:20:31.000000000 +0100
+++ mythplugins/mythmusic/mythmusic/avfdecoder.cpp	2009-03-22 00:43:52.000000000 +0100
@@ -7,8 +7,8 @@
        qemacs team for their av support which I used to understand the libraries
        getid3.sourceforget.net project for the ASF information used here
 
-    This library decodes Windows Media (WMA/ASF) files into PCM data
-    returned to the MythMusic output buffer.
+    This library decodes various media files into PCM data 
+    returned to the MythMusic output buffer.  
 
     Revision History
         - Initial release
@@ -39,6 +39,7 @@
 #include "metaiotaglib.h"
 #include "metaioflacvorbiscomment.h"
 #include "metaiooggvorbiscomment.h"
+#include "metaiowavpack.h"
 
 
 avfDecoder::avfDecoder(const QString &file, DecoderFactory *d, QIODevice *i,
@@ -424,6 +425,8 @@
         return new MetaIOOggVorbisComment();
     else if (extension == "flac")
         return new MetaIOFLACVorbisComment();
+    else if (extension == "wv")
+        return new MetaIOWavPack();
     else
         return new MetaIOAVFComment();
 }
@@ -443,7 +446,7 @@
 const QString &avfDecoderFactory::extension() const
 {
     static QString ext(".mp3|.mp2|.ogg|.flac|.wma|.wav|.ac3|.oma|.omg|.atp|"
-                       ".ra|.dts");
+                       ".ra|.dts|.wv");
     return ext;
 }
 
diff -Naur mythplugins.orig/mythmusic/mythmusic/metaiowavpack.cpp mythplugins/mythmusic/mythmusic/metaiowavpack.cpp
--- mythplugins.orig/mythmusic/mythmusic/metaiowavpack.cpp	1970-01-01 01:00:00.000000000 +0100
+++ mythplugins/mythmusic/mythmusic/metaiowavpack.cpp	2009-03-22 00:42:00.000000000 +0100
@@ -0,0 +1,199 @@
+#include <math.h>
+
+#include "metaiowavpack.h"
+#include "metadata.h"
+
+#include <apetag.h>
+#include <apeitem.h>
+
+#include <mythtv/mythcontext.h>
+
+MetaIOWavPack::MetaIOWavPack(void)
+    : MetaIO(".wv")
+{
+}
+
+MetaIOWavPack::~MetaIOWavPack(void)
+{
+}
+
+/*!
+ * \brief Writes metadata back to a file
+ *
+ * \param mdata A pointer to a Metadata object
+ * \param exclusive Flag to indicate if only the data in mdata should be
+ *                  in the file. If false, any unrecognised tags already
+ *                  in the file will be maintained.
+ * \returns Boolean to indicate success/failure.
+ */
+bool MetaIOWavPack::write(Metadata* mdata, bool exclusive)
+{
+    (void) exclusive;
+
+    if (!mdata)
+        return false;
+
+    TagLib::WavPack::File *taglib = 
+    	new TagLib::WavPack::File(mdata->Filename().local8Bit());
+
+    Tag *tag = taglib->tag();
+
+    if (!tag)
+    {
+        if (taglib)
+            delete taglib;
+        return false;
+    }
+
+    if (!mdata->Artist().isEmpty())
+        tag->setArtist(QStringToTString(mdata->Artist()));
+
+    // APE Only Tags
+    if (taglib->APETag())
+    {
+        // Compilation Artist ("Album artist")
+	    if (mdata->Compilation())
+    	{
+    		TagLib::String key="Album artist";
+    		TagLib::APE::Item item=TagLib::APE::Item(key, 
+    			QStringToTString(mdata->CompilationArtist()));
+   			taglib->APETag()->setItem(key, item);
+	    }
+	    else
+    	{
+            taglib->APETag()->removeItem("Album artist");
+	    }
+	}
+
+    if (!mdata->Title().isEmpty())
+        tag->setTitle(QStringToTString(mdata->Title()));
+
+    if (!mdata->Album().isEmpty())
+        tag->setAlbum(QStringToTString(mdata->Album()));
+
+    if (mdata->Year() > 999 && mdata->Year() < 10000) // 4 digit year.
+        tag->setYear(mdata->Year());
+
+    if (!mdata->Genre().isEmpty())
+        tag->setGenre(QStringToTString(mdata->Genre()));
+
+    if (0 != mdata->Track())
+        tag->setTrack(mdata->Track());
+
+    bool result = taglib->save();
+
+    if (taglib)
+        delete taglib;
+
+    return (result);
+}
+
+
+/*!
+ * \brief Reads Metadata from a file.
+ *
+ * \param filename The filename to read metadata from.
+ * \returns Metadata pointer or NULL on error
+ */
+Metadata* MetaIOWavPack::read(QString filename)
+{
+    QString artist = "", compilation_artist = "", album = "", title = "",
+            genre = "";
+    int year = 0, tracknum = 0, length = 0, playcount = 0, rating = 0, id = 0;
+    bool compilation = false;
+    QValueList<struct AlbumArtImage> albumart;
+
+    QString extension = filename.section( '.', -1 ) ;
+
+    TagLib::WavPack::File *taglib = 
+    	new TagLib::WavPack::File(filename.local8Bit());
+
+    Tag *tag = taglib->tag();
+
+    if (!tag)
+    {
+        if (taglib)
+            delete taglib;
+        return NULL;
+    }
+
+    // Basic Tags
+    if (! tag->isEmpty())
+    {
+        title = TStringToQString(tag->title()).stripWhiteSpace();
+        artist = TStringToQString(tag->artist()).stripWhiteSpace();
+        album = TStringToQString(tag->album()).stripWhiteSpace();
+        tracknum = tag->track();
+        year = tag->year();
+        genre = TStringToQString(tag->genre()).stripWhiteSpace();
+    }
+
+    // APE Only Tags
+    if (taglib->APETag())
+    {
+        // Compilation Artist ("Album artist")
+        if(taglib->APETag()->itemListMap().contains("Album artist"))
+        {
+        	compilation = true;
+            compilation_artist = TStringToQString(
+            taglib->APETag()->itemListMap()["Album artist"].toString())
+            .stripWhiteSpace();
+        }
+
+    }
+
+    // Fallback to filename reading
+    if (title.isEmpty())
+    {
+        readFromFilename(filename, artist, album, title, genre, tracknum);
+    }
+
+    if (length <= 0 && taglib->audioProperties())
+        length = taglib->audioProperties()->length() * 1000;
+
+    if (taglib)
+        delete taglib;
+
+    // If we didn't get a valid length, add the metadata but show warning.
+    if (length <= 0)
+        VERBOSE(VB_GENERAL, QString("MetaIOWavPack: Failed to read length "
+                "from '%1'. It may be corrupt.").arg(filename));
+
+    // If we don't have title and artist or don't have the length return NULL
+    if (title.isEmpty() && artist.isEmpty())
+    {
+        VERBOSE(VB_IMPORTANT, 
+        	QString("MetaIOWavPack: Failed to read metadata from '%1'")
+                .arg(filename));
+        return NULL;
+    }
+
+    Metadata *retdata = new Metadata(filename, artist, compilation_artist, album,
+                                     title, genre, year, tracknum, length,
+                                     id, rating, playcount);
+
+    retdata->setCompilation(compilation);
+
+    return retdata;
+}
+
+/*!
+ * \brief Find the length of the track (in seconds)
+ *
+ * \param filename The filename for which we want to find the length.
+ * \returns An integer (signed!) to represent the length in seconds.
+ */
+int MetaIOWavPack::getTrackLength(QString filename)
+{
+    int seconds = 0;
+    TagLib::WavPack::File *taglib = 
+    	new TagLib::WavPack::File(filename.local8Bit());
+
+    if (taglib)
+    {
+        seconds = taglib->audioProperties()->length();
+        delete taglib;
+    }
+
+    return seconds;
+}
diff -Naur mythplugins.orig/mythmusic/mythmusic/metaiowavpack.h mythplugins/mythmusic/mythmusic/metaiowavpack.h
--- mythplugins.orig/mythmusic/mythmusic/metaiowavpack.h	1970-01-01 01:00:00.000000000 +0100
+++ mythplugins/mythmusic/mythmusic/metaiowavpack.h	2009-03-22 00:42:19.000000000 +0100
@@ -0,0 +1,26 @@
+#ifndef METAIOWAVPACK_H_
+#define METAIOWAVPACK_H_
+
+#include "metaio.h"
+#include "metadata.h"
+
+#include <wavpackfile.h>
+
+using TagLib::Tag;
+using TagLib::String;
+
+class MetaIOWavPack : public MetaIO
+{
+public:
+    MetaIOWavPack(void);
+    virtual ~MetaIOWavPack(void);
+
+    bool write(Metadata* mdata, bool exclusive = false);
+    Metadata* read(QString filename);
+
+private:
+
+    int getTrackLength(QString filename);
+};
+
+#endif
diff -Naur mythplugins.orig/mythmusic/mythmusic/mythmusic.pro mythplugins/mythmusic/mythmusic/mythmusic.pro
--- mythplugins.orig/mythmusic/mythmusic/mythmusic.pro	2009-03-21 23:20:31.000000000 +0100
+++ mythplugins/mythmusic/mythmusic/mythmusic.pro	2009-03-22 00:35:13.000000000 +0100
@@ -31,6 +31,7 @@
 HEADERS += bumpscope.h globalsettings.h lameencoder.h dbcheck.h
 HEADERS += metaio.h metaiotaglib.h vcedit.h metaiooggvorbiscomment.h
 HEADERS += metaioflacvorbiscomment.h metaioavfcomment.h
+HEADERS += metaiowavpack.h
 HEADERS += goom/filters.h goom/goomconfig.h goom/goom_core.h goom/graphic.h
 HEADERS += goom/ifs.h goom/lines.h goom/mythgoom.h goom/drawmethods.h
 HEADERS += goom/mmx.h goom/mathtools.h goom/tentacle3d.h goom/v3d.h
@@ -49,6 +50,7 @@
 SOURCES += databasebox.cpp genres.cpp
 SOURCES += metaio.cpp metaiotaglib.cpp vcedit.c metaiooggvorbiscomment.cpp
 SOURCES += metaioflacvorbiscomment.cpp metaioavfcomment.cpp
+SOURCES += metaiowavpack.cpp
 SOURCES += goom/filters.c goom/goom_core.c goom/graphic.c goom/tentacle3d.c
 SOURCES += goom/ifs.c goom/ifs_display.c goom/lines.c goom/surf3d.c
 SOURCES += goom/zoom_filter_mmx.c goom/zoom_filter_xmmx.c goom/mythgoom.cpp
