MediaLibrary: Insert device in DB when first encountered

(cherry picked from commit 1f931dc8)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
9 jobs for 0.4.x in 16 minutes and 7 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #258869
amd64 debian
build:linux

00:02:49

passed #258870
win32
build:win32

00:02:42

passed #258871
win64
build:win64

00:02:39

 
  Unit Tests
passed #258872
amd64 debian
unit-tests:linux

00:02:04

passed #258873
win32
unit-tests:win32

00:02:55

passed #258874
win64
unit-tests:win64

00:02:48

 
  Functional Tests
passed #258875
amd64 debian
functional-tests:linux

00:01:48

passed #258876
win32
functional-tests:win32

00:02:49

passed #258877
win64
functional-tests:win64

00:02:39