Skip to content

Commit

Permalink
subtitles: ensure that the srt file has the same name as the video
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed May 24, 2024
1 parent 847a2d9 commit a45d082
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ public List<SubtitleFile> listLocalAndRemotesSubtitles(Uri video, boolean addAll
try {
List<MetaFile2> files = RawListerFactoryWithUpnp.getRawListerForUrl(localSubsDirUri).getFileList();
for (MetaFile2 file : files) {
if (file.getName().startsWith(filenameWithoutExtension) || addAllSubs) {
// ensures that we have a file with the same name as the video
if (file.getName().startsWith(filenameWithoutExtension + ".") || addAllSubs) {
allFiles.add(file);
log.trace("listLocalAndRemotesSubtitles: cache add " + file.getName());
}
Expand Down

0 comments on commit a45d082

Please sign in to comment.