Commit 9777ead1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

subtitles: Remove unneeded clauses.

(cherry picked from commit f97effab)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2eaee528
...@@ -338,13 +338,12 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -338,13 +338,12 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
strcpy_trim( tmp_fname_trim, tmp_fname_noext ); strcpy_trim( tmp_fname_trim, tmp_fname_noext );
i_prio = SUB_PRIORITY_NONE; i_prio = SUB_PRIORITY_NONE;
if( i_prio == SUB_PRIORITY_NONE && !strcmp( tmp_fname_trim, f_fname_trim ) ) if( !strcmp( tmp_fname_trim, f_fname_trim ) )
{ {
/* matches the movie name exactly */ /* matches the movie name exactly */
i_prio = SUB_PRIORITY_MATCH_ALL; i_prio = SUB_PRIORITY_MATCH_ALL;
} }
if( i_prio == SUB_PRIORITY_NONE && else if( (tmp = strstr( tmp_fname_trim, f_fname_trim )) )
( tmp = strstr( tmp_fname_trim, f_fname_trim ) ) )
{ {
/* contains the movie name */ /* contains the movie name */
tmp += strlen( f_fname_trim ); tmp += strlen( f_fname_trim );
...@@ -360,7 +359,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path, ...@@ -360,7 +359,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
i_prio = SUB_PRIORITY_MATCH_LEFT; i_prio = SUB_PRIORITY_MATCH_LEFT;
} }
} }
if( i_prio == SUB_PRIORITY_NONE && else if( i_prio == SUB_PRIORITY_NONE &&
j == 0 ) j == 0 )
{ {
/* doesn't contain the movie name, prefer files in f_dir over subdirs */ /* doesn't contain the movie name, prefer files in f_dir over subdirs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment