mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-12 11:10:27 +00:00
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
// Copyright (C) 2017-2020 Smart code 203358507
|
|
|
|
const routesRegexp = {
|
|
intro: {
|
|
regexp: /^\/intro$/,
|
|
urlParamsNames: []
|
|
},
|
|
board: {
|
|
regexp: /^\/?$/,
|
|
urlParamsNames: []
|
|
},
|
|
discover: {
|
|
regexp: /^\/discover(?:\/([^/]*)\/([^/]*)\/([^/]*))?$/,
|
|
urlParamsNames: ['transportUrl', 'type', 'catalogId']
|
|
},
|
|
library: {
|
|
regexp: /^\/library(?:\/([^/]*))?$/,
|
|
urlParamsNames: ['type']
|
|
},
|
|
continuewatching: {
|
|
regexp: /^\/continuewatching(?:\/([^/]*))?$/,
|
|
urlParamsNames: ['type']
|
|
},
|
|
search: {
|
|
regexp: /^\/search$/,
|
|
urlParamsNames: []
|
|
},
|
|
metadetails: {
|
|
regexp: /^\/metadetails\/([^/]*)\/([^/]*)(?:\/([^/]*))?$/,
|
|
urlParamsNames: ['type', 'id', 'videoId']
|
|
},
|
|
addons: {
|
|
regexp: /^\/addons(?:\/([^/]*)(?:\/([^/]*)\/([^/]*))?)?$/,
|
|
urlParamsNames: ['type', 'transportUrl', 'catalogId']
|
|
},
|
|
settings: {
|
|
regexp: /^\/settings$/,
|
|
urlParamsNames: []
|
|
},
|
|
player: {
|
|
regexp: /^\/player\/([^/]*)(?:\/([^/]*)\/([^/]*)\/([^/]*)\/([^/]*)\/([^/]*))?$/,
|
|
urlParamsNames: ['stream', 'streamTransportUrl', 'metaTransportUrl', 'type', 'id', 'videoId']
|
|
}
|
|
};
|
|
|
|
module.exports = routesRegexp;
|