GithubHelp home page GithubHelp logo

rankki / bangumibot Goto Github PK

View Code? Open in Web Editor NEW
219.0 2.0 10.0 656 KB

Highly customisable automatic project to follow & watch Anime, works well with media libraries such as Jellyfin

License: MIT License

Shell 0.26% Python 99.28% Dockerfile 0.46%
aria2 automatic bangumi emby jellyfin qbittorrent rss transmission

bangumibot's Introduction

RanKKI / Hugh Liu

  • Monash University
  • Bachelor of Computer Science
  • Blog rankki.xyz
  • Contact me by rankki.dev + @ + icloud.com

RanKKI's GitHub stats

bangumibot's People

Contributors

ddsderek avatar ddsrem avatar github-actions[bot] avatar rankki avatar sgpublic avatar wsine avatar xyqyear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bangumibot's Issues

做种问题

提个小建议,重命名时可以在shutil.move(file, target_file)后添加os.link(target_file, file)在不占空间的情况下在支持硬链接的系统下保种。

Add PUID and PGID settings

Since the user I use by default is not the root user, I want Bangumi to support PUID and PGID settings so that Bangumi generates a profile that corresponds to the user I am using

I can also write the code myself and pull requests if the author needs help

docker 启动成功但是网页无法打开

问题描述如题

启动命令:

docker run -d --name='bangumi'
--net='bridge' -e TZ="Asia/Shanghai"
-e 'BANGUMI_CHECK_INTERVAL'='600'
-e 'BANGUMI_CLIENT_TYPE'='aria2'
-e 'BANGUMI_CLIENT_IP'='172.17.0.18'
-e 'BANGUMI_CLIENT_PORT'='6800'
-e 'BANGUMI_CLIENT_PASSWORD'='XXXXXXX'
-e 'BANGUMI_REDIS_HOST'='172.17.0.19'
-e 'BANGUMI_REDIS_PORT'='6379'
-e 'BANGUMI_REDIS_PASSWORD'='XXXXXXX'
-e 'BANGUMI_SEEDING'='false'
-p '7048:8000/tcp'
-v '/mnt/user/appdata/bangumi/media/':'/media':'rw'
-v '/mnt/user/appdata/bangumi/download/':'/downloads':'rw'
-v '/mnt/user/appdata/bangumi/config/':'/config':'rw'
'rankki/bangumi:latest'

错误日志:
错误信息.txt

