~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to programs/mythfrontend/playbackbox.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey), Jamie Bennett, Mario Limonciello, Dave Walker (Daviey)
  • Date: 2010-03-23 19:32:33 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323193233-5sv9djoxtlmwt3ca
Tags: 0.23.0+fixes23789-0ubuntu1
[ Jamie Bennett ]
* Fix FTBFS on armel (LP: #537714)

[ Mario Limonciello ]
* mythtv-{common,backend}.{config,templates,postinst}: (LP: #483748)
  - Simplify debconf questions by avoiding showing the generated pw
  - Don't warn about mythtv group.
  - Don't notify about running mythtv-setup.  This is optional (but
    of course encouraged!)
* Set version to include a "+" delimitter.
* Restore libfaad-dev dependency. (LP: #546552)

[ Dave Walker (Daviey) ]
* New snapshot (r23789), based from 0.23-fixes.
* debian/control:
  - mythtv-frontend set to Conflict with mythflix, as it's dropped
    upstream. (LP: #544521)
  - Remove unnecessary and potentially problematic use of Pre-Depends.
  - Set the debug package to Priority extra.
  - Change *-perl Section's from libs to perl
  - add ${shlibs:Depends} for mythtv-common Depends field
  - Minor spelling fix.
  - Fixes the long description for one of the packages, ensuring the
    description doesn't exceed 80 characters.
  - Vcs-* set to -fixes, rather than -trunk.
* debian/rules:
  - Use debconf-updatepo to update translations when required
  - Ensure license files are not included in the binary packages, except 
    for debian/copyright.
  - Fixes the permissions of certain files in the packaging.
* debian/copyright:
  - updated to reflect that mythtv is GPL-2 only.
  - inserted better licence statement and Copyright reference.
* debian/mythtv-*.templates
  - Simplified strings; removed verbosity and improved readability.
* Prevent the maintainer scripts from failing in case any questions 
  can't be displayed.
* Added holding debian/mythtv-frontend.config, mainly to appease lintian.
* debian/mythtv-frontend.menu: Changed section to Applications/Graphics.
* debian/mythtv-backend.postinst: Load debconf libraries.
* debian/source.lintian-overrides: Removes the unecessary override of the 
  binNMU warnings.
* Fix perl binding installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2239
2239
QString PlaybackBox::findArtworkFile(QString &seriesID, QString &titleIn,
2240
2240
                                     QString imagetype, QString host)
2241
2241
{
2242
 
    static QHash <QString, QString>imageFileCache;
2243
 
 
2244
2242
    QString cacheKey = QString("%1:%2:%3").arg(imagetype).arg(seriesID)
2245
2243
                               .arg(titleIn);
2246
2244
 
2247
 
    if (imageFileCache.contains(cacheKey))
2248
 
        return imageFileCache[cacheKey];
 
2245
    if (m_imageFileCache.contains(cacheKey))
 
2246
        return m_imageFileCache[cacheKey];
2249
2247
 
2250
2248
    QString foundFile;
2251
2249
    QString sgroup;
2296
2294
    dir.setSorting(QDir::Name | QDir::Reversed | QDir::IgnoreCase);
2297
2295
 
2298
2296
    QStringList entries = dir.entryList();
2299
 
    QStringList sgEntries;
 
2297
    QString grpHost = sgroup + ":" + host;
2300
2298
 
2301
 
    // TODO do this in another thread
2302
 
    RemoteGetFileList(host, "", &sgEntries, sgroup, true);
 
2299
    if (!m_fileListCache.contains(grpHost))
 
2300
    {
 
2301
        // TODO do this in another thread
 
2302
        QStringList sgEntries;
 
2303
        RemoteGetFileList(host, "", &sgEntries, sgroup, true);
 
2304
        m_fileListCache[grpHost] = sgEntries;
 
2305
    }
2303
2306
 
2304
2307
    int regIndex = 0;
2305
2308
    titleIn.replace(' ', "(?:\\s|-|_|\\.)?");
2339
2342
                break;
2340
2343
            }
2341
2344
        }
2342
 
        for (QStringList::const_iterator it = sgEntries.begin();
2343
 
            it != sgEntries.end(); ++it)
 
2345
        for (QStringList::const_iterator it = m_fileListCache[grpHost].begin();
 
2346
            it != m_fileListCache[grpHost].end(); ++it)
2344
2347
        {
2345
2348
            if (re.exactMatch(*it))
2346
2349
            {
2363
2366
    if (!foundFile.isEmpty())
2364
2367
    {
2365
2368
        if (foundFile.startsWith("myth://"))
2366
 
            imageFileCache[cacheKey] = foundFile;
 
2369
            m_imageFileCache[cacheKey] = foundFile;
2367
2370
        else
2368
 
            imageFileCache[cacheKey] = QString("%1/%2").arg(localDir)
 
2371
            m_imageFileCache[cacheKey] = QString("%1/%2").arg(localDir)
2369
2372
                                               .arg(foundFile);
2370
 
        return imageFileCache[cacheKey];
 
2373
        return m_imageFileCache[cacheKey];
2371
2374
    }
2372
2375
    else
2373
2376
        return QString();