diff --git a/src/renderer/helpers/api/local.js b/src/renderer/helpers/api/local.js index 7bfc03c00..a05d85d3d 100644 --- a/src/renderer/helpers/api/local.js +++ b/src/renderer/helpers/api/local.js @@ -513,7 +513,13 @@ export function parseLocalChannelHeader(channel) { } if (header.content.metadata) { - subscriberText = header.content.metadata.metadata_rows[0].metadata_parts[1].text.text + // YouTube has already changed the indexes for where the information is stored once, + // so we should search for it instead of using hardcoded indexes, just to be safe for the future + + subscriberText = header.content.metadata.metadata_rows + .flatMap(row => row.metadata_parts ? row.metadata_parts : []) + .find(part => part.text.text?.includes('subscriber')) + ?.text.text } break