Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow editing of original title for Season and Episode items #5990

Merged

Conversation

scampower3
Copy link
Member

Changes

Allows editing of original title for Season and Episode items.

Issues

@scampower3 scampower3 requested a review from a team as a code owner August 29, 2024 07:16
@scampower3 scampower3 added the enhancement Improve existing functionality or small fixes label Aug 29, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint doesn't pass. Please fix all ESLint issues.

src/components/metadataEditor/metadataEditor.js Outdated Show resolved Hide resolved
@@ -541,7 +541,7 @@ function setFieldVisibilities(context, item) {
hideElement('#fldPath', context);
}

if (item.Type === 'Series' || item.Type === 'Movie' || item.Type === 'Trailer' || item.Type === 'Person') {
if (item.Type === 'Series' || item.Type === 'Season' || item.Type === 'Episode' || item.Type === 'Movie' || item.Type === 'Trailer' || item.Type === 'Person') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do something like:

    if ([ 'Series', 'Season', 'Episode', ... ].includes(item.Type)) {

Bonus points if you also use the BaseItemKind enum values instead of hardcoded strings. 😉

@@ -21,7 +21,7 @@ import ServerConnections from '../ServerConnections';
import toast from '../toast/toast';
import { appRouter } from '../router/appRouter';
import template from './metadataEditor.template.html';
import { SeriesStatus } from '@jellyfin/sdk/lib/generated-client';
import { BaseItemKind, SeriesStatus } from '@jellyfin/sdk/lib/generated-client';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To ensure tree-shaking can happen during the build, we should use the full path for these imports @jellyfin/sdk/lib/generated-client/models/base-item-kind (I think).

Copy link

sonarcloud bot commented Sep 20, 2024

@jellyfin-bot
Copy link
Collaborator

Cloudflare Pages deployment

Latest commit f624fa106543048a7a0998d2343727f9335a320d
Status ✅ Deployed!
Preview URL https://a732a9bf.jellyfin-web.pages.dev
Type 🔀 Preview

@thornbill thornbill added this to the v10.10.0 milestone Sep 20, 2024
@thornbill thornbill merged commit 576dcd8 into jellyfin:master Sep 20, 2024
12 checks passed
@scampower3 scampower3 deleted the allow-season-episode-original-title-edit branch October 26, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants