This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
blog/_posts/2022-05-21-jellyfin_qbit.md

4.2 KiB
Raw Permalink Blame History

layout, title, subtitle, date, author, catalog, header-img, tags
layout title subtitle date author catalog header-img tags
post Jellyfin&qBit: 自建家庭影音 ADs? pay for songs? Go away! 2022-05-21 11:31:40 Manford Fan false img/post-bg-universe.jpg
Jellyfin
qBitTorrent

上周刚搭建好了mStream上周日睡了一整天晚上精神了又失眠了一整夜。漫漫长夜总要找点事情做未竟的事业继续吧——Jellyfin。随着Jellyfin构建的完成mStream昙花一现的历史也随之终结虽然也不是很好用。Jellyfin集成了音乐电影电视剧书籍图片的汇总与播放功能是作为家庭影院的一个比较好的方案选择。同时该应用也是跨平台的美中不足的是不支持离线访问期待以后的更新。

一、Jellyfin

Jellyfin功能很强大但是部署过程还是很简单的官方给出了三种方式docker二进制包以及源码方式如下是最简单的二进制安装方式

$ apt install curl gnupg
$ curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg
$ echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list
$ apt update
$ apt install jellyfin

二、qBitTorrent

qBitTorrent是跨平台的BT/PT下载工具腾讯VPS的下行带宽被限制但是上行带宽没有被限制下载速度还是很可观的可以达到30MBps可以狠狠的薅一把羊毛了所以可以直接用qBitTorrent的命令行版也即nox/web UI版本来直接下载到VPS上然后在通过Jellyfin观看。安装命令很简单属于标准包所以直接执行apt install qbittorrent-nox即可。运行的时候直接执行qbittorrent-nox,会出现如下:

*** Legal Notice ***
qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.

No further notices will be issued.

Press 'y' key to accept and continue...
y

******** Information ********
To control qBittorrent, access the Web UI at http://localhost:8080
The Web UI administrator username is: admin
The Web UI administrator password is still the default one: adminadmin
This is a security risk, please consider changing your password from program preferences.

**注意:**使用第一次必须先用手动执行一次qbittorrent-nox命令

三、配置域名以及反向代理

对于Jellyfin

无需指定root直接在一个location里面写一行proxy_pass http://localhost:8096;即可。如下是配置好的界面:

对于qBitTorrent

和Jellyfin一样也是指定端口进行本机反向代理但是配置好之后用域名访问发现返回了401状态码但是使用IP+Port的方式正常访问。需要将如下三个复选框勾选掉就能使用域名访问了记得要修改密码~

如果下载进度一直是0而且在线用户以及在线做种人数都是0可尝试使用随机端口

四、开启VPS防火墙

Jellyfin默认端口是8096qBitTorrent的默认端口是8080这两个都需要同时在VPS和腾讯控制台添加白名单。

五、配置开机自启动

因为Jellyfin是通过二进制包安装的所以不存在开机启动问题直接使用systemctl工具来管理即可但是qBitTorrent没有做systemd管理启动方式也比较简单直接是qbittorrent-nox,而且是前台运行,所以放在开机启动脚本中,并让其在后台工作即可。

六、问题记录

1. iOS客户端只播放一首音乐就暂停

暂无电脑端web界面无此问题

2. 显示歌词问题

暂无

3. 电视节目条目中的视频无法播放

暂无,修改成其他音乐视频即可播放

七、参考文档