Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Try auto loading audio from video only when actually loading a video
Browse files Browse the repository at this point in the history
If the user drop some files into Aegisub, we try to load sub, video,
audio, etc from them. When "Automatically open audio when opening
video" is checked in config, we try to load audio from the path of
the video. This should only be done if the video is newly loaded. So
we should never try to load audio from video if the user is just
opening a subtitle.

See Aegisub/Aegisub#121 (comment)
  • Loading branch information
wangqr committed Jun 6, 2019
1 parent d36311b commit d4e5a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void Project::LoadList(std::vector<agi::fs::path> const& files) {

if (!audio.empty())
DoLoadAudio(audio, false);
else if (OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file)
else if (!video.empty() && OPT_GET("Video/Open Audio")->GetBool() && audio_file != video_file)
DoLoadAudio(video_file, true);

if (!subs.empty())
Expand Down

0 comments on commit d4e5a3b

Please sign in to comment.