Skip to content

Commit

Permalink
Resolve errors for RSS menu
Browse files Browse the repository at this point in the history
See #2642 for more details.
  • Loading branch information
stickz committed Mar 17, 2024
1 parent 2d67a00 commit 3198cbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
7 changes: 3 additions & 4 deletions plugins/edit/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@ if(plugin.canChangeMenu())
{
if(act=="edittorrent")
{
if(!plugin.isTorrentCommandEnabled.call(this,act,hash))
return(false);
else
return(hash && (hash.length==40))
var regex = '^(http|https)://';
return(hash && (hash.length==40) && !(hash.match(regex)));
}

return(plugin.isTorrentCommandEnabled.call(this,act,hash));
}

Expand Down
11 changes: 3 additions & 8 deletions plugins/rutracker_check/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,10 @@ theWebUI.isTorrentCommandEnabled = function(act,hash)
{
if(act=="checktorrent")
{
if(!plugin.isTorrentCommandEnabled.call(this,act,hash))
return(false);
else
{
// var torrent = this.torrents[hash];
// return(torrent.done == 1000);
return(true);
}
var regex = '^(http|https)://';
return(hash && (hash.length==40) && !(hash.match(regex)));
}

return(plugin.isTorrentCommandEnabled.call(this,act,hash));
}

Expand Down

0 comments on commit 3198cbd

Please sign in to comment.