RickDB / PlexAniSync

Sync Plex anime library to AniList
GNU General Public License v3.0
292 stars 45 forks source link

Please add support for specials #230

Open Ninelpienel opened 10 months ago

Ninelpienel commented 10 months ago

Hey, I read that you don't want to support specials because various sites have different entries for them, but I have my own order and would like to assign the custom mappings manually myself. Can you add that specials can be activated in the settings and then it's possible to map them as season 0?

ShanaryS commented 10 months ago

I agree with this feature. If it doesn't get implemented there is an easy way to enable it. I'm doing this on docker but if you're running the script directly, just fork the repo and make the changes there and periodically sync the fork.

  1. Download a copy of the custom_mappings_schema.json in the root of the project. In the copy, change the season properties minimum to 0 from 1. This allows reading of season 0 in the custom_mappings.yaml file. Copy it to the docker container: docker cp ./custom_mappings_schema.json plexanisync:/plexanisync
  2. Update the script to get season 0 from plex. You just need to change a sign from > to >= in plexmodule.py. This is very easy to do with sed in the docker container: docker exec -dit plexanisync sh -c "sed -i 's/season.seasonNumber > 0/season.seasonNumber >= 0/g' /plexanisync/plexanisync/plexmodule.py"

Now restart the container and season 0 mappings will work. If you remove the container or the image gets updated, make sure to redo them both.

Tahuwa commented 5 months ago

I've been changing the files to make this work, but it would be really nice if this could be implemented by default

Soitora commented 5 months ago

Maybe require that specials are mapped to an AniList ID as per a single specials episode 4, or episode range 4-6? Instead of using the start feature here