Skip to content

Upgrade from v1 to v2

Googleplex edited this page Mar 24, 2021 · 6 revisions

Upgrade from v1 to v2

Features

Ignore items in image caption

You can set the bot to omit some fields when generating image captions.

Usage:

Set CAPTION_IGNORE in environment variables, e.g.: CAPTION_IGNORE=bookmarked

Default is none.

Make the bot completely public

Set IS_PUBLIC=true to share your bot with everyone, default to false.

API Server with Nazurin Helper

Ugoira support

To support Pixiv ugoira gif preview (sent as mp4) in Telegram, you should have ffmpeg installed.

For more information, refer to https://ffmpeg.org/, make sure libx264 encoder is installed.

On heroku, add a buildpack to your application:

heroku buildpacks:add --index 1 https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

Changes

Authorization

- Add `ALLOW_ID`
- `ADMIN_USERNAME` -> `ALLOW_USERNAME`
- `GROUP_ID` -> `ALLOW_GROUP`
- User IDs & usernames both works now

Storage

  • Configurable option STORAGE is now a string seperated by commas(,).

    e.g.:

    # v1
    STORAGE = ['Mega', 'GoogleDrive']
    
    # v2
    STORAGE = Mega,GoogleDrive
    
  • Local storage using DOWNLOAD_DIR is not an independent storage

    To use local storage, append Local to STORAGE, e.g.: STORAGE=Local,Mega

  • Telegram album channel is now a type of storage

    Besides setting ALBUM_ID, append Telegram to STORAGE, e.g.:

    ALBUM_ID=-100123456
    STORAGE=Telegram,Mega
    

Enhancement

  • Switch to asyncio for better performance
  • Retry when hitting flooding limits
  • Retry for more network requests
Clone this wiki locally