Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
linting

Correcting build (initialization order)

linting
  • Loading branch information
Jason Sadler committed Sep 26, 2018
1 parent 745ddbb commit 6b2796a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions include/bat/ledger/publisher_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ LEDGER_EXPORT struct PublisherInfoFilter {
int category;
PUBLISHER_MONTH month;
int year;
PUBLISHER_EXCLUDE excluded;

std::vector<std::pair<std::string, bool>> order_by;
PUBLISHER_EXCLUDE excluded;
};

LEDGER_EXPORT struct ContributionInfo {
Expand Down
14 changes: 4 additions & 10 deletions src/bat_get_media.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,8 @@ void BatGetMedia::getPublisherInfoDataCallback(const std::string& mediaId, const
return;
}

std::vector<std::string> split = braveledger_bat_helper::split(mediaId, '_');
std::string new_media_id = mediaId;
if (!split.empty()) {
new_media_id = split[0];
}

if (!publisher_info.get()) {
std::string mediaURL = getMediaURL(new_media_id, providerName);
std::string mediaURL = getMediaURL(mediaId, providerName);
if (YOUTUBE_MEDIA_TYPE == providerName) {
auto request = ledger_->LoadURL((std::string)YOUTUBE_PROVIDER_URL + "?format=json&url=" + ledger_->URIEncode(mediaURL),
std::vector<std::string>(), "", "", ledger::URL_METHOD::GET, &handler_);
Expand All @@ -118,12 +112,12 @@ void BatGetMedia::getPublisherInfoDataCallback(const std::string& mediaId, const
_2,
_3));
} else if (TWITCH_MEDIA_TYPE == providerName) {
const std::string mediaUrl = getMediaURL(new_media_id, providerName);
const std::string mediaUrl = getMediaURL(mediaId, providerName);
std::unique_ptr<ledger::PublisherInfo> new_publisher_info(new ledger::PublisherInfo());
new_publisher_info->favicon_url = "";
new_publisher_info->url = mediaUrl + "/videos";
std::string id = providerName + "#author:" + new_media_id;
new_publisher_info->name = new_media_id;
std::string id = providerName + "#author:" + mediaId;
new_publisher_info->name = mediaId;
new_publisher_info->id = id;

ledger::TwitchEventInfo oldEvent;
Expand Down
2 changes: 1 addition & 1 deletion src/bat_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ static bool ignore_ = false;

uint64_t getMediaDuration(const std::map<std::string, std::string>& data, const std::string& media_key, const std::string& type) {
uint64_t duration = 0;

if (YOUTUBE_MEDIA_TYPE == type) {
std::map<std::string, std::string>::const_iterator iterSt = data.find("st");
std::map<std::string, std::string>::const_iterator iterEt = data.find("et");
Expand Down

0 comments on commit 6b2796a

Please sign in to comment.