Commit dca8295d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

IMedia: Remove Seen metadata

The media playcount should be used instead
Refs #338
parent 6fbf7be6
Pipeline #132747 passed with stage
in 6 minutes and 5 seconds
......@@ -82,7 +82,7 @@ public:
Title,
Chapter,
Program,
Seen,
// Seen, // Replaced by the media playcount
// Video:
VideoTrack = 100,
......
......@@ -806,26 +806,26 @@ static void MetadataGetBatch( Tests* T )
m->setMetadata( IMedia::MetadataType::Crop, "crop" );
m->setMetadata( IMedia::MetadataType::Gain, "gain" );
m->setMetadata( IMedia::MetadataType::Seen, "seen" );
m->setMetadata( IMedia::MetadataType::Rating, "five stars" );
metas = m->metadata();
ASSERT_EQ( 3u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Gain], "gain" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "seen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "five stars" );
m = T->ml->media( m->id() );
metas = m->metadata();
ASSERT_EQ( 3u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Gain], "gain" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "seen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "five stars" );
m->unsetMetadata( IMedia::MetadataType::Gain );
metas = m->metadata();
ASSERT_EQ( 2u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "seen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "five stars" );
}
static void SetBatch( Tests* T )
......@@ -837,7 +837,7 @@ static void SetBatch( Tests* T )
auto res = m->setMetadata( {
{ IMedia::MetadataType::Crop, "crop" },
{ IMedia::MetadataType::Gain, "gain" },
{ IMedia::MetadataType::Seen, "seen" },
{ IMedia::MetadataType::Rating, "five stars" },
});
ASSERT_TRUE( res );
......@@ -845,25 +845,25 @@ static void SetBatch( Tests* T )
ASSERT_EQ( 3u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Gain], "gain" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "seen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "five stars" );
m = T->ml->media( m->id() );
metas = m->metadata();
ASSERT_EQ( 3u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Gain], "gain" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "seen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "five stars" );
// Partial override
m->setMetadata( {
{ IMedia::MetadataType::Seen, "unseen" },
{ IMedia::MetadataType::Rating, "une étoile" },
{ IMedia::MetadataType::Zoom, "zoom" }
});
metas = m->metadata();
ASSERT_EQ( 4u, metas.size() );
ASSERT_EQ( metas[IMedia::MetadataType::Crop], "crop" );
ASSERT_EQ( metas[IMedia::MetadataType::Gain], "gain" );
ASSERT_EQ( metas[IMedia::MetadataType::Seen], "unseen" );
ASSERT_EQ( metas[IMedia::MetadataType::Rating], "une étoile" );
ASSERT_EQ( metas[IMedia::MetadataType::Zoom], "zoom" );
}
......
Supports Markdown
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