Commit graph

25 commits

Author SHA1 Message Date
Luna
6b624a72cd Narrow bare except blocks so real errors aren't swallowed (roadmap A4)
Replaced all 46 bare 'except:' across the package with specific exception
types, and logged the cases that indicate a real problem:

- config load/save: FileNotFoundError is the silent first-run case; other
  OSError/ValueError/UnicodeDecodeError are logged.
- ffprobe/avprobe: JSON parse failures are now logged (previously a media
  file that ffprobe couldn't read just silently failed to import); decode
  fallbacks -> UnicodeDecodeError; duration parse -> ValueError/TypeError/
  KeyError; install check -> OSError/SubprocessError.
- executor: pre_/post_function and progress-polling hooks now use hasattr
  checks, and a real exception inside a defined hook is logged instead of
  swallowed; decode fallbacks and numeric parses narrowed.
- best-effort filesystem ops (makedirs/unlink) -> OSError.
- all backend check_is_installed probes -> OSError/SubprocessError.
- shutdown: also fixes a latent NameError ('failure' was only set in the
  except branch, so a successful logind PowerOff would crash the handler).

No bare 'except:' remain. Full suite (51 tests) green; GUI starts clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 01:02:33 -07:00
Luna
3d1ce504b9 Complete High-quality profile and add menus to split discs
High profile is now fully automatic instead of relying on the manual
"adjust disc usage" button:
- compute_high_profile_bitrate() (pure, unit-tested) picks the fewest discs
  that hold the content down to a quality floor, then fills each disc; a 2h
  movie lands on one filled disc (~3750k), a 4h movie on two, a 30min clip
  on one near the 9000k cap.
- apply_high_profile_bitrate() applies that rate to every title and forces
  2-pass; it runs before split planning so the existing splitter reuses it.

Split discs now get a per-disc menu (listing that disc's titles) when the
project has a menu enabled, honoring the startup/play-all settings; they
still auto-play when menus are off.

Fix: _adjust_audio_bitrate capped its table at 384 (an MP2 limit) and
silently clamped the High profile's 448k AC3 down to 384; extend the table
to AC3 rates (448/512/640) in both the ffmpeg and avconv backends.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 05:18:33 -07:00
Luna
4f1ecb55ee Split over-long DVD projects across multiple discs
When a DVD project does not fit one disc at the chosen quality, offer to
split it into several full-quality discs instead of only degrading the
bitrate:

- A pure, unit-tested planner distributes whole titles across discs and
  time-splits a single over-long movie at the chapter boundary nearest each
  disc's capacity (even-time fallback when it has no chapters).
- on_create_disc_clicked asks split / reduce-bitrate / cancel, then authors
  each disc into its own subfolder and emits name-discN.iso per disc.
- dvdauthor_converter takes per-title segment lengths so a split segment's
  chapter markers stay inside the segment.

Also adds the project-level encode-profile selector (with custom-bitrate
fields) next to the disc-size control.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 12:52:50 -07:00
Sergio Costas
18fa425dd9 Update the license comments 2025-08-29 18:26:12 +02:00
Sergio Costas
31a6da7f01 Migrate to pyproject.toml 2024-12-21 23:20:22 +01:00
Sergio Costas
6fb3a369cd general: added HEVC support 2019-10-15 00:26:37 +02:00
Sergio Costas
501e8aac48 general: removed the "or any later version" statement
After the events happened recently in the management of the FSF,
I decided that it is safer to not rely on the good faith of other
people, so I decided to allow distribution of Devede only under
the current GPLv3 license, and not allow other, still unknown,
future versions of the license.
2019-10-13 18:18:11 +02:00
Sergio Costas
0cdb5934a5 Now uses the menu title as the volume name
This patch uses the menu title as the volume name for the DVD image.
This way, when mounted in a computer, instead of "DVDVIDEO", the user
will see the menu title (unless there is no menu title; in that case,
"DVDVIDEO" will be used).
2019-07-21 18:33:02 +02:00
Sergio Costas
a22a0a3c60 fix code style 2019-02-04 23:14:00 +01:00
Sergio Costas
0c52e14115 Keep backwards compatibility with old files
Due to an error, old devede files can't be opened with this version.
This patch fixes it.
2019-01-06 19:08:13 +01:00
Sergio Costas
6d1b166f2d Added support for page blocks in menues
Now allows to add separators in the menu that forces a page jump,
allowing to group videos in pages.
2019-01-04 12:37:04 +01:00
Sergio Costas
c222c4ab14 Allow to add separator
Until now, all the menu entries were shown in a continuous list, one
after another. This patch allows to add separators between entries.
2019-01-03 23:18:59 +01:00
Sergio Costas
8719778d22 Add projects to Recent files in GTK
Now, when a Devede project is opened or saved, it is added to the list
of Recent files, thus being shown there when choosing to open a project.
2019-01-02 23:25:45 +01:00
Sergio Costas
5c6b98647b Added experimental support for 16:9 menues 2018-05-01 20:47:27 +02:00
Sergio Costas
98ddf8d04c Now sets transient for settings window 2017-12-03 11:50:09 +01:00
Sergio Costas
fdf7f148c1 Passed autopep8 2017-01-06 19:36:01 +01:00
Sergio Costas
27828d2dc5 Now uses the right minimum and maximum bitrate
Now sets the right file extension with Matroska and DivX files
2016-12-15 00:09:40 +01:00
Sergio Costas
020813cfe6 Fixed a bug when loading a project, due to the changes made in the last commit 2016-11-24 00:45:43 +01:00
Sergio Costas
ff89f38692 Now allows to change from the main window if a file is shown in the DVD menu 2016-11-04 00:06:19 +01:00
Sergio Costas
7a7d60ce92 Syntax change to make the code more "pythonyst" 2016-02-05 22:18:19 +01:00
Sergio Costas
5a6853a764 Reduced the height of the DVD menu window 2016-02-01 23:11:26 +01:00
Sergio Costas
4ddb219000 Added help 2015-10-26 14:45:44 +01:00
glenntanner3
516ae862b4 Update UI when play_all option is changed.Fix return value check.Add 'Play All' to dvd menu preview. 2015-04-29 17:04:19 -04:00
glenntanner3
a9b8d4bb2b Update UI to include a 'Play All' option.Add 'play_all' group for UI.Pass 'play_all_opt' to dvdauthor. 2015-04-28 16:04:32 -04:00
Sergio Costas
bc6fa87b3c Renamed module from devede to devedeng
Now it uses the 'locale' folder to create the locales list names.
2015-01-29 00:34:47 +01:00
Renamed from src/devede/project.py (Browse further)