Library to use thetvdb.com XML API with Qt. You'll need an API key to use this software, you can get one from thetvdb.com. Used by Series Watcher. This project is not maintained anymore, feel free to fork.
Download
- Source
-
qttvdb-0.4.0.tar.gz
qttvdb-0.4.0.tar.bz2 - Gentoo
- qttvdb-0.4.0.ebuild (dev-libs/qttvdb)
Build
You can build it easily with Qt Creator. You'll need Qt, CMake. Or you can also directly use cmake:
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install
Documentation
Documentation is available here
Example
#include <QDebug>
#include "test.h"
Test::Test() {
m = new QtTvDB::Mirrors("5C9847FB5B186042");
nm = new QNetworkAccessManager();
QNetworkReply *rep = nm->get(QNetworkRequest(m->bannersUrl(73739)));
connect(rep, SIGNAL(finished()), this, SLOT(finished()));
}
void
Test::finished() {
QNetworkReply *reply = dynamic_cast < QNetworkReply * > (sender());
QString data = reply->readAll();
QList < QtTvDB::Banner * > list = QtTvDB::Banner::parseBanners(data);
reply->deleteLater();
}