Skip to content

Commit

Permalink
Bremen issue attmpt #2
Browse files Browse the repository at this point in the history
  • Loading branch information
RIVEK-Development committed Oct 24, 2023
1 parent 4325d6e commit 8fe1574
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Binary file added StudIP_Video_Download_V_1_8_1.zip
Binary file not shown.
5 changes: 3 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function parseJson(res, vidForm, sendResponse, download){
var videoList = res["search-results"]["result"]["mediapackage"]["media"]["track"];

for(i =0; i < videoList.length; i++){
if(videoList[i]["video"]["resolution"] == null){
if(videoList[i]["video"] == null){
console.log("no resulution");
break;
}
var resolution = parseInt(videoList[i]["video"]["resolution"].split("x")[0]);
Expand Down Expand Up @@ -70,7 +71,7 @@ function parseJson(res, vidForm, sendResponse, download){

var fileName = name.replaceAll(" - ","-").replaceAll("/","-").replaceAll(/[?%*:;,|"]/g, "").replaceAll(/[\\.<> ]/g, "_").replaceAll("__","_")+ ".mp4";
if(download){
console.log("started download "+fileName);
console.log("started download "+fileName );
chrome.downloads.download({
url: url,
filename: fileName
Expand Down
4 changes: 2 additions & 2 deletions content2.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ var buttonA = document.createElement("button");
buttonA.title="Download all";
buttonA.id ="LinkBtn_All";
buttonA.setAttribute('type', 'button');
buttonA.style ='font-size: 20px; cursor: pointer; display: block;';
buttonA.style ='font-size: 17px; cursor: pointer; display: inline;';
buttonA.innerText = ("Download all videos");
document.getElementsByTagName("form")[0].appendChild(buttonA);
document.getElementsByTagName("form")[2].appendChild(buttonA);

buttonA.onclick = function clickAll(clicked){
for (i=0; i<episodes.length; i++){
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "StudIP Video Download",
"version": "1.8.0",
"version": "1.8.1",
"description": "Fügt im Opencast Videoplayer von StudIP eine Downloadmöglichkeit ein",
"manifest_version": 3,
"icons": {
Expand Down

0 comments on commit 8fe1574

Please sign in to comment.