Index: mythtv/libs/libmythtv/recordingprofile.cpp
===================================================================
--- mythtv/libs/libmythtv/recordingprofile.cpp	(revision 25616)
+++ mythtv/libs/libmythtv/recordingprofile.cpp	(working copy)
@@ -1267,58 +1267,14 @@
         isEncoder = CardUtil::IsEncoder(type);
     }
 
-    if (isEncoder)
-    {
-        QString tvFormat = gCoreContext->GetSetting("TVFormat");
-        if (type.toUpper() != "HDPVR")
-            addChild(new ImageSize(*this, tvFormat, profileName));
-
-        videoSettings = new VideoCompressionSettings(*this, profileName);
-        addChild(videoSettings);
-
-        audioSettings = new AudioCompressionSettings(*this, profileName);
-        addChild(audioSettings);
-
-        if (!profileName.isEmpty() && profileName.left(11) == "Transcoders")
-        {
-            connect(tr_resize,   SIGNAL(valueChanged   (bool)),
-                    this,        SLOT(  ResizeTranscode(bool)));
-            connect(tr_lossless, SIGNAL(valueChanged        (bool)),
-                    this,        SLOT(  SetLosslessTranscode(bool)));
-            connect(tr_filters,  SIGNAL(valueChanged(const QString&)),
-                    this,        SLOT(FiltersChanged(const QString&)));
+    CompleteLoad(profileId, type);
         }
-    }
-    else if (type.toUpper() == "DVB")
-    {
-        addChild(new RecordingType(*this));
-    }
 
-    id->setValue(profileId);
-    Load();
-}
 
-void RecordingProfile::FiltersChanged(const QString &val)
-{
-    if (!tr_filters || !tr_lossless)
-      return;
-
-    // If there are filters, we can not do lossless transcoding
-    if (!val.trimmed().isEmpty())
-    {
-       tr_lossless->setValue(false);
-       tr_lossless->setEnabled(false);
-    }
-    else
-    {
-       tr_lossless->setEnabled(true);
-    }
-}
-
 bool RecordingProfile::loadByType(const QString &name, const QString &cardtype)
 {
     QString hostname = gCoreContext->GetHostName().toLower();
-    uint recid = 0;
+    uint profileId = 0;
 
     MSqlQuery result(MSqlQuery::InitCon());
     result.prepare(
@@ -1339,20 +1295,22 @@
 
     while (result.next())
     {
+        if ((result.value(1).toString().toLower() == hostname) ||
+            (result.value(2).toInt() == 1))
+        {
+            profileId = result.value(0).toUInt();
+
         if (result.value(1).toString().toLower() == hostname)
-        {
-            recid = result.value(0).toUInt();
             break;
         }
-        else if (result.value(2).toInt() == 1)
-        {
-            recid = result.value(0).toUInt();
         }
-    }
 
-    if (recid)
+    if (profileId)
     {
-        loadByID(recid);
+        if (profileName.isEmpty())
+            profileName = name;
+        isEncoder = CardUtil::IsEncoder(cardtype);
+        CompleteLoad(profileId, cardtype);
         return true;
     }
 
@@ -1363,7 +1321,7 @@
 {
     MSqlQuery result(MSqlQuery::InitCon());
     result.prepare(
-        "SELECT recordingprofiles.id "
+        "SELECT recordingprofiles.id, cardtype "
         "FROM recordingprofiles, profilegroups "
         "WHERE recordingprofiles.profilegroup = profilegroups.id AND "
         "      profilegroups.name             = :GROUPNAME       AND "
@@ -1379,13 +1337,69 @@
 
     if (result.next())
     {
-        loadByID(result.value(0).toUInt());
+        uint profileId = result.value(0).toUInt();
+        QString type = result.value(1).toString();
+
+        if (profileName.isEmpty())
+            profileName = name;
+        isEncoder = CardUtil::IsEncoder(type);
+        CompleteLoad(profileId, type);
         return true;
     }
 
     return false;
 }
 
+void RecordingProfile::CompleteLoad(int profileId, QString type)
+{
+    if (isEncoder)
+    {
+        QString tvFormat = gCoreContext->GetSetting("TVFormat");
+        if (type.toUpper() != "HDPVR")
+            addChild(new ImageSize(*this, tvFormat, profileName));
+
+        videoSettings = new VideoCompressionSettings(*this, profileName);
+        addChild(videoSettings);
+
+        audioSettings = new AudioCompressionSettings(*this, profileName);
+        addChild(audioSettings);
+
+        if (!profileName.isEmpty() && profileName.left(11) == "Transcoders")
+        {
+            connect(tr_resize,   SIGNAL(valueChanged   (bool)),
+                    this,        SLOT(  ResizeTranscode(bool)));
+            connect(tr_lossless, SIGNAL(valueChanged        (bool)),
+                    this,        SLOT(  SetLosslessTranscode(bool)));
+            connect(tr_filters,  SIGNAL(valueChanged(const QString&)),
+                    this,        SLOT(FiltersChanged(const QString&)));
+        }
+    }
+    else if (type.toUpper() == "DVB")
+    {
+        addChild(new RecordingType(*this));
+    }
+
+    id->setValue(profileId);
+    Load();
+}
+
+void RecordingProfile::FiltersChanged(const QString &val)
+{
+    if (!tr_filters || !tr_lossless)
+      return;
+
+    // If there are filters, we can not do lossless transcoding
+    if (!val.trimmed().isEmpty())
+    {
+       tr_lossless->setValue(false);
+       tr_lossless->setEnabled(false);
+    }
+    else
+    {
+       tr_lossless->setEnabled(true);
+    }
+}
+
 void RecordingProfile::setCodecTypes()
 {
     if (videoSettings)
Index: mythtv/libs/libmythtv/recordingprofile.h
===================================================================
--- mythtv/libs/libmythtv/recordingprofile.h	(revision 25616)
+++ mythtv/libs/libmythtv/recordingprofile.h	(working copy)
@@ -88,6 +88,7 @@
     virtual void loadByID(int id);
     virtual bool loadByType(const QString &name, const QString &cardtype);
     virtual bool loadByGroup(const QString &name, const QString &group);
+    virtual void CompleteLoad(int profileId, QString type);
     virtual DialogCode exec(void);
 
     // sets