`

add pikpak as a downloader

I thought this idea works and wanna turn to you whether it is feasible.

pikpak is a webdrive providing magnet and torrent download feature. thus, i think it is possible to implement as a kind of downloader in this project.

the related api is also summaried in another project already: https://github.com/Quan666/PikPakAPI

I kindly request for your help to review the feasibility please and wonder whether you have time to implement it or if you can briefly give directions which files I should pay attention to for modification.

Sincerely

Cannot run on Termux

~/scripts/Bangumi $ uvicorn main:app --host 0.0.0.0 --log-config conf/log.yml
2022-09-25 19:56:27 - [INFO] - Aria2 Connecting to http://127.0.0.1:6800
2022-09-25 19:56:27 - [INFO] - Started server process [31025]
2022-09-25 19:56:27 - [INFO] - Waiting for application startup.
2022-09-25 19:56:27 - [INFO] - Connecting to Redis...
2022-09-25 19:56:27 - [INFO] - Connected to Redis, version 6.2.7
2022-09-25 19:56:27 - [INFO] - Connected to aria2: 1.36.0
2022-09-25 19:56:27 - [INFO] - Starting...
2022-09-25 19:56:27 - [INFO] - Application startup complete.
2022-09-25 19:56:27 - [INFO] - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
2022-09-25 19:56:27 - [INFO] - Env
Exception in thread Thread-2:
Traceback (most recent call last):
2022-09-25 19:56:27 - [INFO] - ----------- --------------------------------------------------
2022-09-25 19:56:27 - [INFO] - Log Level INFO
2022-09-25 19:56:27 - [INFO] - Client aria2
2022-09-25 19:56:27 - [INFO] - Client Addr :#########@127.0.0.1:6800
2022-09-25 19:56:27 - [INFO] - Redis @127.0.0.1:6379
2022-09-25 19:56:27 - [INFO] - Check 600
2022-09-25 19:56:27 - [INFO] - Download /data/data/com.termux/files/home/storage/downloads
2022-09-25 19:56:27 - [INFO] - Cache ./.cache
2022-09-25 19:56:27 - [INFO] - Media /data/data/com.termux/files/home/media
2022-09-25 19:56:27 - [INFO] - Config ./.config
2022-09-25 19:56:27 - [INFO] - Seeding False
2022-09-25 19:56:27 - [INFO] -
File "/data/data/com.termux/files/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/data/data/com.termux/files/home/scripts/Bangumi/./bangumi/manager/config.py", line 33, in run
self.observer.start()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/api.py", line 262, in start
emitter.start()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/utils/init.py", line 93, in start
self.on_thread_start()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/inotify.py", line 118, in on_thread_start
self._inotify = InotifyBuffer(path, self.watch.is_recursive)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/inotify_buffer.py", line 35, in init
self._inotify = Inotify(path, recursive)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 169, in init
self._add_watch(path, event_mask)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 386, in _add_watch
Inotify._raise_error()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
raise OSError(err, os.strerror(err))
FileNotFoundError: [Errno 2] No such file or directory

Getting requirements to build wheel did not run successfully

使用仓库里的 Dockerfile 构建失败.

同样在 debian12 arm64 中直接使用, pip 安装依赖也有这个问题, 但在ubuntu lts 和 debian11 中却正常安装.

log
25.46   error: subprocess-exited-with-error
25.46
25.46   × Getting requirements to build wheel did not run successfully.
25.46   │ exit code: 1
25.46   ╰─> [48 lines of output]
25.46       running egg_info
25.46       writing lib/PyYAML.egg-info/PKG-INFO
25.46       writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
25.46       writing top-level names to lib/PyYAML.egg-info/top_level.txt
25.46       Traceback (most recent call last):
25.46         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
25.46           main()
25.46         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
25.46           json_out['return_val'] = hook(**hook_input['kwargs'])
25.46         File "/usr/local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
25.46           return hook(config_settings)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
25.46           return self._get_build_requires(config_settings, requirements=['wheel'])
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
25.46           self.run_setup()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
25.46           exec(code, locals())
25.46         File "<string>", line 288, in <module>
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
25.46           return distutils.core.setup(**attrs)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
25.46           return run_commands(dist)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
25.46           dist.run_commands()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
25.46           self.run_command(cmd)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
25.46           super().run_command(command)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
25.46           cmd_obj.run()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 318, in run
25.46           self.find_sources()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 326, in find_sources
25.46           mm.run()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 548, in run
25.46           self.add_defaults()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 586, in add_defaults
25.46           sdist.add_defaults(self)
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 113, in add_defaults
25.46           super().add_defaults()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
25.46           self._add_defaults_ext()
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
25.46           self.filelist.extend(build_ext.get_source_files())
25.46         File "<string>", line 204, in get_source_files
25.46         File "/tmp/pip-build-env-ex171md5/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
25.46           raise AttributeError(attr)
25.46       AttributeError: cython_sources
25.46       [end of output]
25.46
25.46   note: This error originates from a subprocess, and is likely not a problem with pip.
25.46 error: subprocess-exited-with-error
25.46
25.46 × Getting requirements to build wheel did not run successfully.
25.46 │ exit code: 1
25.46 ╰─> See above for output.
25.46
25.46 note: This error originates from a subprocess, and is likely not a problem with pip.
25.47
25.47 [notice] A new release of pip is available: 23.0.1 -> 23.3.1
25.47 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:20
--------------------
  18 |         BANGUMI_CACHE_FOLDER=/cache
  19 |
  20 | >>> RUN pip install -r https://raw.githubusercontent.com/RanKKI/Bangumi/main/requirements.txt
  21 |
  22 |     RUN mkdir -p \
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r https://raw.githubusercontent.com/RanKKI/Bangumi/main/requirements.txt" did not complete successfully: exit code: 1

启动报错:No such file or diractory

我确定我设置的几个目录都是存在的,请问问题出在哪里呢?谢谢!

启动日志如下:

(.venv) madray@nas-ubuntu-2204:~/BangumiBot$ uvicorn main:app --host 0.0.0.0:8085 --log-config ./conf/log.yml
2022-11-23 13:59:35 - [INFO] - QBitTorrent Connecting to 127.0.0.1:8082
2022-11-23 13:59:35 - [INFO] - Started server process [182694]
2022-11-23 13:59:35 - [INFO] - Waiting for application startup.
2022-11-23 13:59:35 - [INFO] - Connecting to Redis...
2022-11-23 13:59:35 - [INFO] - Connected to Redis, version 7.0.5
2022-11-23 13:59:36 - [INFO] - qBittorrent: v4.4.5.10
2022-11-23 13:59:36 - [INFO] - qBittorrent Web API: 2.8.5
2022-11-23 13:59:36 - [INFO] - Starting...
2022-11-23 13:59:36 - [INFO] - Application startup complete.
Exception in thread Thread-2:
2022-11-23 13:59:36 - [INFO] - Env
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2022-11-23 13:59:36 - [ERRO] - [Errno -2] Name or service not known
    self.run()
  File "/home/madray/BangumiBot/./bangumi/manager/config.py", line 33, in run
2022-11-23 13:59:36 - [INFO] - -----------  ------------------------------------------
2022-11-23 13:59:36 - [INFO] - Waiting for application shutdown.
2022-11-23 13:59:36 - [INFO] - Log Level    INFO
    self.observer.start()
2022-11-23 13:59:36 - [INFO] - Application shutdown complete.
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/api.py", line 262, in start
2022-11-23 13:59:36 - [INFO] - Client       qbittorrent
2022-11-23 13:59:36 - [INFO] - Client Addr  [email protected]:8082
2022-11-23 13:59:36 - [INFO] - Redis        @127.0.0.1:6379
2022-11-23 13:59:36 - [INFO] - Check        600
2022-11-23 13:59:36 - [INFO] - Download     /mnt/sda1/Downloads/bangumi
2022-11-23 13:59:36 - [INFO] - Cache        ./.cache
2022-11-23 13:59:36 - [INFO] - Media        /mnt/sda1/OneDrive - sgpublic/公开资源/Bangumi
2022-11-23 13:59:36 - [INFO] - Config       ./.config
2022-11-23 13:59:36 - [INFO] - Seeding      True
2022-11-23 13:59:36 - [INFO] - 
    emitter.start()
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/utils/__init__.py", line 93, in start
    self.on_thread_start()
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/inotify.py", line 118, in on_thread_start
    self._inotify = InotifyBuffer(path, self.watch.is_recursive)
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
    self._inotify = Inotify(path, recursive)
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 169, in __init__
    self._add_watch(path, event_mask)
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 386, in _add_watch
    Inotify._raise_error()
  File "/home/madray/BangumiBot/.venv/lib/python3.10/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
    raise OSError(err, os.strerror(err))
FileNotFoundError: [Errno 2] No such file or directory
rss.json
{
    "urls": [
        "https://mikanani.me/RSS/MyBangumi?token=..."
    ],
    "rules": [
        ".*简.*"
    ],
    "parsers": [

    ],
    "mapper": [

    ]
}
notification.json
[

]
.env
# Client Type: [aria2, qbittorrent, transmission]
BANGUMI_CLIENT_TYPE = "qbittorrent"

# Client Setting
BANGUMI_CLIENT_IP = "127.0.0.1"
BANGUMI_CLIENT_PORT = 8082
BANGUMI_CLIENT_USERNAME = "..."
BANGUMI_CLIENT_PASSWORD = "..."

# Redis
BANGUMI_REDIS_HOST = "127.0.0.1"
BANGUMI_REDIS_PORT = 6379
BANGUMI_REDIS_PASSWORD = ""

# Folder
BANGUMI_DOWNLOAD_FOLDER = "/mnt/sda1/Downloads/bangumi"
BANGUMI_CACHE_FOLDER = "./.cache"
BANGUMI_MEDIA_FOLDER = "/mnt/sda1/OneDrive - sgpublic/公开资源/Bangumi"

# RSS Setting
BANGUMI_CHECK_INTERVAL = 600 # 60 * 10 分钟检查一次

# Config Setting
BANGUMI_CONFIG_PATH = "./.config"

# Logger Setting
BANGUMI_LOGGER_LEVEL = "INFO"

BANGUMI_SEEDING = 1

rss的`_t`参数似乎不起作用

根据我的理解,_t参数应该是获取这个指定时间之后的订阅,但是查不到关于rss订阅_t参数的任何文档,而且似乎蜜柑计划和动漫花园都会忽略url中的_t参数。是否应该重新启用filter_by_time函数来过滤新的番剧而不是靠url参数。

# items = self.filter_by_time(items, last_scrape_time)

此外,即使_t参数有效,是否也应该传入last_scrape_time而非当前时间int(time())

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.