ShokoAnime / ShokoServer

Repository for Shoko Server.
https://shokoanime.com/
MIT License
412 stars 74 forks source link

[DEV- Daily] Renamer Script always fails (even preview) #1181

Closed t0815 closed 1 month ago

t0815 commented 1 month ago

VERSION INFORMATION

Server Version: 4.2.2.176 /a2c0340

Desktop Version: n/a

Web-UI Version: 2.1.0-dev.316

LOG FILE

n/a

DESCRIPTION

Renamer-Scripts always fail, even when generating preview. Did try the following script:

DO ADD '%sna'

Tested other scripts too, but same result. The option "Move Files" was not checked.

grafik

ShokoError- log does show nothing. In dev tools, the request returns 200, and the response is:

...
  {
    "FileID": 76031,
    "FileLocationID": 135474,
    "ConfigName": "Rename to Orig",
    "IsSuccess": false,
    "ErrorMessage": "Not relocating file as it is not in a drop source or drop destination."
  },
...

The request was:

grafik

/api/v3/Renamer/Config/Rename%20to%20Orig/Relocate?deleteEmptyDirectories=true&move=false&rename=true

STEPS TO REPRODUCE

  1. Add files to renamer
  2. use the sample script or any other default script
revam commented 1 month ago

The files you're trying to rename/move are in an import folder with the type set to 'none,' which excludes it and it's files from being used in the renaming/move system at all. Set the type to 'destination' or 'both' depending on if you want ro perform a one tune operation or have files automagically moved/renamed on import. If you had or have multiple import folders then you would mark all your sources of files to be moved as 'source' (or 'both' if they're also a destination import folder) and all import folders you would want as destinations as 'destination' (or 'both' if they're also a source import folder).

Edit: It is 2h faster to ask this in the discord server btw, instead of opening an issue on GH.