Content
The Primary JSON is used to direct weyd to the location of each Source JSON.
The layout is fairly simple and consists of arrays of URLs in elements labeled 1-10. Each URL must be a complete URL pointing to a HTTPS location accessible by weyd. The location must have a valid SSL certificate, and the best way to validate that is to open the URL in a browser on the same network as your device. If the location loads a JSON document without any Security Warnings, then weyd should have no trouble caching that document.
There are 3 directives that are not yet implemented, but it may be a good idea to add them now so that if/when they are, your JSON is in compliance. If that feature is never implemented, then their existence will not interfere with the JSON processing. They are:
- "serial_no" : Integer - An incrementing integer indicating the version/serial number of your package.
- "weyd_min" : String - The minimum weyd version required for your package (formatted v#.#.#).
- "weyd_max" : String - The maximum weyd version that supports your package (formatted v#.#.#).
Each Source JSON must be grouped in an array with a label 1-10. You are not required to have values for each label (1-10), but any label other outside of that range will be ignored.
When weyd loads your package, it will retrieve and cache each document pointed to in the array, so they do not need to be accessible after the Scraper JSON has been loaded.
When scraping, weyd will process each group in order queuing the sources based on the max # threads set in Settings -> Link Resolving. If you wanted to tell weyd to process sources that contain a specific quality of video first, you would place them in #1, and then the remainder would be #2-#10. For example, if there are 5 sources that contain a specific type of quality that you want retrieved quickly, then you would place those 5 Source JSON URLs in #1 and set the max # threads in weyd to 5. weyd will then process those 5 and won't move on to the next group (#2-#10) until at least one of those sources has completed.
Notes
- The Primary JSON and Source JSONs do not need in the same domain.
- All URLs must be HTTPS and have valid SSL certificates issued by recognized CAs
- All JSON must be valid JSON documents. There are many online validators you can use to plug in your JSON and see if it's valid.
- Only JSON arrays with a key of 1-10 will be processed, and each array item must be a single String element.
Example
{
"serial_no": 1,
"weyd_min": "v1.0.2",
"weyd_max": "v1.2.3",
"1" : [
"https://json.location.local/json1",
"https://json.location.local/json2",
"https://json.location.local/json3"
],
"3" : [
"https://json.location.local/json4",
"https://json.location.local/json5",
"https://json.location.local/json6"
],
"5" : [
"https://json.location.local/json7",
"https://json.location.local/json8",
"https://json.location.local/json9"
],
"10" : [
"https://json.location.local/json10",
"https://json.location.local/json11",
"https://json.location.local/json12"
]
}