From 0c996d6836defcc190a4f071437d95cb1f5140cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 4 Apr 2022 01:22:58 +0200 Subject: Rewrite episode data code. TODO: Ignore duplicate hints. --- c/episodelistview.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'c/episodelistview.c') 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); -- cgit v1.2.3