if(htsmsg_get_u32(in, "subscriptionId", &sid))
return htsp_error("Missing argument 'subscriptionId'");
- weight = htsmsg_get_u32_or_default(in, "weight", 150);
+ weight = htsmsg_get_u32_or_default(in, "weight", 0);
LIST_FOREACH(hs, &htsp->htsp_subscriptions, hs_link)
if(hs->hs_sid == sid)
LIST_REMOVE(s, ths_global_link);
- s->ths_weight = weight;
+ if (s->ths_prch)
+ s->ths_weight = profile_chain_weight(s->ths_prch, weight);
+ else
+ s->ths_weight = weight;
+
LIST_INSERT_SORTED(&subscriptions, s, ths_global_link, subscription_sort);
gtimer_arm(&subscription_reschedule_timer,