Skip to content

Commit

Permalink
feat(subscribe): ignore hash from url
Browse files Browse the repository at this point in the history
we use it to mark subscription name
  • Loading branch information
1715173329 authored Aug 8, 2024
1 parent e2c166c commit 64f284b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/luci-static/resources/view/homeproxy/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ return view.extend({
/* Subscription nodes start */
for (var suburl of uci.get(data[0], 'subscription', 'subscription_url')) {
const url = new URL(suburl);
const urlhash = hp.calcStringMD5(suburl);
const urlhash = hp.calcStringMD5(suburl.replace(/#.*$/, ''));
const title = url.hash ? decodeURIComponent(url.hash.slice(1)) : url.hostname;

s.tab('sub_' + urlhash, _('Sub (%s)').format(title));
Expand Down
1 change: 1 addition & 0 deletions root/etc/homeproxy/scripts/update_subscriptions.uc
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ function main() {
}

for (let url in subscription_urls) {
url = replace(url, /#.*$/, '');
const groupHash = calcStringMD5(url);
node_cache[groupHash] = {};

Expand Down

0 comments on commit 64f284b

Please sign in to comment.