aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-04 01:22:58 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-04 01:22:58 +0200
commit0c996d6836defcc190a4f071437d95cb1f5140cb (patch)
tree3af475d4e6f8730279ade1fcd66cf7d33f950a3e /c/episodelistview.c
parent12176831abde1f4545fae95ee9edd5688f8cc584 (diff)
downloadEpisodeBrowser-0c996d6836defcc190a4f071437d95cb1f5140cb.tar.gz
Rewrite episode data code.
TODO: Ignore duplicate hints.
Diffstat (limited to 'c/episodelistview.c')
-rw-r--r--c/episodelistview.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 0a85635..1389f53 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -175,6 +175,7 @@ ElvUpdate()
lviName.mask = LVIF_TEXT;
t = T(1);
+ P("episode_data","ensure_episode_data",0,t) return;
P("episode_data","episode_count",1,t) return;
GI(t,&iEpisodes) return;
@@ -182,15 +183,15 @@ ElvUpdate()
char *szName;
int cb;
TCHAR *tszEpisode, *tszName;
- term_t t2;
+ term_t t;
/* Format name string. */
- t2 = T(3);
- PI(t2,i+1) return;
+ t = T(2);
+ PI(t,i+1) return;
tszName = NULL;
- P("episode_data","lookup_episode_local",3,t2) goto ep;
- GAC(t2+1,&szName) goto ep;
+ P("episode_data","episode_title",2,t) goto ep;
+ GAC(t+1,&szName) goto ep;
tszName = TszFromSz(szName, CP_UTF8);
if (!tszName) return;
@@ -239,9 +240,12 @@ ElvUpdateName(LPLVITEM lpLvi)
TCHAR *tszName;
term_t t;
- t = T(3);
+ t = T(2);
PI(t,lpLvi->lParam) return;
- P("episode_data","lookup_episode",3,t) return;
+ P("episode_data","episode_title",2,t) {
+ P("episode_data","fetch_episode_data",0,t) return;
+ P("episode_data","episode_title",2,t) return;
+ }
GAC(t+1,&szName) return;
tszName = TszFromSz(szName, CP_UTF8);