├── .gitignore
├── LICENSE
├── README.md
├── img
├── demo.png
├── demo2.png
├── step1.png
├── step2.png
├── step3.png
└── test1.jpg
├── notify.sh
├── push.sh
├── sourceFiles
├── addmov.bat
├── addtv.bat
├── login.bat
├── loginfailed.bat
├── playmov.bat
├── playtv.bat
├── pushmessage v0.9通知脚本,需要python环境.py
├── 参数.txt
├── 开始播放.png
├── 插件.png
├── 新媒体入库.png
├── 登录失败.png
├── 登录成功.png
├── 示例就这样.jpg
├── 编辑.png
└── 重要说明.txt
├── tools
├── curl
└── jq
└── user.conf.default
/.gitignore:
--------------------------------------------------------------------------------
1 | test
2 | tmp
3 | *.log
4 | user.conf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Qliangw
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # emby_notify
2 | 改一下现有的win版emby登录、添加、播放等通知,使其支持Linux环境。
3 |
4 | 能力和时间有限,仅仅实现了基本的几个功能,plex用户表示后续更不更新还不好说(逃
5 |
6 | **适用范围**
7 |
8 | 1. docker安装的emby(支持Linuxserver、emby官方)
9 | 2. 群晖套件版(支持6.x,7.x未测试,理论可行)
10 | 3. 其他linux环境安装的emby(也没有测试)
11 |
12 | ## 通知功能
13 |
14 | - [x] 登录成功、失败
15 | - [x] 新媒体入库
16 | - [x] 播放开始、暂停
17 | - [x] 支持Telegram、[企业微信](https://work.weixin.qq.com/) 、~~[Pushplus](https://www.pushplus.plus/)~~、~~[Bark](https://github.com/Finb/Bark)(仅iOS)~~(这俩好像还有点问题,有时间调整一下)通知
18 | - [x] 企业微信、telegram通知附带海报图
19 |
20 | **TODO
21 |
22 | - [ ] 剧集通知模式为[S01E01] 或者 [第一季 第一集]【可选】
23 |
24 | ## [使用方法](https://qliangw.notion.site/emby_notify-898e4531fa314a9bbc15613778b116f6)
25 |
26 |
27 | ### 播放电影填写示例
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | ## 默认推送图
38 |
39 | | 序号 | 展示 |
40 | | ---- | ------------------------------------------------------------ |
41 | | 0 |
|
42 | | 1 |
|
43 | | 2 |
|
44 | | 3 |
|
45 | | 4 |
|
46 |
47 |
48 |
49 | ## 鸣谢
50 |
51 | - 感谢某群友提供的win版脚本。
52 | - 感谢 [Hiccup](https://github.com/Hiccup90) 大佬提供的tmdb海报脚本
53 | - 感谢群友老哥们提供的默认推送图
54 | - **感谢鞭策我的堂众们(要不催就不更了**
55 |
--------------------------------------------------------------------------------
/img/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/demo.png
--------------------------------------------------------------------------------
/img/demo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/demo2.png
--------------------------------------------------------------------------------
/img/step1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/step1.png
--------------------------------------------------------------------------------
/img/step2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/step2.png
--------------------------------------------------------------------------------
/img/step3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/step3.png
--------------------------------------------------------------------------------
/img/test1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/img/test1.jpg
--------------------------------------------------------------------------------
/notify.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | versionX="0.0.3"
3 | updateX="2022-03-18"
4 | BASE_ROOT=$(cd "$(dirname "$0")";pwd)
5 | TOOLS_DIR=${BASE_ROOT}/tools
6 | cd $BASE_ROOT
7 | . ./user.conf
8 | # 苏神yyds
9 | PIC_URL0="https://s2.loli.net/2022/03/17/dQCgS5mhX2lBFs9.jpg"
10 | PIC_URL1="https://s2.loli.net/2022/03/17/amj947HFM3I5TPl.jpg"
11 | # 仔老师提供
12 | PIC_URL2="https://s2.loli.net/2022/03/17/6L9XIStKPChUHlV.jpg"
13 | # 滑妹提供
14 | PIC_URL3="https://s2.loli.net/2022/03/18/TBKDNwUdmPcZ8tX.png"
15 | PIC_URL4="https://s2.loli.net/2022/03/18/3wsMPkABUFyNO12.png"
16 | TEMP_PIC=PIC_URL$SELECT_PIC
17 | DEFAULT_PIC=$(eval echo '$'"$TEMP_PIC")
18 | if [ ! -f "./log.txt" ]; then
19 | echo ""
20 | else
21 | rm ./log.txt
22 | fi
23 |
24 | echo $DEFAULT_PIC >> ./log.txt
25 |
26 | TMDB_ID=$4
27 |
28 | #推送渠道
29 | function push_channel()
30 | {
31 | echo ""
32 | TOKEN=$TMDB_API_KEY
33 | echo $TOKEN
34 | PIC_URL=""
35 | }
36 |
37 | # 根据推送渠道处理数据
38 | function parse_msg()
39 | {
40 | PUSH_DIGEST=${MSG}
41 | PUSH_CONTENT="$(echo "$PUSH_DIGEST" | sed 's/\\n/\
/g')"
42 | }
43 |
44 |
45 | function push_all()
46 | {
47 | # parse_msg
48 | ./push.sh "$TITLE" "${PUSH_DIGEST}" "${PUSH_CONTENT}" "$IMG_PUSH" >> ./log.txt
49 | }
50 |
51 | # 版本信息
52 | function version()
53 | {
54 | echo -e "--Version:${versionX}" "\\n--update time:${updateX}"
55 | exit 0
56 | }
57 |
58 | # 帮助文档
59 | function display_help()
60 | {
61 | echo "Usage: $0 [option...] {AM|AT|PM|PT|LS|LF}" >&2
62 | echo " AM, --add-movie 添加movie"
63 | echo " AT, --add-tv 添加TV"
64 | echo " PM, --play-movie 播放movie"
65 | echo " PT, --play-tv 播放tv"
66 | echo " SM, --play-movie 停止播放movie"
67 | echo " ST, --play-tv 停止播放tv"
68 | echo " LS, --login-success 登录成功"
69 | echo " LF, --login-failed 登录失败"
70 | echo " -v, --version 版本信息"
71 | echo " -h, --help 帮助信息"
72 | echo
73 | # echo some stuff here for the -a or --add-options
74 | exit 0
75 | }
76 |
77 | function test()
78 | {
79 | echo "base_root:" $BASE_ROOT >> ./log.txt
80 | echo "测试通知" >> ./log.txt
81 |
82 | TITLE="测试通知"
83 | MSG="内容:无\n时间:$(date +'%H:%M:%S')"
84 | echo $MSG >> ./log.txt
85 | IMG_PUSH=$DEFAULT_PIC
86 | parse_msg
87 | push_all
88 | }
89 |
90 | function get_new_str()
91 | {
92 | len_old_str=${#old_str}
93 | echo "字符串长度:" "${len_old_str}" >> ./log.txt
94 | if [ $len_old_str -gt 120 ]; then
95 | echo "字符串大约120"
96 | new_str="${old_str:0:120}...."
97 | else
98 | new_str=$old_str
99 | fi
100 | echo ""
101 | }
102 |
103 |
104 | function get_img_url()
105 | {
106 | echo "电影播放脚本入口:" >> ./log.txt
107 | echo "TMDB_ID:" "$TMDB_ID" >> ./log.txt
108 | RES_TMDB=$("${TOOLS_DIR}"/curl -s 'https://api.themoviedb.org/3/'${MEDIA_TYPE}'/'${TMDB_ID}'/images?api_key='${TMDB_API_KEY}'')
109 | IMG_PATH=$(echo ${RES_TMDB} | "${TOOLS_DIR}"/jq --raw-output '.backdrops | .[0] | .file_path')
110 | echo "图片路径:" $IMG_PATH >> ./log.txt
111 | RES_FIND_JPG=$(echo $IMG_PATH | grep "jpg")
112 | echo "是否找到:" $RES_FIND_JPG >> ./log.txt
113 | IMG_PUSH=""
114 | if [ "$RES_FIND_JPG" = "" ]; then
115 | # echo "取得图片:" $PIC_URL
116 | IMG_PUSH=$DEFAULT_PIC
117 | echo "为空" >> ./log.txt
118 | else
119 | # PIC_URL=$DEFAULT_PIC
120 | IMG_PUSH="https://image.tmdb.org/t/p/w500${IMG_PATH}"
121 | echo "图片:" $IMG_PUSH >> ./log.txt
122 | echo "非空" >> ./log.txt
123 | fi
124 | }
125 |
126 |
127 | # 参数执行
128 | if [ ! "$1" ]; then
129 | echo "空参"
130 | elif [ "$1" = "-v" ]; then
131 | version
132 | elif [ $1 = "AM" ]; then
133 | # 2-剧名|3-剧情|4-tmdb
134 | echo "电影入库脚本入口:"
135 | MEDIA_NAME=$2
136 | MEDIA_MSG=$3
137 | TMDB_ID=$4
138 | MEDIA_TYPE="movie"
139 |
140 | get_img_url
141 |
142 | if [ $MEDIA_MSG = "%item.overview%" ]; then
143 | MEDIA_MSG="暂无简介"
144 | fi
145 | old_str=$MEDIA_MSG
146 | get_new_str
147 | MEDIA_MSG=$new_str
148 |
149 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
150 |
151 | MSG="剧情:$MEDIA_MSG\n时间:$(date +'%H:%M:%S')"
152 | TITLE="电影入库:$MEDIA_NAME" >> ./log.txt
153 | parse_msg
154 | push_all
155 | elif [ $1 = "AT" ]; then
156 | # 2-剧名|3-剧情|4-tmdb|5-季x|6-集x
157 | echo "电视剧入库脚本入口:"
158 | MEDIA_NAME=$2
159 | MEDIA_MSG=$3
160 | TMDB_ID=$4
161 | SEASON_NUM=$5
162 | EPISODE_NUM=$6
163 | SE_NUM="S${SEASON_NUM}E${EPISODE_NUM}"
164 | MEDIA_TYPE="tv"
165 | get_img_url
166 | case $MEDIA_NAME in
167 | *"$SEASON_NULL"* )
168 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/\%season\.number\%/0/g')" ;;
169 | esac
170 |
171 | if [ $MEDIA_MSG = "%item.overview%" ]; then
172 | MEDIA_MSG="暂无简介"
173 | fi
174 |
175 | old_str=$MEDIA_MSG
176 | get_new_str
177 | MEDIA_MSG=$new_str
178 |
179 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
180 | MEDIA_MSG="$(echo "$MEDIA_MSG" | sed 's/[ ][ ]*//g')"
181 | TITLE="剧集入库:$MEDIA_NAME-${SE_NUM}"
182 | MSG="剧情:$MEDIA_MSG\n时间:$(date +'%H:%M:%S')"
183 | parse_msg
184 | push_all
185 | elif [ $1 = "PM" ]; then
186 | # 0-脚本
187 | # 1-脚本参数
188 | # 2-用户名|3-剧名|4-tmdb|5-剧情|6-设备|7-占比
189 | MEDIA_TYPE="movie"
190 | MEDIA_NAME=$3
191 | MEDIA_MSG=$5
192 | DEV_NAME=$6
193 | PERCENT=$7
194 |
195 | get_img_url
196 |
197 | if [ $MEDIA_MSG = "%item.overview%" ]; then
198 | MEDIA_MSG="暂无简介"
199 | fi
200 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
201 | echo "$MEDIA_MSG" >> ./log.txt
202 | old_str=$MEDIA_MSG
203 | get_new_str
204 | MEDIA_MSG=$new_str
205 | MSG="用户:$2\n设备:$DEV_NAME\n进度:$PERCENT%\n剧情:$MEDIA_MSG\n时间:$(date +'%H:%M:%S')"
206 |
207 | TITLE="播放电影:$MEDIA_NAME"
208 | echo "$TITLE" >> ./log.txt
209 | parse_msg
210 | push_all
211 | elif [ $1 = "PT" ]; then
212 | # 0-脚本
213 | # 1-脚本参数
214 | # 2-用户名|3-剧名|4-tmdb|5-剧情|6-设备|7-占比|8-季x|9-集x|
215 | MEDIA_NAME=$3
216 | TMDB_ID=$4
217 | MEDIA_MSG=$5
218 | DEV_NAME=$6
219 | PERCENT=$7
220 | SEASON_NUM=$8
221 | EPISODE_NUM=$9
222 | SE_NUM="S${SEASON_NUM}E${EPISODE_NUM}"
223 | MEDIA_TYPE="tv"
224 | get_img_url
225 | if [ $MEDIA_MSG = "%item.overview%" ]; then
226 | MEDIA_MSG="暂无简介"
227 | fi
228 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
229 | echo "$MEDIA_MSG" >> ./log.txt
230 | old_str=$MEDIA_MSG
231 | get_new_str
232 | MEDIA_MSG=$new_str
233 | MSG="用户:$2\n设备:$DEV_NAME\n进度:$PERCENT%\n剧情:$MEDIA_MSG\n时间:$(date +'%H:%M:%S')"
234 | # MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
235 | # MSG="用户:$2\n剧集:$MEDIA_NAME\n时间:$(date +'%H:%M:%S')"
236 | TITLE="播放剧集:${MEDIA_NAME}-${SE_NUM}"
237 | echo "$TITLE" >> ./log.txt
238 | parse_msg
239 | push_all
240 | elif [ $1 = "SM" ]; then
241 | # 0-脚本
242 | # 1-脚本参数
243 | # 2-用户名|3-剧名|4-tmdb|5-设备
244 | echo "电影停止" >> ./log.txt
245 | MEDIA_TYPE="movie"
246 | MEDIA_NAME=$3
247 | DEV_NAME=$5
248 | get_img_url
249 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
250 | MSG="用户:$2\n设备:$DEV_NAME\n时间:$(date +'%H:%M:%S')"
251 | TITLE="停止播放电影:$MEDIA_NAME"
252 | echo "$TITLE" >> ./log.txt
253 | parse_msg
254 | push_all
255 | elif [ $1 = "ST" ]; then
256 | # 0-脚本
257 | # 1-脚本参数
258 | # 2-用户名|3-剧名|4-tmdb|5-设备|6-季x|7-集x|
259 | echo "剧集停止" >> ./log.txt
260 | MEDIA_NAME=$3
261 | DEV_NAME=$5
262 | SEASON_NUM=$6
263 | EPISODE_NUM=$7
264 | SE_NUM="S${SEASON_NUM}E${EPISODE_NUM}"
265 | MEDIA_TYPE="tv"
266 | get_img_url
267 | MEDIA_NAME="$(echo "$MEDIA_NAME" | sed 's/[ ][ ]*//g')"
268 | MSG="用户:$2\n设备:$DEV_NAME\n时间:$(date +'%H:%M:%S')"
269 | TITLE="停止播放剧集:${MEDIA_NAME}-${SE_NUM}"
270 | echo "$TITLE" >> ./log.txt
271 | parse_msg
272 | push_all
273 | elif [ $1 = "LS" ]; then
274 | MSG="用户:$2\n地址:$3\n时间:$(date +'%H:%M:%S')\n设备:$4"
275 | TITLE="登录成功"
276 | IMG_PUSH=$DEFAULT_PIC
277 | parse_msg
278 | push_all
279 | elif [ $1 = "LF" ]; then
280 | MSG="用户:$2\n地址:$3\n密码:$4\n时间:$(date +'%H:%M:%S')\n设备:$5"
281 | TITLE="登录失败"
282 | IMG_PUSH=$DEFAULT_PIC
283 | parse_msg
284 | push_all
285 | elif [ $1 = "-h" ]; then
286 | display_help
287 | elif [ $1 = "test" ]; then
288 | test
289 | # se_test
290 | else
291 | echo "请输入正确参数,notify.sh -h查看帮助"
292 | fi
293 |
--------------------------------------------------------------------------------
/push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | BASE_ROOT=$(cd "$(dirname "$0")";pwd)
4 | TOOLS_DIR=${BASE_ROOT}/tools
5 | cd ${BASE_ROOT}
6 | . ./user.conf
7 |
8 |
9 | TITLE="$1"
10 | DIGE="$2"
11 | PIC_URL="$4"
12 |
13 | function urlencode() {
14 | if [ ! $? -eq 0 ]; then echo -E "$1";return; fi
15 | encode_str=$(echo -E "$1" |sed "s/%/%%/g")
16 | printf -- "$encode_str" | "${TOOLS_DIR}"/curl -Gso /dev/null -w %{url_effective} --data-urlencode @- "" |cut -c 3-
17 | }
18 |
19 | BARK_TITLE=$(echo $(urlencode ${TITLE}))
20 | BARK_DIGE=$(echo $(urlencode ${DIGE}))
21 |
22 |
23 |
24 |
25 | function qywx()
26 | {
27 | RET=$("${TOOLS_DIR}"/curl -s https://qyapi.weixin.qq.com/cgi-bin/gettoken?"corpid="${CORPID}"&corpsecret="${CORP_SECRET}"")
28 | KEY=$(echo ${RET} | "${TOOLS_DIR}"/jq -r .access_token)
29 |
30 |
31 |
32 | cat>tmp_qywx<tmp_pushplus<tmp_tg<0):
352 | if serverChan:
353 | # serverChan格式为https://sctapi.ftqq.com/.send&text=<标题>&desp=<正文>
354 | scurl = scurl + "?text=" + parse.quote(sys.argv[1]) + "&desp=" + parse.quote(desp)
355 | #print(scurl)
356 | if bark:
357 | # bark格式为https:////<标题>/<正文>
358 | barkurl = barkurl + parse.quote(sys.argv[1]) + "/" + parse.quote(desp)
359 | barkgroup = getbarkgroup(sys.argv[1])
360 | if (len(barkgroup)>0):
361 | # 分组的话在消息后面加上?group=<分组名称>
362 | barkurl = barkurl + "?group=" + parse.quote(barkgroup)
363 | #print(barkurl)
364 | if iyuu:
365 | # iyuu格式为https://iyuu.cn/.send&text=<标题>&desp=<正文>
366 | iyuuurl = iyuuurl + "?text=" + parse.quote(sys.argv[1]) + "&desp=" + parse.quote(desp)
367 | #print(iyuuurl)
368 | if pushplus:
369 | # pushplus格式为http://www.pushplus.plus/send?token=&channel=&template=&title=<标题>&content=<正文>
370 | pushplusurl = pushplusurl + "&title=" + parse.quote(sys.argv[1]) + "&content=" + parse.quote(desp)
371 | #print(pushplusurl)
372 | if smtp:
373 | # smtp和其他推送方法不同, 这里是用smtplib组件来实现
374 | smtpmailsubject = Header(sys.argv[1], 'utf-8').encode()
375 | smtpmailbody = MIMEText(desp, 'plain', 'utf-8')
376 | if dingtalk:
377 | # dingtalk使用的是webhook方式调用 - 这里后面会使用post方法推送参数
378 | dingtalksubject = sys.argv[1]
379 | dingtalkmessage = getdingtalkmessage(dingtalksubject, desp)
380 | if qywechatrobot:
381 | # qywechatrobot使用的是webhook方式调用 - 这里后面会使用post方法推送参数
382 | qywechatrobotsubject = sys.argv[1]
383 | qywechatrobotmessage = getqywechatrobotmessage(qywechatrobotsubject, desp)
384 | if qywechatapp:
385 | # qywechatapp使用的是webhook方式调用 - 这里后面会使用post方法推送参数
386 | qywechatappsubject = sys.argv[1]
387 | qywechatappmessage = getqywechatappmessage(qywechatapptouser, qywechatappagentid, qywechatappsubject, desp, qywechatappmessagetype)
388 | if feishu:
389 | # feishu使用的是webhook方式调用 - 这里后面会使用post方法推送参数
390 | feishusubject = sys.argv[1]
391 | feishumessage = getfeishumessage(feishusubject, desp, feishutimestamp, feishusign)
392 | if telegram:
393 | # telegram格式为https://api.telegram.org/bot/sendMessage?chat_id=&text=<正文>
394 | telegramurl = telegramurl + "&text=" + parse.quote(sys.argv[1] + "\n\n" + desp)
395 | #print(telegramurl)
396 |
397 | # 发送消息
398 | if serverChan:
399 | print("***serverChan***")
400 | resp = request.urlopen(scurl)
401 | print(resp.read().decode())
402 | if bark:
403 | print("***bark***")
404 | resp = request.urlopen(barkurl)
405 | print(resp.read().decode())
406 | if iyuu:
407 | print("***iyuu***")
408 | resp = request.urlopen(iyuuurl)
409 | print(resp.read().decode())
410 | if pushplus:
411 | print("***pushplus***")
412 | resp = request.urlopen(pushplusurl)
413 | print(resp.read().decode())
414 | if smtp:
415 | print("***smtp***")
416 | smtpcon = smtplib.SMTP_SSL(smtpserver, smtpserverport)
417 | smtpcon.login(smtp_sender, smtp_authcode)
418 | smtpmsg = MIMEMultipart()
419 | smtpmsg['Subject'] = smtpmailsubject
420 | smtpmsg['From'] = smtp_sender
421 | smtpmsg['To'] = smtp_recipient
422 | smtpmsg.attach(smtpmailbody)
423 | smtpcon.sendmail(smtp_sender, smtp_recipient, smtpmsg.as_string())
424 | smtpcon.quit()
425 | print("successful!")
426 | if dingtalk:
427 | print("***dingtalk***")
428 | #print(dingtalksign)
429 | #print(dingtalkurl)
430 | send_data = json.dumps(dingtalkmessage)
431 | send_data = send_data.encode("utf-8")
432 | handler = request.Request(url=dingtalkurl, data=send_data, headers=dingtalkurlheader)
433 | resp = request.urlopen(handler)
434 | print(resp.read().decode())
435 | if qywechatrobot:
436 | print("***qywechatrobot***")
437 | send_data = json.dumps(qywechatrobotmessage)
438 | send_data = send_data.encode("utf-8")
439 | handler = request.Request(url=qywechatroboturl, data=send_data, headers=qywechatrobotheader)
440 | resp = request.urlopen(handler)
441 | print(resp.read().decode())
442 | if qywechatapp:
443 | print("***qywechatapp***")
444 | send_data = json.dumps(qywechatappmessage)
445 | send_data = send_data.encode("utf-8")
446 | handler = request.Request(url=qywechatappurl, data=send_data, headers=qywechatappheader)
447 | resp = request.urlopen(handler)
448 | print(resp.read().decode())
449 | if feishu:
450 | print("***feishu***")
451 | #print(feishusign)
452 | #print(feishuurl)
453 | #print(feishumessage)
454 | send_data = json.dumps(feishumessage)
455 | send_data = send_data.encode("utf-8")
456 | handler = request.Request(url=feishuurl, data=send_data, headers=feishuheader)
457 | resp = request.urlopen(handler)
458 | print(resp.read().decode())
459 | if telegram:
460 | print("***telegram***")
461 | resp = request.urlopen(telegramurl)
462 | print(resp.read().decode())
463 |
464 |
--------------------------------------------------------------------------------
/sourceFiles/参数.txt:
--------------------------------------------------------------------------------
1 | 播放电影
2 | "%username%" "%item.name%(%item.productionyear%)"
3 | 播放电视剧
4 | "%username%" "%series.name%-S%season.number%E%episode.number%"
5 | 登录失败
6 | %username% %device.remote.ipaddress% %password%
7 | 登录成功
8 | %username% %device.remote.ipaddress%
9 | 电影入库
10 | "%item.name%(%item.productionyear%)" "%item.overview%"
11 | 电视剧入库
12 | "%series.name%--S%season.number%E%episode.number%" "%item.overview%"
13 |
--------------------------------------------------------------------------------
/sourceFiles/开始播放.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/开始播放.png
--------------------------------------------------------------------------------
/sourceFiles/插件.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/插件.png
--------------------------------------------------------------------------------
/sourceFiles/新媒体入库.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/新媒体入库.png
--------------------------------------------------------------------------------
/sourceFiles/登录失败.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/登录失败.png
--------------------------------------------------------------------------------
/sourceFiles/登录成功.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/登录成功.png
--------------------------------------------------------------------------------
/sourceFiles/示例就这样.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/示例就这样.jpg
--------------------------------------------------------------------------------
/sourceFiles/编辑.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/编辑.png
--------------------------------------------------------------------------------
/sourceFiles/重要说明.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/sourceFiles/重要说明.txt
--------------------------------------------------------------------------------
/tools/curl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/tools/curl
--------------------------------------------------------------------------------
/tools/jq:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qliangw/emby_notify/401890a13703a31646398f7bbaa692496d709967/tools/jq
--------------------------------------------------------------------------------
/user.conf.default:
--------------------------------------------------------------------------------
1 | ## 【一】推送配置
2 | # 1. 企业微信配置
3 | export CORPID=""
4 | export CORP_SECRET=""
5 | export AGENTID=""
6 | export MEDIA_ID=""
7 | export TOUSER=""
8 |
9 | # 2. pushplus配置
10 | export PUSHPLUS_TOKEN=""
11 | export PUSHPLUS_GROUP=""
12 | # 默认是wechat,可选【wechat/webhook/cp/mail】 详情:https://www.pushplus.plus/push1.html
13 | # 仅仅测试了wechat模式,其他未测试。
14 | export PUSHPLUS_CHANNEL="wechat"
15 |
16 | # 3. bark配置
17 | # 可以修改为个人搭建的地址,若为官方的默认不修改
18 | export BARK_PUSH_URL="https://api.day.app"
19 | export BARK_KEY=""
20 |
21 | # 4. tg配置
22 | export TG_CHAT_ID=""
23 | export TG_TOKEN=""
24 |
25 | # 【二】TMDB配置
26 | # TMDB_API需要官网注册获取:https://www.themoviedb.org/
27 | export TMDB_API_KEY=""
28 |
29 | # 【三】默认图片选择
30 | # 选择0 1 2 3 4
31 | export SELECT_PIC=4
32 | # 自定义图片只需要PIC_URLx,其中x是大于10的正整数
33 | export PIC_URL10=""
34 | export PIC_URL11=""
35 | export PIC_URL12=""
36 | export PIC_URL13=""
37 | export PIC_URL14=""
38 |
--------------------------------------------------------------------------------