dbr/tvdb_api

Convert absolute number to Season+Episodes

AntonyCilleros opened this issue · 1 comments

Hello

I have a series (Yu Yu Hakusho) named with absolute number like :
"Yu Yu Hakusho - E106 - The Battle of Father and Son.mkv"
and I would like to have it like that :
"Yu Yu Hakusho - S04E12 - The Battle of Father and Son.mkv"

So my issue is that I can't use %(seasonnumber)02d in filename_with_episode_no_season because it returns me this :

Loading config: settings
####################
# Starting tvnamer
# Found 43 episodes
####################
# Processing file: Yu Yu Hakusho - E001 - Surprised to be Dead.mkv
# Detected series: Yu Yu Hakusho (episode: 1)
Traceback (most recent call last):
  File "/home/raytek/.local/bin/tvnamer", line 8, in <module>
    sys.exit(main())
  File "/home/raytek/.local/lib/python3.8/site-packages/tvnamer/main.py", line 474, in main
    tvnamer(paths = sorted(args))
  File "/home/raytek/.local/lib/python3.8/site-packages/tvnamer/main.py", line 370, in tvnamer
    processFile(tvdb_instance, episode)
  File "/home/raytek/.local/lib/python3.8/site-packages/tvnamer/main.py", line 207, in processFile
    newName = episode.generateFilename()
  File "/home/raytek/.local/lib/python3.8/site-packages/tvnamer/utils.py", line 770, in generateFilename
    fname = Config[self.CFG_KEY_WITH_EP] % epdata
KeyError: 'seasonnumber'

Sorry if i missed something !

Sorry wrong repo !!!