Compare commits

..

2 Commits

Author SHA1 Message Date
Bond-009
21c0a35edf Merge pull request #16995 from theguymadmax/fix-flat-series
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
Format / format-check (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
Fix season unknown for flat TV structures
2026-06-03 19:48:37 +02:00
theguymadmax
285fc1b9f6 Fix season unknown for flat tv structures 2026-06-01 10:40:52 -04:00
2 changed files with 15 additions and 13 deletions

View File

@@ -5,19 +5,18 @@ on:
branches: branches:
- master - master
pull_request_target: pull_request_target:
types: [synchronize] issue_comment:
permissions: {} permissions: {}
jobs: jobs:
main: label:
name: Labeling
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: if: ${{ github.repository == 'jellyfin/jellyfin' && github.event.issue.pull_request }}
contents: read
pull-requests: write
if: ${{ github.repository == 'jellyfin/jellyfin' }}
steps: steps:
- name: Apply label - name: Apply label
uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0 uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}
with: with:
dirtyLabel: 'merge conflict' dirtyLabel: 'merge conflict'
commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.' commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'

View File

@@ -210,16 +210,19 @@ public class SeriesMetadataService : MetadataService<Series, SeriesInfo>
return true; return true;
} }
// Not yet processed // Episode has been processed and linked to a season, only needs a virtual season
if (episode.SeasonId.IsEmpty()) // if it isn't already linked to a known physical season by ID or path
if (!episode.SeasonId.IsEmpty())
{ {
return false; return !physicalSeasonIds.Contains(episode.SeasonId)
&& !physicalSeasonPaths.Contains(System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty);
} }
// Episode has been processed, only needs a virtual season if it isn't // Episode not yet linked, check if it's in a physical season folder
// already linked to a known physical season by ID or path // If yes then skip it, processing not finished
return !physicalSeasonIds.Contains(episode.SeasonId) // If no then include it, needs Season Unknown
&& !physicalSeasonPaths.Contains(System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty); var episodeDirectory = System.IO.Path.GetDirectoryName(episode.Path) ?? string.Empty;
return !physicalSeasonPaths.Contains(episodeDirectory);
} }
/// <summary> /// <summary>