Ignore:
Timestamp:
Oct 9, 2014, 2:54:21 PM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: updated trunk to 14.9.0

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

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

    r165 r170  
    2020#include "version.h"
    2121
    22 OSClient::OSClient(QObject* parent) : QObject(parent), logged_in(false), search_size(0) {
     22OSClient::OSClient(QObject* parent) :
     23        QObject(parent)
     24        , logged_in(false)
     25        , search_size(0)
     26#ifdef OS_SEARCH_WORKAROUND
     27        , best_search_count(0)
     28#endif
     29{
    2330        rpc = new MaiaXmlRpcClient(QUrl("http://api.opensubtitles.org/xml-rpc"), this);
    2431}
     
    6673}
    6774
     75
    6876void OSClient::doSearch() {
     77
     78
     79
     80
     81
     82
     83
     84
    6985        qDebug("OSClient::doSearch");
    7086
     
    7490        m["moviebytesize"] = QString::number(search_size);
    7591
    76         // For some reason it seems opensubtitles fails
    77         // sometimes if there's only one item in the list.
    78         // So as workaround, the item is appended twice.
    79 
    80         // Update: and the opposite, sometimes it doesn't return any
    81         // result with 2 items but it does with 1.
    82         // Workaround: use 3 items... Seems to work in all cases.
    8392        QVariantList list;
     93
     94
     95
     96
     97
     98
     99
    84100        list.append(m);
    85         list.append(m);
    86         list.append(m);
    87         list.append(m);
    88         //list.append(m);
    89         list.append(m); // Adding more, sometimes it keeps failing...
     101#endif
    90102
    91103        QVariantList args;
     
    148160        QVariantList data = m["data"].toList();
    149161        qDebug("OSClient::responseSearch: data count: %d", data.count());
     162
     163
     164
     165
     166
     167
     168
     169
    150170
    151171        for (int n = 0; n < data.count(); n++) {
Note: See TracChangeset for help on using the changeset viewer.