add kodi support for stream.purser.it
This commit is contained in:
parent
050cf89b45
commit
93547547f1
@ -7,7 +7,7 @@
|
|||||||
"48": "icon-48.png",
|
"48": "icon-48.png",
|
||||||
"128": "icon-128.png"
|
"128": "icon-128.png"
|
||||||
},
|
},
|
||||||
"version": "109.0",
|
"version": "110.0",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
||||||
"permissions": ["tabs"],
|
"permissions": ["tabs"],
|
||||||
|
@ -26,14 +26,17 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
if(providers.has(hostname)) {
|
if(providers.has(hostname)) {
|
||||||
if(hostname.includes("youtube.com")) {
|
if(hostname.includes("youtube.com")) {
|
||||||
let newpath = oldurl.searchParams.get("v")
|
let newpath = oldurl.searchParams.get("v")
|
||||||
if((newpath instanceof String) || ((typeof newpath) === "string")) {
|
if(newpath) {
|
||||||
newurl.pathname = "/" + newpath
|
newurl.pathname = "/" + newpath
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newurl.pathname = oldurl.pathname
|
newurl.pathname = oldurl.pathname
|
||||||
}
|
}
|
||||||
search.append("provider", providers.get(hostname))
|
search.append("provider", providers.get(hostname))
|
||||||
|
} else {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
newurl.search = search.toString()
|
newurl.search = search.toString()
|
||||||
const newtab = {}
|
const newtab = {}
|
||||||
newtab.url = newurl.href
|
newtab.url = newurl.href
|
||||||
@ -51,7 +54,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
if(hostname.includes("youtube.com")) {
|
if(hostname.includes("youtube.com")) {
|
||||||
newurl = new URL("plugin://plugin.video.youtube")
|
newurl = new URL("plugin://plugin.video.youtube")
|
||||||
search.append("action", "play_video")
|
search.append("action", "play_video")
|
||||||
let video_id = oldurl.searchParams.get("v")
|
const video_id = oldurl.searchParams.get("v")
|
||||||
if(video_id) {
|
if(video_id) {
|
||||||
search.append("videoid", video_id)
|
search.append("videoid", video_id)
|
||||||
}
|
}
|
||||||
@ -60,6 +63,23 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
search.append("raw", "true")
|
search.append("raw", "true")
|
||||||
newurl.pathname = oldurl.pathname
|
newurl.pathname = oldurl.pathname
|
||||||
}
|
}
|
||||||
|
} else if(hostname == "stream.purser.it") {
|
||||||
|
const provider = oldurl.searchParams.get("provider")
|
||||||
|
if(provider) {
|
||||||
|
if(provider == "youtube") {
|
||||||
|
newurl = new URL("plugin://plugin.video.youtube")
|
||||||
|
search.append("action", "play_video")
|
||||||
|
const video_id = oldurl.pathname.replace("/", "")
|
||||||
|
if(video_id) {
|
||||||
|
search.append("videoid", video_id)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
search.append("provider", provider)
|
||||||
|
search.append("raw", "true")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
newurl.search = search.toString()
|
newurl.search = search.toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user