欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

将"Emby、Plex、Jellyfin"与"阿里云盘"相遇:一场数字媒体管理的巅峰对决

最编程 2023-12-31 12:48:01
...

此教程默认你已经自己搭建过Emby、Plex、Jellyfin等流媒体服务,所以不会对搭建流媒体服务做讲解

三步走

  1. 阿里云盘配置Webdav服务
  2. 通过rclone将阿里云盘挂载到本地
  3. 流媒体服务(Emby、Plex、Jellyfin)配置媒体库

配置阿里云盘Webdav服务

这部分内容可以看这篇博客:当Infuse遇上阿里云盘

rclone挂载阿里云盘

使用的docker镜像:mumiehub/rclone-mount

使用docker-compose

创建docker-compose.yml文件

version: '3'
services:
  rclone-aliyun:
    image: mumiehub/rclone-mount
    container_name: rclone-aliyun
    restart: always
    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse
    security_opt:
      - apparmor:unconfined
    volumes:
      - <your path>/rclone-aliyun/config:/root/.config/rclone
      - <your path>/rclone-aliyun/aliyun:/mnt/mediaefs:shared
    environment:
      - RemotePath=<your remote path>
      - ConfigDir=/root/.config/rclone
      - ConfigName=rclone.conf
      - MountCommands=--allow-other --allow-non-empty

docker-compose.yml解释

配置项 解释
/root/.config/rclone rclone配置文件位置,文件名为rclone.conf
/mnt/mediaefs:shared 挂载盘位置
RemotePath aliyun:movie,aliyun是挂载名,movie是网盘中的地址

其他的配置可以不用变

创建rclone.conf配置文件

创建配置文件有两种方式:

  1. 在已安装有rclone的机器上创建配置文件
  2. 进入容器内部创建

我们这边选择第二种方式

进入容器内部

docker exec -it rclone-aliyun sh

创建配置

输入命令rclone config后出现这个界面

e) Edit existing remote			#编辑已有的远程挂载点
n) New remote					#新挂载
d) Delete remote				#删除挂载
r) Rename remote				#重命名挂载
c) Copy remote					#为已有挂载建立一个副本
s) Set configuration password	#设置配置密码
q) Quit config					#退出配置
e/n/d/r/c/s/q> # 输入n创建新的挂载

输入n创建新的挂载

name> # 给你的挂载取个名字,这里我取的是aliyun

然后会出现一堆选项,让我们选择类别,这里我们输入webdav

Storage> webdav
URL of http host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Connect to example.com
   \ "https://example.com"
url> # 输入服务商给的webdav地址,如我的地址是http://home-linx:1234
Name of the Webdav site/service/software you are using
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Nextcloud
   \ "nextcloud"
 2 / Owncloud
   \ "owncloud"
 3 / Sharepoint
   \ "sharepoint"
 4 / Other site/service or software
   \ "other"
vendor> # 输入类型,这里我们输入other
User name
Enter a string value. Press Enter for the default ("").
user> # 输入webdav服务的用户名
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> # 输入y之后输入密码,并确认密码
Bearer token instead of user/pass (eg a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token> # 输入一个口令用来代替输入繁琐的密码
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> # 这里可以直接回车

最后确认配置项,输入q退出即可。

重启容器

docker-compose restart # 或者docker-compose up --force-recreate -d

检验是否挂载成功

  1. 进入挂载的文件夹,查看是否有内容
  2. 输入命令df -h,查看是否多了一个容量为1PB的磁盘

流媒体软件添加媒体库

我们这里以Jellyfin为例,EmbyPlex是类似的
在媒体库设置中将文件库的位置选择挂载好的阿里网盘即可,然后就正常的扫描搜刮 搜刮完之后,Jellyfin可以正常显示,阿里云盘中也有相应的文件

最后分享

最后分享一下我最近保存在阿里云盘上的一些资源
大部分资源已刮削,可直接放入Emby、Jellyfin等,免刮削 阿里云盘资源分享