Ignore:
Timestamp:
Feb 21, 2014, 5:26:03 PM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to 0.8.6

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/findsubtitles/osclient.cpp

    r142 r156  
    3535        qDebug("OSClient::login");
    3636
    37         QString user_agent = "SMPlayer v" + stableVersion();
     37        QString user_agent = "SMPlayer v" + Version::stable();
    3838        qDebug("OSClient::login: user agent: %s", user_agent.toUtf8().constData());
    3939
     
    7878        m["moviebytesize"] = QString::number(search_size);
    7979
     80        // For some reason it seems opensubtitles fails
     81        // sometimes if there's only one item in the list.
     82        // So as workaround, the item is appended twice.
     83
     84        // Update: and the opposite, sometimes it doesn't return any
     85        // result with 2 items but it does with 1.
     86        // Workaround: use 3 items... Seems to work in all cases.
    8087        QVariantList list;
     88        list.append(m);
     89        list.append(m);
    8190        list.append(m);
    8291
     
    136145        }
    137146
     147        s_list.clear();
     148
    138149        QVariantList data = m["data"].toList();
    139150        qDebug("OSClient::responseSearch: data count: %d", data.count());
     
    147158                sub.releasename = m["MovieReleaseName"].toString();
    148159                sub.movie = m["MovieName"].toString();
     160#ifdef USE_QUAZIP
    149161                sub.link = m["ZipDownloadLink"].toString();
     162#else
     163                sub.link = m["SubDownloadLink"].toString();
     164#endif
    150165                sub.date = m["SubAddDate"].toString();
    151166                sub.iso639 = m["ISO639"].toString();
Note: See TracChangeset for help on using the changeset viewer.