Rename commentary tag to behind-the-scenes (Jellyfin compatible)

This commit is contained in:
Jarian Cottingham 2026-02-25 09:09:52 -06:00
parent 03586ee420
commit a47857681e
3 changed files with 20 additions and 20 deletions

View File

@ -97,7 +97,7 @@ class FileListManager {
<div class="file-fps">${fps}</div> <div class="file-fps">${fps}</div>
<div class="file-tags"> <div class="file-tags">
<span class="tag-icon extra-tag" data-file-path="${file.path}" title="Mark as Extra">🏷</span> <span class="tag-icon extra-tag" data-file-path="${file.path}" title="Mark as Extra">🏷</span>
<span class="tag-icon commentary-tag" data-file-path="${file.path}" title="Add Commentary">💬</span> <span class="tag-icon behind-the-scenes-tag" data-file-path="${file.path}" title="Add Behind the Scenes">🎬</span>
<span class="tag-icon delete-tag" data-file-path="${file.path}" title="Mark for Deletion">🗑</span> <span class="tag-icon delete-tag" data-file-path="${file.path}" title="Mark for Deletion">🗑</span>
<span class="video-preview-btn" data-file-path="${file.path}" title="Preview Video">🎬</span> <span class="video-preview-btn" data-file-path="${file.path}" title="Preview Video">🎬</span>
<button class="play-button" style="opacity: 0.3; cursor: default; flex-shrink: 0;" data-file-path="${file.path}" disabled></button> <button class="play-button" style="opacity: 0.3; cursor: default; flex-shrink: 0;" data-file-path="${file.path}" disabled></button>

View File

@ -6,8 +6,8 @@ const { ipcRenderer } = require('electron');
class TagManager { class TagManager {
constructor() { constructor() {
this.tagColors = { this.tagColors = {
extra: '#FFD700', // Yellow extra: '#28a745', // Green
commentary: '#17a2b8', // Teal behindTheScenes: '#17a2b8', // Teal
delete: '#dc3545' // Red delete: '#dc3545' // Red
}; };
} }
@ -15,7 +15,7 @@ class TagManager {
/** /**
* Tag a file with a specific tag type * Tag a file with a specific tag type
* @param {string} filePath - File path * @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 * @param {Function} callback - Callback function
*/ */
tagFile(filePath, tagType, callback) { tagFile(filePath, tagType, callback) {
@ -121,7 +121,7 @@ class TagManager {
*/ */
_checkAndDisablePlayButton(fileItem) { _checkAndDisablePlayButton(fileItem) {
const hasOtherTags = fileItem.hasAttribute('data-tagged-extra') || const hasOtherTags = fileItem.hasAttribute('data-tagged-extra') ||
fileItem.hasAttribute('data-tagged-commentary') || fileItem.hasAttribute('data-tagged-behind-the-scenes') ||
fileItem.hasAttribute('data-tagged-delete'); fileItem.hasAttribute('data-tagged-delete');
if (!hasOtherTags) { if (!hasOtherTags) {
@ -167,7 +167,7 @@ class TagManager {
* @returns {Promise<Object>} Results summary * @returns {Promise<Object>} Results summary
*/ */
async moveAllTaggedFiles(onUpdateCount, onEpisodesUpdated, onMatchCheck) { 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) { if (taggedItems.length === 0) {
console.log('No tagged files to move'); console.log('No tagged files to move');
@ -189,8 +189,8 @@ class TagManager {
let tagType; let tagType;
if (item.hasAttribute('data-tagged-extra')) { if (item.hasAttribute('data-tagged-extra')) {
tagType = 'extra'; tagType = 'extra';
} else if (item.hasAttribute('data-tagged-commentary')) { } else if (item.hasAttribute('data-tagged-behind-the-scenes')) {
tagType = 'commentary'; tagType = 'behindTheScenes';
} else if (item.hasAttribute('data-tagged-delete')) { } else if (item.hasAttribute('data-tagged-delete')) {
tagType = 'delete'; tagType = 'delete';
} }
@ -233,7 +233,7 @@ class TagManager {
* @returns {Array} Array of tagged file objects * @returns {Array} Array of tagged file objects
*/ */
getTaggedFiles() { 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 = []; const taggedFiles = [];
taggedItems.forEach(item => { taggedItems.forEach(item => {
@ -241,8 +241,8 @@ class TagManager {
let tagType; let tagType;
if (item.hasAttribute('data-tagged-extra')) { if (item.hasAttribute('data-tagged-extra')) {
tagType = 'extra'; tagType = 'extra';
} else if (item.hasAttribute('data-tagged-commentary')) { } else if (item.hasAttribute('data-tagged-behind-the-scenes')) {
tagType = 'commentary'; tagType = 'behindTheScenes';
} else if (item.hasAttribute('data-tagged-delete')) { } else if (item.hasAttribute('data-tagged-delete')) {
tagType = 'delete'; tagType = 'delete';
} }

View File

@ -803,7 +803,7 @@ class UIManager {
let tagColor; let tagColor;
if (tagType === 'extra') { if (tagType === 'extra') {
tagColor = '#FFD700'; // Yellow tagColor = '#FFD700'; // Yellow
} else if (tagType === 'commentary') { } else if (tagType === 'behind-the-scenes') {
tagColor = '#17a2b8'; // Teal tagColor = '#17a2b8'; // Teal
} else if (tagType === 'delete') { } else if (tagType === 'delete') {
tagColor = '#dc3545'; // Red tagColor = '#dc3545'; // Red
@ -872,7 +872,7 @@ class UIManager {
* Function to move all tagged files at once * Function to move all tagged files at once
*/ */
async moveAllTaggedFiles() { 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) { if (taggedItems.length === 0) {
console.log('[RENDERER] No tagged files to move'); console.log('[RENDERER] No tagged files to move');
@ -894,8 +894,8 @@ class UIManager {
let tagType; let tagType;
if (item.hasAttribute('data-tagged-extra')) { if (item.hasAttribute('data-tagged-extra')) {
tagType = 'extra'; tagType = 'extra';
} else if (item.hasAttribute('data-tagged-commentary')) { } else if (item.hasAttribute('data-tagged-behind-the-scenes')) {
tagType = 'commentary'; tagType = 'behind-the-scenes';
} else if (item.hasAttribute('data-tagged-delete')) { } else if (item.hasAttribute('data-tagged-delete')) {
tagType = 'delete'; tagType = 'delete';
} }
@ -1029,8 +1029,8 @@ class UIManager {
displayName = 'extras'; displayName = 'extras';
folderIcon = '📁'; folderIcon = '📁';
folderColor = '#FFD700'; folderColor = '#FFD700';
} else if (folderName === 'commentary') { } else if (folderName === 'behind the scenes') {
displayName = 'commentary'; displayName = 'behind the scenes';
folderIcon = '💬'; folderIcon = '💬';
folderColor = '#17a2b8'; folderColor = '#17a2b8';
} else if (folderName === 'delete') { } else if (folderName === 'delete') {
@ -1103,7 +1103,7 @@ class UIManager {
// Disable the play button when untagging (only if no other tags) // Disable the play button when untagging (only if no other tags)
const hasOtherTags = item.hasAttribute('data-tagged-extra') || const hasOtherTags = item.hasAttribute('data-tagged-extra') ||
item.hasAttribute('data-tagged-commentary') || item.hasAttribute('data-tagged-behind-the-scenes') ||
item.hasAttribute('data-tagged-delete'); item.hasAttribute('data-tagged-delete');
if (!hasOtherTags) { if (!hasOtherTags) {
const playButton = item.querySelector('.play-button'); const playButton = item.querySelector('.play-button');
@ -1126,7 +1126,7 @@ class UIManager {
* Function to update the tagged items count display * Function to update the tagged items count display
*/ */
updateTaggedCount() { 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 count = taggedItems.length;
const taggedCircle = document.getElementById('tagged-circle'); const taggedCircle = document.getElementById('tagged-circle');
const taggedCount = document.getElementById('tagged-count'); const taggedCount = document.getElementById('tagged-count');