diff options
author | mio <[email protected]> | 2024-09-10 20:39:00 +1000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-09-12 18:51:15 +0900 |
commit | f41da351c6fa85a36a29611edc98cf74834b43af (patch) | |
tree | 3fa1f0da762e2a325541b4900a653f5be1c3289f /src | |
parent | fb0c092eaa9220216ae8873f367b39aa17c71848 (diff) | |
download | codeine-f41da351c6fa85a36a29611edc98cf74834b43af.tar.gz codeine-f41da351c6fa85a36a29611edc98cf74834b43af.zip |
Fix filter list when opening a file
Signed-off-by: mio <[email protected]>
(cherry picked from commit c0311bdfc33f07dbde42a9b4f4758a6c505aae84)
Diffstat (limited to 'src')
-rw-r--r-- | src/app/xineEngine.cpp | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp index 3ae7220..6132f4a 100644 --- a/src/app/xineEngine.cpp +++ b/src/app/xineEngine.cpp @@ -902,13 +902,37 @@ VideoWindow::fileFilter() const { char *supportedExtensions = xine_get_file_extensions( m_xine ); - TQString filter( "*." ); - filter.append( supportedExtensions ); - filter.remove( "txt" ); - filter.remove( "png" ); - filter.replace( ' ', " *." ); - - std::free( supportedExtensions ); + TQString filter("*."); + filter.append(supportedExtensions); + + // Remove protocols + filter.remove(" dvb://"); + filter.remove(" dvbc://"); + filter.remove(" dvbs://"); + filter.remove(" dvbt://"); + filter.remove(" vcd:/"); + filter.remove(" vdr:/"); + filter.remove(" netvdr:/"); + filter.remove(" dvd:/"); + filter.remove(" pvr:/"); + filter.remove(" slave://"); + filter.remove(" cdda:/"); + + // Remove image files + filter.remove(" bmp"); + filter.remove(" gif"); + filter.remove(" jpg"); + filter.remove(" jpeg"); + filter.remove(" png"); + + // Remove misc. files + filter.remove(" txt"); + + // Remove spaces (prevent multiple *.) + filter.replace(" ", " "); + filter.replace(' ', " *."); + + std::free(supportedExtensions); return filter; } |