aboutsummaryrefslogtreecommitdiff
path: root/c/data.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-24 15:17:08 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-24 15:17:33 +0200
commit6fd66a9264731bd7ee6d7602675965021d929a4a (patch)
treee94fc63efb823ad2f5c9ef6de6188da389a08d38 /c/data.h
parentff48d644a45dd71098ecb9007a41807fb37d0081 (diff)
downloadEpisodeBrowser-6fd66a9264731bd7ee6d7602675965021d929a4a.tar.gz
Remove Prolog dependency.
The only thing left to reimplement is the tracking of watched episodes in MPC-HC.
Diffstat (limited to 'c/data.h')
-rw-r--r--c/data.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/c/data.h b/c/data.h
index b974cec..1216359 100644
--- a/c/data.h
+++ b/c/data.h
@@ -4,9 +4,7 @@
#include <stdexcept>
#include <windows.h>
-#include "pl.h"
#include "util.h"
-#include "wcharptr.h"
#include "win.h"
/* Fetch data from the web. */
@@ -172,54 +170,4 @@ struct FileView
}
};
-inline int FromWeb(const int iEp, ElvDataA& e, DlvDataA& d) noexcept
-{
- WcharPtr title, wiki, date, source, hint;
- const int r = Pl("episode_data","fetch_episode_data",iEp,&title,&wiki,&date,&source,&hint);
- if (title) Wcscpy(e.title, title);
- if (wiki) Wcscpy(d.wiki, wiki);
- if (date) Wcscpy(d.date, date);
- if (source) Wcscpy(d.source, source);
- if (hint) Wcscpy(d.hint, hint);
- return r;
-}
-
-inline bool FromProlog(const int iEp, ElvDataA& e) noexcept
-{
- if (WcharPtr title; Pl("episode_data","episode_title",iEp,&title))
- Wcscpy(e.title, title);
- else
- return false;
-
- int rating;
- if (Pl("episode_data","episode_rating",iEp,&rating)) {
- e.rating = rating;
- Swprintf(e.sRating, L"%d", e.rating);
- }
-
- if (Pl("episode_data","tv_original",iEp))
- e.bTVOriginal = true;
-
- if (Pl("track_episodes","watched",iEp))
- e.bWatched = true;
-
- Swprintf(e.siEp, L"%d", iEp);
-
- return true;
-}
-
-inline void FromProlog(const int iEp, DlvDataA& d) noexcept
-{
- if (WcharPtr wiki; Pl("episode_data","episode_wiki",iEp,&wiki))
- Wcscpy(d.wiki, wiki);
- if (WcharPtr screenwriter; Pl("episode_data","episode_datum",iEp,"Screenwriter",&screenwriter))
- Wcscpy(d.screenwriter, screenwriter);
- if (WcharPtr date; Pl("episode_data","episode_datum",iEp,"Date",&date))
- Wcscpy(d.date, date);
- if (WcharPtr source; Pl("episode_data","episode_datum",iEp,"Source",&source))
- Wcscpy(d.source, source);
- if (WcharPtr hint; Pl("episode_data","episode_datum",iEp,"Hint",&hint))
- Wcscpy(d.hint, hint);
-}
-
#endif