medialibrary issueshttps://code.videolan.org/videolan/medialibrary/-/issues2019-10-17T14:22:45Zhttps://code.videolan.org/videolan/medialibrary/-/issues/163Title sanitazation new keywords pattern2019-10-17T14:22:45ZSoomin LeeTitle sanitazation new keywords patternIn this case it seems that it is partially sanitized:
Name:
`[Snow-Raws] snow-raws-unwrapped 第09話 (BD 1920x1080 HEVC-YUV420P10 FLAC)`
is currently sanitized to:
`snow raws unwrapped 第09話 (BD HEVC YUV420P10 FLAC)`
It could be interes...In this case it seems that it is partially sanitized:
Name:
`[Snow-Raws] snow-raws-unwrapped 第09話 (BD 1920x1080 HEVC-YUV420P10 FLAC)`
is currently sanitized to:
`snow raws unwrapped 第09話 (BD HEVC YUV420P10 FLAC)`
It could be interesting to sanitize `BD`, `HEVC`, `YUV420P10` and `FLAC`.Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/162Allow to assign and retreive a thumbnail to a Genre2019-11-26T09:41:55ZPierre LamotAllow to assign and retreive a thumbnail to a GenreCurrently the medialibrary doesn't provide thumbnails for genre. It's up to the application to generate its own.
Though it would be nice if the medialibrary can cache the thumbnail and handle its lifecycle.
the API might be the same as ...Currently the medialibrary doesn't provide thumbnails for genre. It's up to the application to generate its own.
Though it would be nice if the medialibrary can cache the thumbnail and handle its lifecycle.
the API might be the same as the one in media
```c
virtual const std::string& thumbnailMrl( ThumbnailSizeType sizeType ) const = 0;
virtual bool hasThumbnail( ThumbnailSizeType sizeType ) const = 0;
virtual bool setThumbnail( const std::string& mrl, ThumbnailSizeType sizeType ) = 0;
```0.7.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/160Enforce a strongly typed enum for public API boolean parameters2019-12-03T11:50:11ZHugo Beauzée-LuyssenEnforce a strongly typed enum for public API boolean parametersSo that they can't be implicitly converted from/to pointers when the number of parameters mismatch.
For instance `virtual Query<IMedia> tracks( bool withThumbnail, const QueryParameters* params = nullptr )`
can be called with `tracks( ...So that they can't be implicitly converted from/to pointers when the number of parameters mismatch.
For instance `virtual Query<IMedia> tracks( bool withThumbnail, const QueryParameters* params = nullptr )`
can be called with `tracks( params )`, the pointer will be converted to bool, and params will be nullptr, without any warning.0.7.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/159Assertion while refreshing a media2019-10-08T13:19:36ZHugo Beauzée-LuyssenAssertion while refreshing a media```
********** Crash dump: **********
Build fingerprint: 'xiaomi/tissot/tissot_sprout:9/PKQ1.180917.001/V10.0.13.0.PDHMIXM:user/release-keys'
pid: 19423, tid: 19502, name: AndroidMedialib >>> org.videolan.vlc.debug <<<
signal 6 (SIGABRT...```
********** Crash dump: **********
Build fingerprint: 'xiaomi/tissot/tissot_sprout:9/PKQ1.180917.001/V10.0.13.0.PDHMIXM:user/release-keys'
pid: 19423, tid: 19502, name: AndroidMedialib >>> org.videolan.vlc.debug <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 0000000000022034 /system/lib64/libc.so (abort+116)
Stack frame #01 pc 00000000000223ac /system/lib64/libc.so (__assert2+52)
Stack frame #02 pc 000000000018691c /data/app/org.videolan.vlc.debug-mK2khuHVjiml8w69l-iE-A==/lib/arm64/libmla.so (medialibrary::parser::MetadataAnalyzer::refreshFile(medialibrary::parser::IItem&) const+624): Routine medialibrary::parser::MetadataAnalyzer::refreshFile(medialibrary::parser::IItem&) const at /mnt/ssd/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/metadata_services/MetadataParser.cpp:557
Stack frame #03 pc 0000000000185a48 /data/app/org.videolan.vlc.debug-mK2khuHVjiml8w69l-iE-A==/lib/arm64/libmla.so (medialibrary::parser::MetadataAnalyzer::run(medialibrary::parser::IItem&)+76): Routine medialibrary::parser::MetadataAnalyzer::run(medialibrary::parser::IItem&) at /mnt/ssd/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/metadata_services/MetadataParser.cpp:107
Stack frame #04 pc 00000000001a0230 /data/app/org.videolan.vlc.debug-mK2khuHVjiml8w69l-iE-A==/lib/arm64/libmla.so (medialibrary::parser::Worker::mainloop()+2120): Routine medialibrary::parser::Worker::mainloop() at /mnt/ssd/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/parser/ParserWorker.cpp:209
Stack frame #05 pc 00000000001a18bc /data/app/org.videolan.vlc.debug-mK2khuHVjiml8w69l-iE-A==/lib/arm64/libmla.so (_ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN12medialibrary6parser6WorkerEFvvEPS9_EEEEEPvSE_+64): Routine _ZNSt6__ndk18__invokeIMN12medialibrary6parser6WorkerEFvvEPS3_JEvEEDTcldsdeclsr3std6__ndk1E7forwardIT0_Efp0_Efp_spclsr3std6__ndk1E7forwardIT1_Efp1_EEEOT_OS7_DpOS8_ at /mnt/ssd/avlc/vlc/build-android-aarch64-linux-android/ndk/toolchains/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/type_traits:4286
Stack frame #06 pc 000000000009202c /system/lib64/libc.so (__pthread_start(void*)+36)
Stack frame #07 pc 00000000000238f0 /system/lib64/libc.so (__start_thread+68)
```Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/158Deadlock2019-11-20T15:38:33ZHugo Beauzée-LuyssenDeadlock```
Thread 13 (Thread 0x7ff7e22d4700 (LWP 8646)):
#0 0x00007ff8073c075d in __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:151
#1 0x00007ff8075f55ba in __asan_handle_no_return () at /usr/lib/x86_64-linu...```
Thread 13 (Thread 0x7ff7e22d4700 (LWP 8646)):
#0 0x00007ff8073c075d in __memset_avx2_erms () at ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:151
#1 0x00007ff8075f55ba in __asan_handle_no_return () at /usr/lib/x86_64-linux-gnu/libasan.so.5
#2 0x00007ff80751bb2d in __interceptor___cxa_throw () at /usr/lib/x86_64-linux-gnu/libasan.so.5
#3 0x00007ff80245fd6f in medialibrary::sqlite::errors::mapToException(char const*, char const*, int) (reqStr=reqStr@entry=0x60b0004a28e8 "INSERT INTO Task(type, mrl, file_type, parent_folder_id, link_to_id) VALUES(?, ?, ?, ?, 0)", errMsg=errMsg@entry=0x6070004edf38 "UNIQUE constraint failed: Task.mrl, Task.type, Task.link_to_id", extRes=extRes@entry=2067) at ./src/database/SqliteErrors.h:559
#4 0x00007ff802462a66 in medialibrary::sqlite::Statement::row() (this=0x7ff7e22ca040) at ./src/database/SqliteTools.h:206
#5 0x00007ff802462a66 in medialibrary::sqlite::Tools::executeRequestLocked<medialibrary::parser::Task::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&>(medialibrary::sqlite::Connection*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::parser::Task::Type&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&) (req="INSERT INTO Task(type, mrl, file_type, parent_folder_id, link_to_id) VALUES(?, ?, ?, ?, 0)", dbConnection=0x6130001645d0) at ./src/database/SqliteTools.h:414
#6 0x00007ff802462a66 in medialibrary::sqlite::Tools::executeInsert<medialibrary::parser::Task::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&>(medialibrary::sqlite::Connection*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::parser::Task::Type&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&) (req="INSERT INTO Task(type, mrl, file_type, parent_folder_id, link_to_id) VALUES(?, ?, ?, ?, 0)", dbConnection=0x6130001645d0) at ./src/database/SqliteTools.h:355
#7 0x00007ff802462a66 in medialibrary::DatabaseHelpers<medialibrary::parser::Task>::insert<medialibrary::parser::Task::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&>(medialibrary::MediaLibrary const*, std::shared_ptr<medialibrary::parser::Task>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::parser::Task::Type&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, medialibrary::IFile::Type&, long&) (req="INSERT INTO Task(type, mrl, file_type, parent_folder_id, link_to_id) VALUES(?, ?, ?, ?, 0)", self=std::shared_ptr<class medialibrary::parser::Task> (empty) = {...}, ml=0x61200025dd40) at ./src/database/DatabaseHelpers.h:128
```
```
Thread 12 (Thread 0x7ff7e2aeb700 (LWP 8645)):
#0 0x00007ff80742fdb5 in futex_wait_cancelable (private=0, expected=0, futex_word=0x613000164688) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 0x00007ff80742fdb5 in __pthread_cond_wait_common (abstime=0x0, mutex=0x613000164690, cond=0x613000164660) at pthread_cond_wait.c:502
#2 0x00007ff80742fdb5 in __pthread_cond_wait (cond=0x613000164660, mutex=0x613000164690) at pthread_cond_wait.c:655
#3 0x00007ff8020d987c in std::condition_variable::wait(std::unique_lock<std::mutex>&) () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ff8026906f6 in std::condition_variable::wait<medialibrary::utils::SWMRLock::lock_read()::{lambda()#1}>(std::unique_lock<std::mutex>&, medialibrary::utils::SWMRLock::lock_read()::{lambda()#1}) (__p=..., __lock=..., this=0x613000164660) at ./src/utils/SWMRLock.h:53
#5 0x00007ff8026906f6 in medialibrary::utils::SWMRLock::lock_read() (this=0x613000164660) at ./src/utils/SWMRLock.h:52
#6 0x00007ff8026906f6 in medialibrary::utils::ReadLocker::lock() (this=<optimized out>) at ./src/utils/SWMRLock.h:127
#7 0x00007ff8026906f6 in std::unique_lock<medialibrary::utils::ReadLocker>::lock() (this=0x7ff7e2ae51c0, this=0x7ff7e2ae51c0) at /usr/include/c++/9/bits/unique_lock.h:141
#8 0x00007ff8026906f6 in std::unique_lock<medialibrary::utils::ReadLocker>::unique_lock(medialibrary::utils::ReadLocker&) (__m=..., this=0x7ff7e2ae51c0) at /usr/include/c++/9/bits/unique_lock.h:71
#9 0x00007ff8026906f6 in medialibrary::sqlite::Connection::acquireReadContext() (this=<optimized out>) at src/database/SqliteConnection.cpp:112
```Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/157ConstraintViolation when restoring linked entities2019-10-23T12:53:33ZHugo Beauzée-LuyssenConstraintViolation when restoring linked entitieshttps://appcenter.ms/orgs/videolan/apps/VLC-for-iOS-production/crashes/errors/2407365223u/overview
```
medialibrary::sqlite::errors::mapToException(char const*, char const*, int) SqliteErrors.h:677
medialibrary::sqlite::Statement::row()...https://appcenter.ms/orgs/videolan/apps/VLC-for-iOS-production/crashes/errors/2407365223u/overview
```
medialibrary::sqlite::errors::mapToException(char const*, char const*, int) SqliteErrors.h:677
medialibrary::sqlite::Statement::row() SqliteTools.h:203
void medialibrary::sqlite::Tools::executeRequestLocked<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, long long&>(medialibrary::sqlite::Connection*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&&, long long&&&) SqliteTools.h:402
bool medialibrary::sqlite::Tools::executeDelete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, long long&>(medialibrary::sqlite::Connection*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&&, long long&&&) SqliteTools.h:323
medialibrary::parser::Task::setMrl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) SqliteTools.h:331
medialibrary::parser::Task::restoreLinkedEntities() Task.cpp:263
medialibrary::parser::Worker::restoreTasks() ParserWorker.cpp:298
medialibrary::parser::Worker::mainloop() ParserWorker.cpp:181
void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (medialibrary::parser::Worker::*)(), medialibrary::parser::Worker*> >(void*) type_traits:4280
```
Most likely the task was already inserted before but we re-discovered it before it got restored, but this need to be looked into more carefully0.6.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/156Add possibility to force/purge media titles in order to use file names2019-10-08T15:47:34ZSoomin LeeAdd possibility to force/purge media titles in order to use file namesIn the case where the media content's title have been badly/purposely modified(e.g. name of the translation team), it can spoil the user experience in VideoGroups, listing, etc...
It could be interesting to have a method to purge the me...In the case where the media content's title have been badly/purposely modified(e.g. name of the translation team), it can spoil the user experience in VideoGroups, listing, etc...
It could be interesting to have a method to purge the media title if needed.
A workaround for this could be to always display file names from the medialibrary but this will make VideoGroups irrelevant since they are based on the title.
Relevant ticket: https://code.videolan.org/videolan/vlc-ios/issues/693https://code.videolan.org/videolan/medialibrary/-/issues/155Add a FS error specific exception2019-10-11T10:03:54ZHugo Beauzée-LuyssenAdd a FS error specific exceptionWe need to stop catching std::exception as a catch all, especially if we want sqlite errors to be propagated higher up.
All sqlite errors are inheriting an sqlite specific exception class, but the filesystem errors are mostly using std:...We need to stop catching std::exception as a catch all, especially if we want sqlite errors to be propagated higher up.
All sqlite errors are inheriting an sqlite specific exception class, but the filesystem errors are mostly using std::runtime_error or std::system_error.
Once this is done, we can handle errors better, as for now we might ignore some critical database errors, if it goes through a catch all0.6.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/154Crash with vlc-android beta12019-10-01T10:31:30ZHugo Beauzée-LuyssenCrash with vlc-android beta1Might already be fixed, but putting it here just in case:
```
10-01 12:15:26.699 14526 14576 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f2f3a656c6988 in tid 14576 (android_audiotr), pid 14526 (rg.videolan....Might already be fixed, but putting it here just in case:
```
10-01 12:15:26.699 14526 14576 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f2f3a656c6988 in tid 14576 (android_audiotr), pid 14526 (rg.videolan.vlc)
10-01 12:15:26.748 15075 15075 E DEBUG : failed to readlink /proc/14576/fd/61: No such file or directory
10-01 12:15:26.773 15075 15075 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
10-01 12:15:26.796 1034 1034 I /system/bin/tombstoned: received crash request for pid 14576
10-01 12:15:26.800 15075 15075 I crash_dump64: performing dump of process 14526 (target tid = 14576)
10-01 12:15:26.809 15075 15075 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-01 12:15:26.809 15075 15075 F DEBUG : Build fingerprint: 'google/sargo/sargo:10/QP1A.190711.020.C3/5869620:user/release-keys'
10-01 12:15:26.809 15075 15075 F DEBUG : Revision: 'MP1.0'
10-01 12:15:26.809 15075 15075 F DEBUG : ABI: 'arm64'
10-01 12:15:26.814 15075 15075 F DEBUG : Timestamp: 2019-10-01 12:15:26+0200
10-01 12:15:26.814 15075 15075 F DEBUG : pid: 14526, tid: 14576, name: android_audiotr >>> org.videolan.vlc <<<
10-01 12:15:26.814 15075 15075 F DEBUG : uid: 10230
10-01 12:15:26.814 15075 15075 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f2f3a656c6988
10-01 12:15:26.814 15075 15075 F DEBUG : x0 2f2f2f3a656c6966 x1 0000007b12e75ac0 x2 0000000000000001 x3 0000000000000000
10-01 12:15:26.814 15075 15075 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
10-01 12:15:26.814 15075 15075 F DEBUG : x8 2f2f2f3a656c6988 x9 0000007b12f33100 x10 0000000000000015 x11 0000000000000000
10-01 12:15:26.814 15075 15075 F DEBUG : x12 0000000000000053 x13 0000000000000049 x14 00293c89dcbd04aa x15 0000000009b97a5d
10-01 12:15:26.814 15075 15075 F DEBUG : x16 0000007aac5f0a30 x17 0000007aac37598c x18 0000007ab0de2338 x19 2f2f2f3a656c6966
10-01 12:15:26.814 15075 15075 F DEBUG : x20 0000007b12e80ef0 x21 0000007b12e75ac0 x22 0000007b12e76020 x23 0000007b12e76020
10-01 12:15:26.814 15075 15075 F DEBUG : x24 0000007b12e76020 x25 0000007aac5f6d78 x26 0000007b131735d8 x27 0000000000000000
10-01 12:15:26.814 15075 15075 F DEBUG : x28 0000007b131735c0 x29 0000007b12e75ab0
10-01 12:15:26.814 15075 15075 F DEBUG : sp 0000007b12e75a60 lr 0000007aac37374c pc 0000007aac3759b8
10-01 12:15:26.821 15075 15075 F DEBUG :
10-01 12:15:26.821 15075 15075 F DEBUG : backtrace:
10-01 12:15:26.821 15075 15075 F DEBUG : #00 pc 00000000001559b8 /data/app/org.videolan.vlc-VTIYSIZX9IYnEqjgSggPdA==/lib/arm64/libmla.so (medialibrary::parser::Worker::parse(std::__ndk1::shared_ptr<medialibrary::parser::Task>)+44) (BuildId: 33b4a43ba4c05e33b2701647ed8280e4281bd430)
10-01 12:15:26.821 15075 15075 F DEBUG : #01 pc 0000000000153748 /data/app/org.videolan.vlc-VTIYSIZX9IYnEqjgSggPdA==/lib/arm64/libmla.so (medialibrary::parser::Parser::done(std::__ndk1::shared_ptr<medialibrary::parser::Task>, medialibrary::parser::Status)+260) (BuildId: 33b4a43ba4c05e33b2701647ed8280e4281bd430)
10-01 12:15:26.821 15075 15075 F DEBUG : #02 pc 0000000000154b78 /data/app/org.videolan.vlc-VTIYSIZX9IYnEqjgSggPdA==/lib/arm64/libmla.so (medialibrary::parser::Worker::mainloop()+1644) (BuildId: 33b4a43ba4c05e33b2701647ed8280e4281bd430)
10-01 12:15:26.821 15075 15075 F DEBUG : #03 pc 0000000000156224 /data/app/org.videolan.vlc-VTIYSIZX9IYnEqjgSggPdA==/lib/arm64/libmla.so (_ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN12medialibrary6parser6WorkerEFvvEPS9_EEEEEPvSE_+64) (BuildId: 33b4a43ba4c05e33b2701647ed8280e4281bd430)
10-01 12:15:26.821 15075 15075 F DEBUG : #04 pc 00000000000e1100 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae)
10-01 12:15:26.821 15075 15075 F DEBUG : #05 pc 0000000000083ab0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae)
```
I'll update after ndk-stack'ingHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/153VideoGroup: Group by name unique media2019-10-02T08:48:36ZSoomin LeeVideoGroup: Group by name unique mediaI believe that VideoGroups shouldn't have single media group.
Indeed, the issue is that when you have for example 4 different videos with different names you will have 4 groups with 1 media.
It could be configurable so that each port c...I believe that VideoGroups shouldn't have single media group.
Indeed, the issue is that when you have for example 4 different videos with different names you will have 4 groups with 1 media.
It could be configurable so that each port can decide on the usage/integration.Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/152Thumbnail : Weird thumbnails are sometimes generated2021-09-13T15:10:53ZAlexandre PerraudThumbnail : Weird thumbnails are sometimes generatedSometimes thumbnails are weirdly generated.
See examples below :
Mr_MrsSmith-h264_aac.mp4 seems to be in "negative" mode
Oban Star-Racers seems "not entirely" decoded
![device-2019-09-27-172008](/uploads/03521a21539ab621f3560a66c7115...Sometimes thumbnails are weirdly generated.
See examples below :
Mr_MrsSmith-h264_aac.mp4 seems to be in "negative" mode
Oban Star-Racers seems "not entirely" decoded
![device-2019-09-27-172008](/uploads/03521a21539ab621f3560a66c711574a/device-2019-09-27-172008.png)Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/151Automatically select another thumbnail position if it's not valuable2021-05-18T12:26:40ZAlexandre PerraudAutomatically select another thumbnail position if it's not valuableSometimes, generated thumbnail for a video is just a black image.
Could it be possible to test the image to see if it's, maybe something like, 90% black ? (or 90% mono-color ?) And try some next key-frame to have a better thumbnail ?
S...Sometimes, generated thumbnail for a video is just a black image.
Could it be possible to test the image to see if it's, maybe something like, 90% black ? (or 90% mono-color ?) And try some next key-frame to have a better thumbnail ?
See the 2 videos below (VOB_Dolby_Canyon and Webm_testclip)
![device-2019-09-27-171030](/uploads/bd7b9ec574be0c0d462bd74b3415b81a/device-2019-09-27-171030.png)Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/150Folder media count doesn't account for is_present2019-09-26T15:18:42ZHugo Beauzée-LuyssenFolder media count doesn't account for is_presentNor the trigger nor the fetching code contain any reference to the media presence, which is not what you would expect.Nor the trigger nor the fetching code contain any reference to the media presence, which is not what you would expect.0.6.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/148Crash from Play Store2019-10-14T16:36:05ZGeoffrey Métaisgeoffrey@videolan.orgCrash from Play Storerevision `18148bc`
Only reported on Pixel devices running Android 10 for now.
`abort+160) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae`
```
********** Crash dump: **********
pid: 0, tid: 0 >>> org.videolan.vlc <<<
Stack frame #00 pc 000...revision `18148bc`
Only reported on Pixel devices running Android 10 for now.
`abort+160) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae`
```
********** Crash dump: **********
pid: 0, tid: 0 >>> org.videolan.vlc <<<
Stack frame #00 pc 0000000000081f74 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae)
Stack frame #01 pc 00000000000a5ce0 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libc++_shared.so (BuildId: 95dcb5c40abfafc54f706cd95020263dbeb522af): Routine abort_message at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:77
Stack frame #02 pc 00000000000a5edc /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libc++_shared.so (BuildId: 95dcb5c40abfafc54f706cd95020263dbeb522af): Routine demangling_terminate_handler() at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_default_handlers.cpp:65
Stack frame #03 pc 00000000000baa68 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libc++_shared.so (BuildId: 95dcb5c40abfafc54f706cd95020263dbeb522af): Routine std::__terminate(void (*)()) at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_handlers.cpp:60
Stack frame #04 pc 00000000000ba170 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libc++_shared.so (BuildId: 95dcb5c40abfafc54f706cd95020263dbeb522af): Routine __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:140
Stack frame #05 pc 00000000000ba0f0 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libc++_shared.so (__cxa_throw+120) (BuildId: 95dcb5c40abfafc54f706cd95020263dbeb522af): Routine __cxa_throw at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:272
Stack frame #06 pc 0000000000106604 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (medialibrary::sqlite::Statement::Statement(sqlite3*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)+1152) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine Statement at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:166
Stack frame #07 pc 00000000001893f0 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (_ZN12medialibrary6sqlite5Tools8fetchAllINS_6parser4TaskES4_JNS3_4StepES5_EEENSt6__ndk16vectorINS6_10shared_ptrIT0_EENS6_9allocatorISA_EEEEPKNS_12MediaLibraryERKNS6_12basic_stringIcNS6_11char_traitsIcEENSB_IcEEEEDpOT1_+148) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine std::__ndk1::vector<std::__ndk1::shared_ptr<medialibrary::parser::Task>, std::__ndk1::allocator<std::__ndk1::shared_ptr<medialibrary::parser::Task> > > medialibrary::sqlite::Tools::fetchAll<medialibrary::parser::Task, medialibrary::parser::Task, medialibrary::parser::Step, medialibrary::parser::Step>(medialibrary::MediaLibrary const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, medialibrary::parser::Step&&, medialibrary::parser::Step&&) at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:279
Stack frame #08 pc 0000000000181f80 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (_ZN12medialibrary15DatabaseHelpersINS_6parser4TaskEE8fetchAllIS2_JNS1_4StepES5_EEENSt6__ndk16vectorINS6_10shared_ptrIT_EENS6_9allocatorISA_EEEEPKNS_12MediaLibraryERKNS6_12basic_stringIcNS6_11char_traitsIcEENSB_IcEEEEDpOT0_+36) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine std::__ndk1::vector<std::__ndk1::shared_ptr<medialibrary::parser::Task>, std::__ndk1::allocator<std::__ndk1::shared_ptr<medialibrary::parser::Task> > > medialibrary::DatabaseHelpers<medialibrary::parser::Task>::fetchAll<medialibrary::parser::Task, medialibrary::parser::Step, medialibrary::parser::Step>(medialibrary::MediaLibrary const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, medialibrary::parser::Step&&, medialibrary::parser::Step&&) at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/DatabaseHelpers.h:97
Stack frame #09 pc 0000000000181b84 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (medialibrary::parser::Task::fetchUncompleted(medialibrary::MediaLibrary const*)+76) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine medialibrary::parser::Task::fetchUncompleted(medialibrary::MediaLibrary const*) at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/parser/Task.cpp:472
Stack frame #10 pc 00000000001798ec /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (medialibrary::parser::Worker::restoreTasks()+48) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine medialibrary::parser::Worker::restoreTasks() at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/parser/ParserWorker.cpp:284
Stack frame #11 pc 00000000001783ec /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (medialibrary::parser::Worker::mainloop()+808) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine medialibrary::parser::Worker::mainloop() at /home/geoffrey/vlc/build/vlc-android/medialibrary/medialibrary/build-android-arm64-v8a/../src/parser/ParserWorker.cpp:180
Stack frame #12 pc 0000000000179d78 /data/app/org.videolan.vlc-ReI5N920PtCd3cHqlnUXMg==/lib/arm64/libmla.so (_ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN12medialibrary6parser6WorkerEFvvEPS9_EEEEEPvSE_+64) (BuildId: 0f471cb97ce2f15be1108e5c5c6247867804fef6): Routine _ZNSt6__ndk18__invokeIMN12medialibrary6parser6WorkerEFvvEPS3_JEvEEDTcldsdeclsr3std6__ndk1E7forwardIT0_Efp0_Efp_spclsr3std6__ndk1E7forwardIT1_Efp1_EEEOT_OS7_DpOS8_ at /home/geoffrey/vlc/build/vlc-android/vlc/build-android-aarch64-linux-android/ndk/toolchains/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/type_traits:4286
Stack frame #13 pc 00000000000e1100 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae)
Stack frame #14 pc 0000000000083ab0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 676a709a0ee633ec9cf6ab05ec6410ae)
```https://code.videolan.org/videolan/medialibrary/-/issues/147Video Group by Name : Name of the group shouldn't be the 6 common letters2019-09-27T16:06:18ZAlexandre PerraudVideo Group by Name : Name of the group shouldn't be the 6 common lettersWhen you enable the Group by Name video option, the names of the groups are only the 6 letters in commons.
Names should be all the letters in commons for a better user experience (and that was the case long time ago.)
See in the screen...When you enable the Group by Name video option, the names of the groups are only the 6 letters in commons.
Names should be all the letters in commons for a better user experience (and that was the case long time ago.)
See in the screenshot "chris" should be "Chris Colorado"
![device-2019-09-25-164026](/uploads/ad40329c3afd105d03845770dd62a243/device-2019-09-25-164026.png)Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/146Network indexed medias get deleted and reindexed on each run2019-09-25T08:21:08ZPierre LamotNetwork indexed medias get deleted and reindexed on each runon each run:
* media gets deleted from the media library,
* found again and reparsed,
* the thumbnail is regenerated:
```
> grep "Scrubs%20%5B1X03%5D.avi" lol.log
[00005655235b6d20] medialibrary medialibrary debug: src/discoverer...on each run:
* media gets deleted from the media library,
* found again and reparsed,
* the thumbnail is regenerated:
```
> grep "Scrubs%20%5B1X03%5D.avi" lol.log
[00005655235b6d20] medialibrary medialibrary debug: src/discoverer/FsDiscoverer.cpp:375 checkFiles File smb://192.168.1.2:445/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi not found on filesystem, deleting it
[00005655235b6d20] medialibrary medialibrary debug: src/parser/ParserWorker.cpp:192 mainloop Executing libvlccore extraction task on smb://192.168.1.2/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi
[00005655235b6d20] medialibrary medialibrary debug: src/parser/ParserWorker.cpp:214 mainloop Done executing libvlccore extraction task on smb://192.168.1.2/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi in 3622ms. Result: 1
[00005655235b6d20] medialibrary medialibrary debug: src/parser/ParserWorker.cpp:192 mainloop Executing Metadata task on smb://192.168.1.2/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi
[00005655235b6d20] medialibrary medialibrary debug: src/metadata_services/MetadataParser.cpp:469 createFileAndMedia Adding smb://192.168.1.2/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi
[00005655235b6d20] medialibrary medialibrary debug: src/parser/ParserWorker.cpp:214 mainloop Done executing Metadata task on smb://192.168.1.2/Public/Samples/samples/avi/Scrubs/Scrubs%20%5B1X03%5D.avi in 20ms. Result: 1
[00005655235b6d20] medialibrary medialibrary debug: src/thumbnails/ThumbnailerWorker.
```
see logs and database enclosed
[lol.log](/uploads/6d582e3a4935d4aed85f7572e5f83e36/lol.log)
[ml.db](/uploads/348da1ffb12e4861eaafc45ecb1b80d0/ml.db)
This might be related to #125
environment:
* Medias comes from a samba share
* vlc version: 931b232536 (+ `ml->setDiscoverNetworkEnabled( true ); `)
* medialibrary verions: 18148bcaf26964d22ebdda26a475ed1ed533046bHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/145Add a VideoGroup getter by name2019-09-19T14:24:14ZHugo Beauzée-LuyssenAdd a VideoGroup getter by nameWe need a VideoGroup getter, to allow applications with intermediate mapping to get the representation of a specific group, as they might not be able to just use the IVideoGroup returned by the general group listing.We need a VideoGroup getter, to allow applications with intermediate mapping to get the representation of a specific group, as they might not be able to just use the IVideoGroup returned by the general group listing.0.6.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/144Change modification events to provide only the ID2019-09-20T09:38:13ZHugo Beauzée-LuyssenChange modification events to provide only the IDFor now, all modification callbacks are fired manually.
This has 2 main drawbacks:
- We have to do it manually :)
- When something happens due to a trigger, we have no way of knowing
So instead, use the same sqlite hooks that are used ...For now, all modification callbacks are fired manually.
This has 2 main drawbacks:
- We have to do it manually :)
- When something happens due to a trigger, we have no way of knowing
So instead, use the same sqlite hooks that are used for deletion, and send the notification with the modified entities IDs.0.6.xHugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/143Crash from Android playstore2019-10-14T16:36:53ZHugo Beauzée-LuyssenCrash from Android playstore```
********** Crash dump: **********
pid: 0, tid: 0 >>> org.videolan.vlc <<<
Stack frame #00 pc 0000000000021abc /system/lib64/libc.so (abort+124)
Stack frame #01 pc 00000000000a5ce0 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/...```
********** Crash dump: **********
pid: 0, tid: 0 >>> org.videolan.vlc <<<
Stack frame #00 pc 0000000000021abc /system/lib64/libc.so (abort+124)
Stack frame #01 pc 00000000000a5ce0 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libc++_shared.so: Routine abort_message at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:77
Stack frame #02 pc 00000000000a5edc /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libc++_shared.so: Routine demangling_terminate_handler() at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_default_handlers.cpp:65
Stack frame #03 pc 00000000000baa68 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libc++_shared.so: Routine std::__terminate(void (*)()) at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_handlers.cpp:60
Stack frame #04 pc 00000000000ba170 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libc++_shared.so: Routine __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:140
Stack frame #05 pc 00000000000ba0f0 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libc++_shared.so: Routine __cxa_throw at /buildbot/src/android/ndk-release-r18/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:272
Stack frame #06 pc 000000000010012c /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine medialibrary::sqlite::errors::mapToException(char const*, char const*, int) at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteErrors.h:635
Stack frame #07 pc 00000000000fe5f0 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine medialibrary::sqlite::Statement::row() at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:203
Stack frame #08 pc 000000000010320c /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine void medialibrary::sqlite::Tools::executeRequestLocked<long&>(medialibrary::sqlite::Connection*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, long&) at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:402
Stack frame #09 pc 00000000001030c0 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine bool medialibrary::sqlite::Tools::executeDelete<long&>(medialibrary::sqlite::Connection*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, long&) at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:323
Stack frame #10 pc 000000000017704c /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine bool medialibrary::sqlite::Tools::executeUpdate<long&>(medialibrary::sqlite::Connection*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, long&) at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/database/SqliteTools.h:331
Stack frame #11 pc 0000000000170c08 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine medialibrary::parser::Worker::mainloop() at /home/geoffrey/vlc/avlc/medialibrary/medialibrary/build-android-arm64-v8a/../src/parser/ParserWorker.cpp:228
Stack frame #12 pc 0000000000171ec4 /mnt/expand/c88abb93-16f8-4ec4-81b7-c247d53c4740/app/org.videolan.vlc--4oV4AYYU_QyrUIwsmPnUQ==/lib/arm64/libmla.so: Routine _ZNSt6__ndk18__invokeIMN12medialibrary6parser6WorkerEFvvEPS3_JEvEEDTcldsdeclsr3std6__ndk1E7forwardIT0_Efp0_Efp_spclsr3std6__ndk1E7forwardIT1_Efp1_EEEOT_OS7_DpOS8_ at /home/geoffrey/vlc/avlc/vlc/build-android-aarch64-linux-android/ndk/toolchains/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/type_traits:4286
Stack frame #13 pc 0000000000083114 /system/lib64/libc.so (__pthread_start(void*)+36)
Stack frame #14 pc 00000000000233bc /system/lib64/libc.so (__start_thread+68)
```
This appears to happen on Android 9 only.Hugo Beauzée-LuyssenHugo Beauzée-Luyssenhttps://code.videolan.org/videolan/medialibrary/-/issues/141Sort by Tracks date is missing2019-09-19T15:42:40ZAlexandre PerraudSort by Tracks date is missingSort by Album date is possible but sorting by Track Date is not.
So this feature is missing on Android and there is no way to sort the tracks by date.Sort by Album date is possible but sorting by Track Date is not.
So this feature is missing on Android and there is no way to sort the tracks by date.Hugo Beauzée-LuyssenHugo Beauzée-Luyssen