Changeset 156 for smplayer/trunk/src/findsubtitles/osclient.cpp
- Timestamp:
- Feb 21, 2014, 5:26:03 PM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 154
- Property svn:mergeinfo changed
-
smplayer/trunk/src/findsubtitles/osclient.cpp
r142 r156 35 35 qDebug("OSClient::login"); 36 36 37 QString user_agent = "SMPlayer v" + stableVersion();37 QString user_agent = "SMPlayer v" + Version::stable(); 38 38 qDebug("OSClient::login: user agent: %s", user_agent.toUtf8().constData()); 39 39 … … 78 78 m["moviebytesize"] = QString::number(search_size); 79 79 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. 80 87 QVariantList list; 88 list.append(m); 89 list.append(m); 81 90 list.append(m); 82 91 … … 136 145 } 137 146 147 s_list.clear(); 148 138 149 QVariantList data = m["data"].toList(); 139 150 qDebug("OSClient::responseSearch: data count: %d", data.count()); … … 147 158 sub.releasename = m["MovieReleaseName"].toString(); 148 159 sub.movie = m["MovieName"].toString(); 160 #ifdef USE_QUAZIP 149 161 sub.link = m["ZipDownloadLink"].toString(); 162 #else 163 sub.link = m["SubDownloadLink"].toString(); 164 #endif 150 165 sub.date = m["SubAddDate"].toString(); 151 166 sub.iso639 = m["ISO639"].toString();
Note:
See TracChangeset
for help on using the changeset viewer.