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

Enhanced Episode Handling, Duration Calculation, and Exception Handling in Video Models and Services #501

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

brand-it
Copy link
Owner

@brand-it brand-it commented Nov 9, 2024

These changes provide more robust and flexible handling of episodic video content, refined duration estimates for better user feedback, and improved error handling across file-based services.

  1. Episode Range Handling:

• Added episode_numbers method to DiskTitle and VideoBlob to support handling of episodes spanning multiple numbers.

• Updated ScanPlexWorker to handle both the starting and ending episode numbers, enhancing episode lookup in cases where multiple episodes are represented in a single video blob.

  1. Duration Calculation Enhancements:

• Refactored duration_range method in the Tv model to compute episode and disk title durations more effectively, integrating interquartile range and weighted averages for more accurate time estimates.

• Added DEFAULT_RANGE in Video to provide a baseline for duration calculations.

• Enhanced StatsService to include z-score calculation and additional statistical data (differences), allowing outlier filtering in duration calculations.

  1. Error Handling for File Access:

• Added exception handling in UploadMkvService to destroy video_blob entries when the associated file is not found, preventing orphaned entries and ensuring system consistency.

  1. Regex Updates for Key Parsing:

• Extended KeyParserService to detect episode ranges within filenames, adding support for patterns like S01E01-E02.

  1. UI Enhancements:

• Updated duration information display in seasons/show.html.erb, showing calculated duration ranges and debug information for enhanced insight into the duration statistics when debug mode is active.

@brand-it brand-it merged commit 4912fda into main Nov 9, 2024
2 checks passed
@brand-it brand-it deleted the show-episodes-as-uploaded-when-using-episode-ranges branch November 9, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant