Initial work on downloading cards through fallback URLs.

This change will add in the ability to proceed to the next URL
should the first one fail.  First trial shows that it's working,
but needs more refinement.
This commit is contained in:
Andrew Zwicky 2018-08-08 22:42:22 -05:00
parent e467698d72
commit 8239539946
2 changed files with 90 additions and 64 deletions

View file

@ -18,7 +18,12 @@ private:
CardInfoPtr card;
QList<CardSetPtr> sortedSets;
QList<QString> urlTemplates;
QString currentUrl;
bool customSetPicturesChecked;
bool urlInitialized;
int setIndex;
int urlIndex;
public:
PictureToLoad(CardInfoPtr _card = CardInfoPtr());
@ -31,8 +36,11 @@ public:
card.clear();
}
CardSetPtr getCurrentSet() const;
QString getCurrentUrl();
QString getSetName() const;
QString transformUrl() const;
bool nextSet();
bool nextUrl();
};
class PictureLoaderWorker : public QObject