hsuyelin / nas-tools

NAS媒体库管理工具
GNU Affero General Public License v3.0
2.25k stars 425 forks source link

[功能改进]: emby增加内网地址和外网地址 #280

Open GavinIves opened 1 year ago

GavinIves commented 1 year ago

当前程序版本

3.2.7

功能改进

目前emby只有一个内网地址 希望可以增加一个外网地址 这样可以在外面自动使用域名和https跳转到emby 在内网直接http+ip 因为我家里只有公网ipv6 所以在有ipv6的地方我可以通过外网访问 当外面没有ipv6 我只能通过wiregurd回家内网 此时我需要内网地址才能访问 目前我通过加js来实现 但是目前在线观看还没有实现 希望能通过后端实现 实现的界面

image

但是这里还没实现

image
  async function example() {
    var count=0
    while (count < 5) {
        ishost=0
        if (!window.location.href.includes("xxx.xxx")) {
            var hyperlinks = document.querySelectorAll('a.card[href*="xxx.xxx.xxx:20001"]');
            for (let i = 0; i < hyperlinks.length; i++) {
                ishost=1
                let href = hyperlinks[i].getAttribute('href');
                href = href.replace('https://xxx.xx.xx:20001', 'http://10.123.1.105:10001');
                hyperlinks[i].setAttribute('href', href);
            }
            if (ishost===0){
                count++
            }
        } else {
            break
        }
        await new Promise(resolve => setTimeout(resolve, 100))
    }
}
example()

参考资料

No response

jackloves111 commented 1 year ago

难道你看剧都是先打开nastool进入而不是用emby进入?

GavinIves commented 1 year ago

有时我会先去nastools看榜单 找到想看的然后直接跳转呀

发自我的 iPhone

在 2023年9月16日,10:31,jackloves111 @.***> 写道:



难道你看剧都是先打开nastool进入而不是用emby进入?

— Reply to this email directly, view it on GitHubhttps://github.com/hsuyelin/nas-tools/issues/280#issuecomment-1722110047, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJJKL7JESAIDCT4AAIVXIULX2UFOVANCNFSM6AAAAAA4YFUX5Y. You are receiving this because you authored the thread.Message ID: @.***>

GavinIves commented 12 months ago

难道你看剧都是先打开nastool进入而不是用emby进入?

可以帮忙加一下这个功能吗 对于我还挺有用的