aboutsummaryrefslogtreecommitdiff
path: root/README
blob: e5003520dc1a7c53e00a10585daec4a54db90f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

E P I S O D E   B R O W S E R
d o c u m e n t a t i o n

Introduction
~~~~~~~~~~~~
Episode Browser is a simple graphical program that offers an interface
to episodes of TV series stored on the local hard drive. It offers
ways of keeping track of watched and unwatched episodes, as well as
fetching episode information from the internet.

In its current form, it is designed specifically for Detective Conan.

Backend
~~~~~~~
The fundamental features of Episode Browser, such as detecing and
keeping track of local episodes, fetching information from the
internet and interacting with the MPC-HC media player, are implemented
in Prolog (see the pl folder).

At the time of writing, the backend implementation is tightly coupled
to the author's specific system. To be used for anything else than
episodes of Detective Conan stored in a specific folder on the hard
drive, the predicates defined in local_episodes.pl must be modified
and the program recompiled. To fetch episode information from other
sources than Detective Conan World, the episode_data.pl file must be
modified.

Frontend
~~~~~~~~
The graphical interface is implemented in C++ using the Win32 API (see
the c folder). The source code is spread across a small number of
files. For an overview of the classes/functions provided by each file,
see defs.h. In summary:

main.cpp		Entry point and initialization. Contains the main event handler.
listview.cpp		Creates and handles the shared aspects of the two list views.
episodelistview.cpp	Defines the interface to the episode list view.
datalistview.cpp	Defines the interface to the data list view.
pl.cpp			Interface to Prolog backend.
common.cpp		Some useful functions that don't fit elsewhere.

The C++ frontend communicates with the Prolog backend via a couple of
variadic printf-like functions defined in pl.cpp. For example,

	Pl("episode_data","episode_title","Is",i,&sz)

calls the Prolog predicate episode_data:episode_title/2. The first
argument is an integer input, denoted by an uppercase I. The second
argument is a zero-terminated string output, denoted by a lowercase s.
Given i = 100, the call puts the title of episode 100 into the buffer
pointed at by sz. For more information, see pl.cpp.