Commit 1812b4a4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Media: Don't hardcode an history size

This is now up to the user to chose how many items they chose to fetch
from the history, through the returned Query's item() method
parent e61b302d
......@@ -735,7 +735,7 @@ Query<IMedia> Media::fetchHistory( MediaLibraryPtr ml )
static const std::string req = "FROM " + policy::MediaTable::Name +
" WHERE last_played_date IS NOT NULL"
" AND type != ?"
" ORDER BY last_played_date DESC LIMIT 100";
" ORDER BY last_played_date DESC";
return make_query<Media, IMedia>( ml, "*", req, IMedia::Type::Stream );
}
......@@ -744,7 +744,7 @@ Query<IMedia> Media::fetchStreamHistory(MediaLibraryPtr ml)
static const std::string req = "FROM " + policy::MediaTable::Name +
" WHERE last_played_date IS NOT NULL"
" AND type = ?"
" ORDER BY last_played_date DESC LIMIT 100";
" ORDER BY last_played_date DESC";
return make_query<Media, IMedia>( ml, "*", req, IMedia::Type::Stream );
}
......
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