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

Show: Use enum_to_string

parent 29f77365
......@@ -29,6 +29,7 @@
#include "Media.h"
#include "ShowEpisode.h"
#include "MediaLibrary.h"
#include "utils/Enums.h"
#include "database/SqliteTools.h"
#include "database/SqliteQuery.h"
......@@ -308,9 +309,7 @@ std::string Show::trigger( Show::Triggers trigger, uint32_t dbModel )
" AFTER UPDATE OF "
"is_present ON " + Media::Table::Name +
" WHEN new.subtype = " +
std::to_string(
static_cast<typename std::underlying_type<IMedia::SubType>::type>(
IMedia::SubType::ShowEpisode ) ) +
utils::enum_to_string( IMedia::SubType::ShowEpisode ) +
" AND new.is_present != old.is_present"
" BEGIN "
" UPDATE " + Table::Name + " SET is_present=is_present +"
......
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