mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-12-22 04:30:12 +00:00
Add more DeArrow support.
This commit is contained in:
@@ -453,6 +453,17 @@ export default {
|
||||
xmlDoc.querySelectorAll("br").forEach(elem => (elem.outerHTML = "\n"));
|
||||
this.video.description = this.rewriteDescription(xmlDoc.querySelector("body").innerHTML);
|
||||
this.updateWatched(this.video.relatedStreams);
|
||||
|
||||
const videoIds = this.video.relatedStreams
|
||||
.filter(obj => obj.type === "stream")
|
||||
.map(video => video.url.substr(-11))
|
||||
.sort();
|
||||
this.fetchDeArrowContent(videoIds).then(json => {
|
||||
Object.keys(json).forEach(key => {
|
||||
const video = this.video.relatedStreams.find(video => video.url.substr(-11) == key);
|
||||
video.dearrow = json[key];
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -473,6 +484,18 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
await this.fetchPlaylistPages().then(() => {
|
||||
const videoIds = this.playlist.relatedStreams
|
||||
.filter(obj => obj.type === "stream")
|
||||
.map(video => video.url.substr(-11))
|
||||
.sort();
|
||||
this.fetchDeArrowContent(videoIds).then(json => {
|
||||
Object.keys(json).forEach(key => {
|
||||
const video = this.playlist.relatedStreams.find(video => video.url.substr(-11) == key);
|
||||
video.dearrow = json[key];
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
async fetchPlaylistPages() {
|
||||
|
||||
Reference in New Issue
Block a user