Skip to content

Commit

Permalink
Video contribution settings should not apply to non-video "media" sites
Browse files Browse the repository at this point in the history
  • Loading branch information
zenparsing committed Jul 8, 2020
1 parent 99e9bb1 commit 89bf5ab
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ void LedgerImpl::SaveMediaVisit(const std::string& publisher_id,
const ledger::PublisherInfoCallback callback) {
uint64_t new_duration = duration;
if (!braveledger_state::GetPublisherAllowVideos(this)) {
new_duration = 0;
if (visit_data.provider == YOUTUBE_MEDIA_TYPE ||
visit_data.provider == TWITCH_MEDIA_TYPE ||
visit_data.provider == VIMEO_MEDIA_TYPE) {
new_duration = 0;
}
}

bat_publisher_->SaveVisit(publisher_id,
Expand Down

0 comments on commit 89bf5ab

Please sign in to comment.