video: fix Play/Trailer buttons vanishing on owned movies
maybeRefreshMovie re-fetched the library payload (no trailer/server — those come from the extras call) and replaced data, so renderActions re-rendered without the buttons right after they appeared. It now carries over the live extras fields (server/trailer/next_episode), mirroring the show reloadDetail fix.
This commit is contained in:
parent
3f439e4277
commit
1423e50ccd
1 changed files with 9 additions and 1 deletions
|
|
@ -939,7 +939,15 @@
|
|||
fetch(DETAIL_URL + 'movie/' + id, { headers: { 'Accept': 'application/json' } })
|
||||
.then(function (r) { return r.ok ? r.json() : null; })
|
||||
.then(function (d) {
|
||||
if (d && !d.error && currentId === id) { data = d; renderBillboard(d); renderDetails(d); }
|
||||
if (d && !d.error && currentId === id) {
|
||||
// Keep the live extras (server/trailer/next-ep) the
|
||||
// detail payload lacks — else Play/Trailer vanish.
|
||||
var prev = data || {};
|
||||
d.server = prev.server || null;
|
||||
d.trailer = prev.trailer || null;
|
||||
d.next_episode = prev.next_episode || null;
|
||||
data = d; renderBillboard(d); renderDetails(d);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(function () { /* best-effort */ });
|
||||
|
|
|
|||
Loading…
Reference in a new issue