Skip to content

Commit

Permalink
Update modification.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bylampa authored Oct 25, 2024
1 parent b2c8798 commit d815b17
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/modification.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,24 @@
}
});*/

// Вынесенные параметры
var apiKey = "4ef0d7355d9ffb5151e987764708ce96";
var apiProxyUrl = "http://212.113.103.137:9118/proxy/"; // Прокси для API
var imgProxyUrl = ""; // Прокси для изображений

Lampa.Listener.follow("full", function(a) {
if (a.type === "complite") {
var e = a.data.movie;
var urlType = e.name ? "tv" : "movie"; // Определяем тип
var o = "http://cors.lampa.run.place/proxy/http://api.themoviedb.org/3/" + urlType + "/" + e.id + "/images?api_key=4ef0d7355d9ffb5151e987764708ce96&language=" + Lampa.Storage.get("language");

var o = apiProxyUrl + "http://api.themoviedb.org/3/" + urlType + "/" + e.id + "/images?api_key=" + apiKey + "&language=" + Lampa.Storage.get("language");

$.get(o, function(response) {
if (response.logos && response.logos[0]) {
var logoPath = response.logos[0].file_path;
if (logoPath !== "") {
$(".full-start-new__title").html(
'<img style="margin-top: 5px;max-height: 125px;" src="http://cors.lampa.run.place/proxy/http://image.tmdb.org/t/p/w300' + logoPath.replace(".svg", ".png") + '" />'
'<img style="margin-top: 5px; max-height: 125px;" src="' + imgProxyUrl + "http://image.tmdb.org/t/p/w300" + logoPath.replace(".svg", ".png") + '" />'
);
}
}
Expand Down

0 comments on commit d815b17

Please sign in to comment.