diff --git a/package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua b/package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua index f764ff79db..0dd662a788 100644 --- a/package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua +++ b/package/lean/luci-app-qbittorrent/luasrc/model/cbi/qbittorrent.lua @@ -1,13 +1,3 @@ -local e=require"luci.model.uci".cursor() -local o=e:get_first("qbittorrent","qbittorrent","port") or 8080 - -local a=(luci.sys.call("pidof qbittorrent-nox > /dev/null")==0) - -local t="" -if a then - t="

" -end - m = Map("qbittorrent", translate("qBittorrent"), translate("qBittorrent is a cross-platform free and open-source BitTorrent client.").."
"..translate("Default login username: admin, password: adminadmin.")..t) m:section(SimpleSection).template="qbittorrent/qbittorrent_status" diff --git a/package/lean/luci-app-qbittorrent/luasrc/view/qbittorrent/qbittorrent_status.htm b/package/lean/luci-app-qbittorrent/luasrc/view/qbittorrent/qbittorrent_status.htm index 13ebe1c978..b74111ac0c 100644 --- a/package/lean/luci-app-qbittorrent/luasrc/view/qbittorrent/qbittorrent_status.htm +++ b/package/lean/luci-app-qbittorrent/luasrc/view/qbittorrent/qbittorrent_status.htm @@ -4,7 +4,7 @@ XHR.poll(3, '<%=url([[admin]], [[nas]], [[qBittorrent]], [[status]])%>', null, var tb = document.getElementById('qBittorrent_status'); if (data && tb) { if (data.running) { - var links = 'qBittorrent <%:RUNNING%>'; + var links = 'qBittorrent <%:RUNNING%>'; tb.innerHTML = links; } else { tb.innerHTML = 'qBittorrent <%:NOT RUNNING%>'; @@ -12,6 +12,11 @@ XHR.poll(3, '<%=url([[admin]], [[nas]], [[qBittorrent]], [[status]])%>', null, } } ); + +function openwebui(){ + var url = window.location.host+":<%=luci.sys.exec("uci -q get qbittorrent.config.port"):gsub("^%s*(.-)%s*$", "%1")%>"; + window.open('http://'+url,'target',''); +}; //]]> @@ -19,4 +24,4 @@ XHR.poll(3, '<%=url([[admin]], [[nas]], [[qBittorrent]], [[status]])%>', null,

<%:Collecting data...%>

- \ No newline at end of file +