diff --git a/include/bat/ledger/publisher_info.h b/include/bat/ledger/publisher_info.h index 9e1e9a2..4fa1ab8 100644 --- a/include/bat/ledger/publisher_info.h +++ b/include/bat/ledger/publisher_info.h @@ -51,9 +51,8 @@ LEDGER_EXPORT struct PublisherInfoFilter { int category; PUBLISHER_MONTH month; int year; - PUBLISHER_EXCLUDE excluded; - std::vector> order_by; + PUBLISHER_EXCLUDE excluded; }; LEDGER_EXPORT struct ContributionInfo { diff --git a/src/bat_get_media.cc b/src/bat_get_media.cc index 0822193..d18a65b 100644 --- a/src/bat_get_media.cc +++ b/src/bat_get_media.cc @@ -95,14 +95,8 @@ void BatGetMedia::getPublisherInfoDataCallback(const std::string& mediaId, const return; } - std::vector 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(), "", "", ledger::URL_METHOD::GET, &handler_); @@ -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 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; diff --git a/src/bat_helper.cc b/src/bat_helper.cc index 5b24b8e..9e5a978 100644 --- a/src/bat_helper.cc +++ b/src/bat_helper.cc @@ -1852,7 +1852,7 @@ static bool ignore_ = false; uint64_t getMediaDuration(const std::map& data, const std::string& media_key, const std::string& type) { uint64_t duration = 0; - + if (YOUTUBE_MEDIA_TYPE == type) { std::map::const_iterator iterSt = data.find("st"); std::map::const_iterator iterEt = data.find("et");