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
//! Subtitle search on a paired server's item (P8-07): the server the user
//! is at home on (SB) passes `SearchSubtitles`, `DownloadSubtitle` and
//! `RemoveSubtitleDownload` of a `fed:` item to the server whose item it
//! is (SA), which plans the play and burns subtitles in, so the file must
//! be there.
//!
//! SA searches with its own sites and ranking, ordered by the user's own
//! SDH and forced choices on SB, and keeps what it downloads as its own,
//! for everyone. Every user of SB's together gets one daily allowance on
//! SA (`subtitles { daily_limit_per_peer }`), counted under the pair and
//! never under SB's users, whom SA never names; SB holds each of its users
//! to its own per-user limit first.
//!
//! Each ask arrives on the pair's connection, which proves who sends it,
//! as an assertion does (P8-03): the user is SB's local account, by its
//! stable id.
use ;
use SubtitlePreferences;
/// `SearchSubtitles` of SA's item `item` for SB's `user`: `SubtitleResults`,
/// or `Failed`.
/// `DownloadSubtitle` of result `result` of a search for SA's `item`, for
/// SB's `user`: `SubtitleDownloaded`, or `Failed`.
/// `RemoveSubtitleDownload` of download `download` of SA's `item`, for SB's
/// `user`: `Done`, or `Failed`.