upsies.utils.disc.dvd

Get information from “BDMV” directory trees

Functions

upsies.utils.disc.dvd.get_disc_paths(content_path)[source]

Return sequence of subdirectories that contain a “VIDEO_TS” directory

If content_path contains a “VIDEO_TS.IFO” file, return content_path.

Return empty sequence by default.

upsies.utils.disc.dvd.get_playlists(discpath)[source]

Return sequence of Playlist instances from VIDEO_TS subdirectory

Return empty sequence if no playlists are found.

Playlists with a runtime of less than 3 minutes are ignored.

Each playlist represents one Video Title Set, e.g. VTS_01_*, VTS_02_*, VTS_03_*, etc. Each playlist’s Playlist.filepath is the .IFO file and the Playlist.items are .VOB files.

Parameters:

discpath – Path to directory that contains a “VIDEO_TS” subdirectory

upsies.utils.disc.dvd.is_dvd(content_path, *, multidisc=False)[source]

Whether content_path contains a “VIDEO_TS” subdirectory

Also look for “VIDEO_TS.IFO” exists directly in content_path.

If multidisc is truthy, also look for a “VIDEO_TS” directory in any subdirectory, but not recursively.