Ticket #12680: 20160315 manglestorage.patch

File 20160315 manglestorage.patch, 1.6 KB (added by thigger@…, 8 years ago)

Patch I'm running with at present (may not be recommended!)

  • mythtv/libs/libmythbase/storagegroup.cpp

    diff --git a/mythtv/libs/libmythbase/storagegroup.cpp b/mythtv/libs/libmythbase/storagegroup.cpp
    index ae6a96c..de2ea2e 100644
    a b QString StorageGroup::GetRelativePathname(const QString &filename) 
    509509 *  \param dirlist  Optional pointer to a QStringList to hold found dir list
    510510 *  \return         true if directories were found
    511511 */
    512 bool StorageGroup::FindDirs(const QString group, const QString hostname,
     512bool StorageGroup::FindDirs(QString group, const QString hostname,
    513513                            QStringList *dirlist)
    514514{
    515515    bool found = false;
    bool StorageGroup::FindDirs(const QString group, const QString hostname, 
    521521    QString sql = "SELECT DISTINCT dirname "
    522522                  "FROM storagegroup ";
    523523
     524    if (group.isEmpty())
     525       {
     526               group="Default";
     527       }
     528
     529       //TL change ***
     530
     531
    524532    if (!group.isEmpty())
    525533    {
    526534        sql.append("WHERE groupname = :GROUP");
    QString StorageGroup::GetGroupToUse( 
    864872        {
    865873            LOG(VB_FILE, LOG_DEBUG,
    866874                    QString("GetGroupToUse(): "
    867                             "falling back to Videos Storage Group for host %1 "
     875                            "falling back to Default Storage Group for host %1 "
    868876                            "since it does not have a %2 Storage Group.")
    869877                    .arg(host).arg(sgroup));
    870878
    871             tmpGroup = "Videos";
     879            tmpGroup = "Default";
    872880            s_groupToUseCache[groupKey] = tmpGroup;
    873881        }
    874882    }