Compare commits

...

5 Commits
v109 ... master

Author SHA1 Message Date
0eedf53fc8
use extension packer 2022-10-16 22:34:25 +02:00
1e6316f2b3
add firefox extension
All checks were successful
continuous-integration/drone Build is passing
2022-10-16 21:17:23 +02:00
da2c738c52
set playlistid
Some checks reported errors
continuous-integration/drone Build was killed
2022-03-06 09:31:36 +01:00
a190acd1d8
set pathname for kodi 2022-03-06 09:28:44 +01:00
93547547f1
add kodi support for stream.purser.it 2022-03-06 09:26:03 +01:00
5 changed files with 32 additions and 8 deletions

View File

@ -1,13 +1,13 @@
kind: pipeline
name: default
steps:
- name: compile-chrome
image: roypur/chrome-packer:latest
- name: compile-extensions
image: roypur/extension-packer:latest
environment:
CHROME_PRIVKEY:
from_secret: chrome_privkey
commands:
- ./pack-chrome.sh
- ./pack-browsers.sh
- name: gitea_release
image: plugins/gitea-release
settings:
@ -15,6 +15,6 @@ steps:
from_secret: gitea_token
base_url: https://git.purser.it
title: ${DRONE_TAG}
files: out/proxy-stream-${DRONE_TAG}.crx
files: out/proxy-stream-${DRONE_TAG}.crx out/proxy-stream-${DRONE_TAG}.xpi
when:
event: tag

1
.gitignore vendored
View File

@ -11,4 +11,5 @@ android/.gradle/*
android/gradle/*
chrome/*.png
*.crx
*.xpi
sources.json

View File

@ -7,7 +7,7 @@
"48": "icon-48.png",
"128": "icon-128.png"
},
"version": "109.0",
"version": "111.0",
"manifest_version": 3,
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
"permissions": ["tabs"],

View File

@ -26,14 +26,17 @@ document.addEventListener("DOMContentLoaded", () => {
if(providers.has(hostname)) {
if(hostname.includes("youtube.com")) {
let newpath = oldurl.searchParams.get("v")
if((newpath instanceof String) || ((typeof newpath) === "string")) {
if(newpath) {
newurl.pathname = "/" + newpath
}
} else {
newurl.pathname = oldurl.pathname
}
search.append("provider", providers.get(hostname))
} else {
return
}
newurl.search = search.toString()
const newtab = {}
newtab.url = newurl.href
@ -51,7 +54,7 @@ document.addEventListener("DOMContentLoaded", () => {
if(hostname.includes("youtube.com")) {
newurl = new URL("plugin://plugin.video.youtube")
search.append("action", "play_video")
let video_id = oldurl.searchParams.get("v")
const video_id = oldurl.searchParams.get("v")
if(video_id) {
search.append("videoid", video_id)
}
@ -60,6 +63,24 @@ document.addEventListener("DOMContentLoaded", () => {
search.append("raw", "true")
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 {
newurl.pathname = oldurl.pathname
search.append("provider", provider)
search.append("raw", "true")
}
}
} else {
return
}
newurl.search = search.toString()
@ -76,7 +97,7 @@ document.addEventListener("DOMContentLoaded", () => {
}
if(playlistid) {
req.params.playlistid = 1
req.params.playlistid = playlistid
}
const resp = await fetch("http://127.0.0.1:4000/jsonrpc", {

View File

@ -50,6 +50,8 @@ fi
release_folder="${temp_dir}/out/proxy-stream-${DRONE_TAG}"
cp -r "${dir}/chrome" "${release_folder}"
(cd "${release_folder}" && zip -r "${temp_dir}/out/proxy-stream-${DRONE_TAG}.xpi" .)
if grep "/proc/1/cgroup" -q -F -e docker
then
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"