Saves: paint progress only on Downloads rows, not on search/playlist cards
Every card of a video carries .downloading while it saves, so the progress painter rewrote their channel line and its final repaint left 'Saving for offline…' on the card after the save had finished.
This commit is contained in:
@@ -305,7 +305,9 @@ const SaveQueue = (() => {
|
|||||||
return '⏳ Saving for offline…';
|
return '⏳ Saving for offline…';
|
||||||
}
|
}
|
||||||
function paint(id) {
|
function paint(id) {
|
||||||
const row = document.querySelector(`.card.downloading[data-id="${CSS.escape(id)}"]`);
|
// Only the Downloads view's own rows: search/playlist cards also carry
|
||||||
|
// .downloading while a save runs, and their channel line must not be touched.
|
||||||
|
const row = document.querySelector(`.card.dl-row[data-id="${CSS.escape(id)}"]`);
|
||||||
if (!row) return;
|
if (!row) return;
|
||||||
const p = get(id);
|
const p = get(id);
|
||||||
const ch = row.querySelector('.card-channel');
|
const ch = row.querySelector('.card-channel');
|
||||||
@@ -8468,7 +8470,7 @@ function renderDownloads() {
|
|||||||
|
|
||||||
const rowFor = (v, isPaused) => {
|
const rowFor = (v, isPaused) => {
|
||||||
const row = document.createElement('div');
|
const row = document.createElement('div');
|
||||||
row.className = 'card downloading' + (isPaused ? ' dl-paused' : '');
|
row.className = 'card downloading dl-row' + (isPaused ? ' dl-paused' : '');
|
||||||
row.dataset.id = v.id;
|
row.dataset.id = v.id;
|
||||||
row.innerHTML = `
|
row.innerHTML = `
|
||||||
<div class="thumb">
|
<div class="thumb">
|
||||||
|
|||||||
Reference in New Issue
Block a user