Skip to content

fix(AvistaZ): mediainfo for DVDs#1312

Closed
wastaken7 wants to merge 2 commits intomasterfrom
avistaz-dvd-fix
Closed

fix(AvistaZ): mediainfo for DVDs#1312
wastaken7 wants to merge 2 commits intomasterfrom
avistaz-dvd-fix

Conversation

@wastaken7
Copy link
Copy Markdown
Collaborator

@wastaken7 wastaken7 commented Mar 19, 2026

the AvistaZ network would prefer the largest VOB file as MediaInfo for full DVD uploads:

I noticed you recently uploaded a DVD torrent and used "VTS_01_0.IFO" to generate the MediaInfo. While this is technically not wrong and allowed, sometimes MediaInfo shows less information about the video/audio this way.
Therefore I want to ask you to please use the largest .VOB file to generate the MI report for future DVD uploads.

Summary by CodeRabbit

  • Bug Fixes
    • Improved media-info extraction for DVD discs: the app now locates the primary DVD video file on disc and extracts metadata directly for more reliable media details; Blu-ray and other disc behaviors remain unchanged.

@github-actions
Copy link
Copy Markdown

Thanks for taking the time to contribute to this project. Upload Assistant is currently in a complete rewrite, and no new development is being conducted on this python source at this time.

If you have come this far, please feel free to leave open, any pull requests regarding new sites being added to the source, as these can serve as the baseline for later conversion.

If your pull request relates to a critical bug, this will be addressed in this code base, and a new release published as needed.

If your pull request only addresses a quite minor bug, it is not likely to be addressed in this code base.

Details for the new code base will follow at a later date.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee772f9e-0d8d-4c85-a9e1-f1fd9e6a8d23

📥 Commits

Reviewing files that changed from the base of the PR and between 226f295 and 360205e.

📒 Files selected for processing (1)
  • src/trackers/AVISTAZ_NETWORK.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/trackers/AVISTAZ_NETWORK.py

📝 Walkthrough

Walkthrough

The pull request extends AZTrackerBase.get_file_info to handle DVD discs by locating the largest VTS_*.VOB file under the disc path, parsing it with MediaInfo, and returning the parsed string; BDMV and other disc behaviors are unchanged.

Changes

Cohort / File(s) Summary
DVD VOB Extraction & Parsing
src/trackers/AVISTAZ_NETWORK.py
Added glob and MediaInfo imports. For meta["is_disc"] == "DVD", glob for VTS_*.VOB under meta["path"], pick the largest file, run MediaInfo.parse(..., output="STRING"), and return that string. Existing BDMV/other-disc paths preserved.

Sequence Diagram(s)

sequenceDiagram
    participant Tracker as AZTrackerBase
    participant FS as Filesystem (glob/stat)
    participant MI as MediaInfo

    Tracker->>FS: glob for VTS_*.VOB under meta["path"]
    FS-->>Tracker: list of VOB files
    Tracker->>FS: stat files to determine largest
    FS-->>Tracker: largest VOB path
    Tracker->>MI: MediaInfo.parse(largest_vob, output="STRING")
    MI-->>Tracker: parsed media info string
    Tracker-->>Tracker: return parsed string from get_file_info()
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through folders, sniffed each VOB,

Chose the fattest one beneath the blob,
MediaInfo hummed its lilting song,
Returned the tale I’d carried along,
DVD delights parsed neat and strong.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(AvistaZ): mediainfo for DVDs' directly summarizes the main change: improving mediainfo handling for DVD uploads by using the largest .VOB file.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch avistaz-dvd-fix
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wastaken7 wastaken7 changed the title AvistaZ: fix mediainfo for DVDs fix(AvistaZ): mediainfo for DVDs Mar 19, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/trackers/AVISTAZ_NETWORK.py`:
- Around line 377-382: The DVD VOB glob is case-sensitive and uses "**/*.vob",
so on Linux it misses uppercase VOB files; update the pattern where
meta.get("is_disc") == "DVD" (the block that populates vob_files and computes
largest_vob) to match uppercase extensions (e.g., "**/*.VOB") or perform a
case-insensitive match (e.g., glob both "*.VOB" and "*.vob" or normalize via
os.listdir and filter by lowercased suffix) before calling MediaInfo.parse on
largest_vob; ensure you adjust only the glob call that produces vob_files to use
the uppercase pattern consistent with other code (e.g., VTS_*.VOB).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 81143a0f-d755-4712-8aa1-815e3e2a3a8b

📥 Commits

Reviewing files that changed from the base of the PR and between 7df0d14 and 226f295.

📒 Files selected for processing (1)
  • src/trackers/AVISTAZ_NETWORK.py

Comment thread src/trackers/AVISTAZ_NETWORK.py
@wastaken7 wastaken7 requested a review from Audionut March 19, 2026 17:25
@Audionut
Copy link
Copy Markdown
Owner

Audionut commented Mar 22, 2026

vob_mi is already in meta. They probably want both ifo and vob tbh.

vob does not have correct runtime or language details.

edit: vob only has accurate details about that vob also, not the entire disc.
I would really prefer an actual rule change, rather than potentially, just an opinionated mod stance. I've had cases previously, when a mod has a personal opinion, and has tried to push that personal agenda through UA, even though it's inconsistent with the overall site stance.

@wastaken7 wastaken7 closed this Mar 31, 2026
@wastaken7 wastaken7 deleted the avistaz-dvd-fix branch March 31, 2026 01:51
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.

2 participants