Download the PHP package hisune/emby_pinyin without Composer

On this page you can find all versions of the php package hisune/emby_pinyin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package emby_pinyin

Emby Pinyin

此工具能使emby或jellyfin支持电影、电视剧和音乐的拼音首字母排序和搜索,如果觉得此工具帮到你,可以点个Star⭐️!

目录

特性

已支持的内容类型

使用方法

windows系统使用方法

为方便没有windows php环境的用户,直接打包了exe程序执行:

  1. 下载:release
  2. 解压后打开文件夹里面的EmbyPinyin.exe
  3. 输入你的emby或jellyfin服务器地址、API密钥(首次输入后,下次可不用输入,直接选择)
  4. 选择排序方式及要处理的媒体库(如不确定此工具对你的媒体库产生的影响,可自行选择一个媒体库处理,确认没问题后再处理所有媒体库,而不是一开始就处理所有媒体库)
  5. 等待处理完成

windows、linux及mac等系统通用php环境使用方法

需要PHP7.2及以上版本环境,并修改php.iniphar.readonly配置项为Off

首次执行:

二次执行:

执行完毕以上命令后的操作步骤和windows版本一致

Docker

Build image:

运行:

Docker Webhook and Cron

镜像支持监听webhook服务,或通过crond定时执行排序

Build image:

环境变量:

ENV 默认值 说明
WEBHOOK_ENABLED 0 是否开启webhook,默认关闭
CRON_ENABLED 0 是否开启cron,默认关闭
CRON_SCHEDULE 0 cron执行周期,默认每个整点执行
HOST http://example:8096 jellyfin的host,必须改为自己的地址
API_KEY ***** jellyfin的key,必须改为自己的值
SORT_TYPE 1 排序方式,参考参数化执行

webhook监听80端口,请自行映射到host

执行docker logs -f emby_pinyin以及docker exec -it emby_pinyin tail -f /var/log/cron可查看cron执行日志

拼音排序方式

以“测试”俩字为例,不同排序方式的最终结果如下(默认为首字母方式):

  1. 首字母:cs
  2. 全拼:ceshi
  3. 前置字母:c测试
  4. emby默认:测试

拼音搜索

指定originaltitle参数,将修改OriginalTitle(即原标题)字段,从而实现拼音搜索。 originaltitle参数的取值和type参数一致,当传入值4时,会将OriginalTitle修改为和标题相同的值。

注意:originaltitle参数修改后无法还原为原系统默认值,如你需要保留你媒体的原标题,请谨慎修改。

参数化执行

通过对程序传入一定的固定参数能实现:

当前可用参数:

参数全称 参数缩写 说明
server s 服务器编号
host h 指定服务器地址,配合key参数使用,例如:http://192.168.1.1:8096
key k 指定服务器API密钥,配合host参数使用
type t 排序方式,1:首字母,2:全拼,3:前置字母,4:服务器默认
all a 是否处理所有媒体库,y是,n否
media m 媒体库编号
originaltitle o 修改OriginalTitle的方式,值参考type参数,默认不修改
help H 获取帮助

windows exe举例:

windows可以使用创建快捷方式或创建bat脚本的方式传递参数值

linux&mac&windows等系统通用php环境举例:

Webhooks Server

Emby Server从4.7.9.0开始支持“新媒体已添加”的webhook事件,emby_pinyin也从1.0.0版本开始支持,使用webhooks server功能能实现添加媒体库内容后自动执行新内容的拼音排序,做到无人值守,无需手动运行。

推荐在linux环境下执行webhooks server

  1. 开启服务:通过以下命令开启webhooks server:

    如果你想监听局域网请求,可以将localhost换成当前执行命令的本机局域网ip,另外监听端口9091也可以自定义。

  2. 确定请求参数:如果你执行且保存过服务器信息,使用server参数即可,例如:?server=1;你也可以直接使用host和key参数,指定服务器信息,例如:?host=192.168.1.168&key=服务器API密钥。两种方式必选一种。
  3. emby设置Webhooks:打开emby管理后台,定位到服务器->Webhooks->添加Webhooks,输入自定义名称,url填写http://localhost:9091/run.php和第2步的请求参数组装的字符串,例如:http://localhost:9091/run.php?server=1
  4. jellyfin设置Webhooks:打开jellyfin管理后台定位到控制台->插件,安装weebhook插件,点击Webhooks->Add Generic Destination,输入自名称及url同emby;Notification Type选择Item Added,勾选Send All Properties

推荐使用supervisor来管理你的webhooks server,安装supervisor的方法以centos为例:

示例ini配置如下,请自行修改emby_pinyin所在路径,及监听的IP和端口:

最后启动emby_pinyin:

贡献

感谢以下的小伙伴们对于 emby_pinyin 项目的代码贡献,让这个项目变得越来越好!

Contributors

运行截图

使用效果

Sponsor

Thanks to zmto for providing VPS sponsorship.


All versions of emby_pinyin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hisune/emby_pinyin contains the following files

Loading the files please wait ...