Commit 29692e69 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Media: Fix parsed field default value

parent cb81de17
......@@ -333,7 +333,7 @@ bool Media::createTable( DBConnection connection )
"folder_id UNSIGNED INTEGER,"
"last_modification_date UNSIGNED INTEGER,"
"snapshot TEXT,"
"parsed BOOLEAN,"
"parsed BOOLEAN NOT NULL DEFAULT 0,"
"title TEXT,"
"FOREIGN KEY (show_episode_id) REFERENCES " + policy::ShowEpisodeTable::Name
+ "(id_episode) ON DELETE CASCADE,"
......
......@@ -47,6 +47,7 @@ TEST_F( Files, Create )
ASSERT_EQ( f->albumTrack(), nullptr );
ASSERT_EQ( f->showEpisode(), nullptr );
ASSERT_TRUE( f->isStandAlone() );
ASSERT_FALSE( f->isParsed() );
auto files = ml->files();
ASSERT_EQ( files.size(), 1u );
......
......@@ -108,6 +108,7 @@ TEST_F( VLCMetadataServices, ParseAlbum )
Reload();
auto file = ml->file( "mr-zebra.mp3" );
ASSERT_TRUE( std::static_pointer_cast<Media>( file )->isParsed() );
auto track = file->albumTrack();
ASSERT_NE( track, nullptr );
ASSERT_EQ( file->title(), "Mr. Zebra" );
......
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