From eda919c88b846edb3845dea5e4d721426cb8f239 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Wed, 25 Feb 2026 09:09:52 -0600 Subject: [PATCH] Rename commentary tag to behind-the-scenes (Jellyfin compatible) --- utils/renderer/FileListManager.js | 2 +- utils/renderer/TagManager.js | 22 +++++++++++----------- utils/renderer/UIManager.js | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/utils/renderer/FileListManager.js b/utils/renderer/FileListManager.js index 93bbde8..f6db6d4 100644 --- a/utils/renderer/FileListManager.js +++ b/utils/renderer/FileListManager.js @@ -97,7 +97,7 @@ class FileListManager {
${fps}
🏷️ - 💬 + 🎬 🗑️ 🎬 diff --git a/utils/renderer/TagManager.js b/utils/renderer/TagManager.js index 65c9a09..2fd3f9f 100644 --- a/utils/renderer/TagManager.js +++ b/utils/renderer/TagManager.js @@ -6,16 +6,16 @@ const { ipcRenderer } = require('electron'); class TagManager { constructor() { this.tagColors = { - extra: '#FFD700', // Yellow - commentary: '#17a2b8', // Teal - delete: '#dc3545' // Red + extra: '#28a745', // Green + behindTheScenes: '#17a2b8', // Teal + delete: '#dc3545' // Red }; } /** * Tag a file with a specific tag type * @param {string} filePath - File path - * @param {string} tagType - Tag type (extra, commentary, delete) + * @param {string} tagType - Tag type (extra, behindTheScenes, delete) * @param {Function} callback - Callback function */ tagFile(filePath, tagType, callback) { @@ -121,7 +121,7 @@ class TagManager { */ _checkAndDisablePlayButton(fileItem) { const hasOtherTags = fileItem.hasAttribute('data-tagged-extra') || - fileItem.hasAttribute('data-tagged-commentary') || + fileItem.hasAttribute('data-tagged-behind-the-scenes') || fileItem.hasAttribute('data-tagged-delete'); if (!hasOtherTags) { @@ -167,7 +167,7 @@ class TagManager { * @returns {Promise} Results summary */ async moveAllTaggedFiles(onUpdateCount, onEpisodesUpdated, onMatchCheck) { - const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-commentary], .file-item[data-tagged-delete]'); + const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-behind-the-scenes], .file-item[data-tagged-delete]'); if (taggedItems.length === 0) { console.log('No tagged files to move'); @@ -189,8 +189,8 @@ class TagManager { let tagType; if (item.hasAttribute('data-tagged-extra')) { tagType = 'extra'; - } else if (item.hasAttribute('data-tagged-commentary')) { - tagType = 'commentary'; + } else if (item.hasAttribute('data-tagged-behind-the-scenes')) { + tagType = 'behindTheScenes'; } else if (item.hasAttribute('data-tagged-delete')) { tagType = 'delete'; } @@ -233,7 +233,7 @@ class TagManager { * @returns {Array} Array of tagged file objects */ getTaggedFiles() { - const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-commentary], .file-item[data-tagged-delete]'); + const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-behind-the-scenes], .file-item[data-tagged-delete]'); const taggedFiles = []; taggedItems.forEach(item => { @@ -241,8 +241,8 @@ class TagManager { let tagType; if (item.hasAttribute('data-tagged-extra')) { tagType = 'extra'; - } else if (item.hasAttribute('data-tagged-commentary')) { - tagType = 'commentary'; + } else if (item.hasAttribute('data-tagged-behind-the-scenes')) { + tagType = 'behindTheScenes'; } else if (item.hasAttribute('data-tagged-delete')) { tagType = 'delete'; } diff --git a/utils/renderer/UIManager.js b/utils/renderer/UIManager.js index b5ab332..37105ce 100644 --- a/utils/renderer/UIManager.js +++ b/utils/renderer/UIManager.js @@ -803,7 +803,7 @@ class UIManager { let tagColor; if (tagType === 'extra') { tagColor = '#FFD700'; // Yellow - } else if (tagType === 'commentary') { + } else if (tagType === 'behind-the-scenes') { tagColor = '#17a2b8'; // Teal } else if (tagType === 'delete') { tagColor = '#dc3545'; // Red @@ -872,7 +872,7 @@ class UIManager { * Function to move all tagged files at once */ async moveAllTaggedFiles() { - const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-commentary], .file-item[data-tagged-delete]'); + const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-behind-the-scenes], .file-item[data-tagged-delete]'); if (taggedItems.length === 0) { console.log('[RENDERER] No tagged files to move'); @@ -894,8 +894,8 @@ class UIManager { let tagType; if (item.hasAttribute('data-tagged-extra')) { tagType = 'extra'; - } else if (item.hasAttribute('data-tagged-commentary')) { - tagType = 'commentary'; + } else if (item.hasAttribute('data-tagged-behind-the-scenes')) { + tagType = 'behind-the-scenes'; } else if (item.hasAttribute('data-tagged-delete')) { tagType = 'delete'; } @@ -1029,8 +1029,8 @@ class UIManager { displayName = 'extras'; folderIcon = '📁'; folderColor = '#FFD700'; - } else if (folderName === 'commentary') { - displayName = 'commentary'; + } else if (folderName === 'behind the scenes') { + displayName = 'behind the scenes'; folderIcon = '💬'; folderColor = '#17a2b8'; } else if (folderName === 'delete') { @@ -1103,7 +1103,7 @@ class UIManager { // Disable the play button when untagging (only if no other tags) const hasOtherTags = item.hasAttribute('data-tagged-extra') || - item.hasAttribute('data-tagged-commentary') || + item.hasAttribute('data-tagged-behind-the-scenes') || item.hasAttribute('data-tagged-delete'); if (!hasOtherTags) { const playButton = item.querySelector('.play-button'); @@ -1126,7 +1126,7 @@ class UIManager { * Function to update the tagged items count display */ updateTaggedCount() { - const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-commentary], .file-item[data-tagged-delete]'); + const taggedItems = document.querySelectorAll('.file-item[data-tagged-extra], .file-item[data-tagged-behind-the-scenes], .file-item[data-tagged-delete]'); const count = taggedItems.length; const taggedCircle = document.getElementById('tagged-circle'); const taggedCount = document.getElementById('tagged-count');