-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.json
More file actions
113 lines (113 loc) · 7.09 KB
/
Copy pathplugin.json
File metadata and controls
113 lines (113 loc) · 7.09 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
"name": "Distalker",
"version": "0.9.3",
"description": "Stalker/MAG portal support for Dispatcharr. Syncs portal channels into a native M3U account and resolves short-lived stream links at tune time -- no extra containers, no extra ports.",
"author": "PiloUnk",
"license": "AGPL-3.0-only",
"repo_url": "https://github.com/PiloUnk/distalker",
"help_url": "https://github.com/PiloUnk/distalker#readme",
"fields": [
{
"id": "how_info",
"label": "One line per portal",
"type": "info",
"description": "Write your portals below, then press Sync in the Actions tab -- it saves this panel first, so there is no need to press Save yourself. Only what you changed is fetched: adding a portal does not re-download the ones that already work. Nothing here updates on its own, so press the refresh icon at the top of the Plugins page to read what an action reported."
},
{
"id": "portals",
"label": "Portals",
"type": "text",
"default": "",
"placeholder": "http://portal.example.com:8080/c/ | 00:1A:79:AA:BB:CC",
"help_text": "Portal URL | MAC address, one line each. The name is taken from the host, so put one in front only if you want a different label -- or if two portals share a host, which the sync will then ask you to do. Trailing key=value pairs cover the rest: username, password, max_streams, model, serial, device_id, device_id2, timezone, and epg=1 to fetch this portal's programme guide (epg_hours=48 for more than a day -- a guide is by far the largest thing a sync downloads, which is why it is off unless asked for). A line starting with '#' is ignored, which is how you suspend a portal without losing its channels. Credentials are stored unencrypted and are visible in this box."
},
{
"id": "status",
"label": "Last action",
"type": "text",
"default": "",
"placeholder": "Nothing has run yet.",
"help_text": "What the most recent action did. Overwritten every time one runs; editing it changes nothing."
},
{
"id": "advanced_info",
"label": "Advanced",
"type": "info",
"description": "Everything below has a working default and applies to every portal. You should not have to touch any of it."
},
{
"id": "fallback_profile",
"label": "Fallback stream profile",
"type": "string",
"default": "ffmpeg",
"placeholder": "ffmpeg",
"help_text": "Dispatcharr picks the stream profile per channel, not per source, so a channel that mixes a portal source with another provider's sends both to this plugin. Name the profile that should play those other sources. It must be a command profile: 'Proxy' and 'Redirect' are handled inside Dispatcharr and cannot be stood in for, so naming one falls back to a plain ffmpeg remux. Published on each Sync."
},
{
"id": "ffmpeg_args",
"label": "ffmpeg arguments",
"type": "text",
"default": "-hide_banner -loglevel info -stats -user_agent {ua} -referer {referer} -headers {headers} -rw_timeout 10000000 -i {url} -c copy -f mpegts pipe:1",
"help_text": "Placeholders: {url} resolved stream, {ua} MAG user agent, {referer} portal origin, {headers} the remaining MAG headers. Must write MPEG-TS to pipe:1. Note the absence of ffmpeg's -reconnect options: they retry a portal link that has already expired, and while they do, Dispatcharr cannot tell the source is dead and will not fail over to the channel's other sources. -rw_timeout gives up on a stalled read after 10 seconds, which is what turns a frozen source into a switch to the next one. -loglevel info and -stats are what fill Dispatcharr's stream statistics: it reads them off ffmpeg's own output, so quietening them leaves the channel playing with an empty panel."
},
{
"id": "portal_timeout",
"label": "Portal request timeout (seconds)",
"type": "number",
"default": 60,
"min": 5,
"help_text": "How long to wait for any single portal request. The channel list arrives in one response, and a busy portal can take minutes to assemble it, so raise this if Test or Sync reports a timeout. It travels with each portal, so tuning waits just as long."
},
{
"id": "auto_apply_profile",
"label": "Auto-assign the Distalker stream profile",
"type": "boolean",
"default": true,
"help_text": "Give a channel the Distalker profile as soon as it gains a portal stream, again after every M3U refresh, and once more if a channel ever fails to start -- which repairs any channel created while the plugin was disabled or upgrading. Dispatcharr resolves stream profiles per channel, so a channel without it will not tune its portal source. A channel that also holds sources from other providers gets the profile too -- those sources then play through the fallback profile above instead of Dispatcharr's direct relay."
},
{
"id": "refresh_hours",
"label": "Refresh every (hours)",
"type": "number",
"default": 0,
"help_text": "0 keeps everything manual: portals are only fetched when you press Sync. Any other value asks Dispatcharr to refresh this plugin's M3U accounts on that schedule, and each refresh re-fetches its portal -- channels and, where 'epg=1' is set, the programme guide. Minimum 1 hour."
}
],
"actions": [
{
"id": "test_portals",
"label": "1. Test",
"description": "Authenticate against every listed portal and read its group list, which answers straight away. Changes nothing, in Dispatcharr or at the portal. Optional, but it is the cheap way to find out that a MAC is wrong -- before a download that can take minutes tells you the same thing.",
"button_label": "Test",
"button_variant": "light"
},
{
"id": "sync_now",
"label": "2. Sync",
"description": "Apply the portal list and fetch what changed: portals you added or edited are downloaded, ones you deleted stop resolving, and the rest are left alone. Runs in the background and reports into 'Last action', because a busy portal can take minutes to answer. From here on, this is the only button you should need.",
"button_label": "Sync",
"button_variant": "filled"
},
{
"id": "resync_all",
"label": "Re-fetch everything",
"description": "Download every portal's channel list again, changed or not. Sync only fetches what you edited, so this is how you pick up a line-up that changed at the provider. Slow, and it spends one connection per portal.",
"button_label": "Re-fetch all",
"button_variant": "light",
"events": [
"m3u_refresh"
]
},
{
"id": "apply_profile",
"label": "Assign the stream profile",
"description": "Point every Distalker channel at the Distalker stream profile, without which a channel cannot tune, and republish the portals the resolver reads at tune time. Runs by itself after each M3U refresh, and again whenever a channel fails to start, unless you turned that off -- so you should rarely need this button.",
"button_label": "Assign",
"button_variant": "light",
"events": [
"m3u_refresh",
"channel_error"
]
}
]
}