Index: shell/src/SubscriptionsCommand.cpp |
=================================================================== |
--- a/shell/src/SubscriptionsCommand.cpp |
+++ b/shell/src/SubscriptionsCommand.cpp |
@@ -6,17 +6,24 @@ |
namespace |
{ |
typedef std::vector<AdblockPlus::SubscriptionPtr> SubscriptionList; |
void ShowSubscriptionList(const SubscriptionList& subscriptions) |
{ |
for (SubscriptionList::const_iterator it = subscriptions.begin(); |
it != subscriptions.end(); it++) |
- std::cout << (*it)->GetProperty("title", "(no title)") << " - " << (*it)->GetProperty("url", "") << std::endl; |
+ { |
+ std::cout << (*it)->GetProperty("title", "(no title)") << " - " << (*it)->GetProperty("url", ""); |
+ if ((*it)->GetProperty("author", "") != "") |
+ std::cout << " - " << (*it)->GetProperty("author", ""); |
+ if ((*it)->GetProperty("specialization", "") != "") |
+ std::cout << " - " << (*it)->GetProperty("specialization", ""); |
+ std::cout << std::endl; |
+ } |
} |
} |
SubscriptionsCommand::SubscriptionsCommand( |
AdblockPlus::FilterEngine& filterEngine) |
: Command("subscriptions"), filterEngine(filterEngine) |
{ |
} |
@@ -100,10 +107,10 @@ void SubscriptionsCommand::UpdateSubscri |
const SubscriptionList& subscriptions = filterEngine.GetListedSubscriptions(); |
for (SubscriptionList::const_iterator it = subscriptions.begin(); |
it != subscriptions.end(); it++) |
(*it)->UpdateFilters(); |
} |
void SubscriptionsCommand::FetchSubscriptions() |
{ |
- filterEngine.FetchAvailableSubscriptions(&ShowSubscriptionList); |
+ ShowSubscriptionList(filterEngine.FetchAvailableSubscriptions()); |
} |