Unable to match data from TheTVDB because of release group

Any questions? Need some help?
Post Reply
MrJF
Posts: 2
Joined: 09 Jul 2019, 09:14

Unable to match data from TheTVDB because of release group

Post by MrJF »

Hello everybody,

I have a little issue with Filebot concerning certains files that does not match on TheTVDB due to the release group name being present in the title of the torrent.
To put the context I have a seedbox with rtorrent installed and once a file is downloaded it automatically call the amc script that launch filebot. You can see the code of rtorrent.rc here :

Code: Select all

method.set_key = event.download.finished,filebot,"execute.nothrow={.filebot/scripts-enabled/rtorrent-postprocess.sh,$d.get_base_path=,$d.get_name=,$d.get_custom1=}"
and the rtorrent-postprocess.sh here :

Code: Select all

filebot -script /opt/filebot/scripts/amc.groovy \
    --output "$HOME/media" \
    -non-strict --lang fr --encoding utf8 --log all --log-file amc-rtorrent.log --action hardlink --conflict override \
    --def artwork=false "ut_kind=multi" "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" "ut_label=$TORRENT_LABEL" subtitles=$SUBLANG \
	extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
It work really great most of the time, but sometimes the file downloaded contains the release group name causing matching failure on TheTVDB, here is an example :

Code: Select all

Run script [/opt/filebot/scripts/amc.groovy] at [Mon Jul 08 22:12:21 CEST 2019]
Parameter: artwork = false
Parameter: ut_kind = multi
Parameter: ut_dir = /home27/monsieurjf/files/[Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4
Parameter: ut_title = [Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4
Parameter: ut_label = TV
Parameter: subtitles = fr
Parameter: extractFolder = /home27/monsieurjf/files/_extracted
Parameter: music = y
Parameter: skipExtract = n
Input: /home27/monsieurjf/files/[Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4
Group: [tvs:natsumi no sekai vinland saga] => [[Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4]
Get [French] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /home27/monsieurjf/files/[Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4
Rename episodes using [TheTVDB]
Auto-detected query: [natsumi no sekai vinland saga]
Failed to fetch episode data: [natsumi no sekai vinland saga]
CmdlineException: Failed to match files to episode data
Finished without processing any files
Failure (°_°)
Instead of looking for "Vinland Saga", it looks for "natsumi no sekai vinland saga" ("natsumi no sekai" being the anime group that released this torrent on my private tracker) and fails to match episode data. I would like to remove everything that is under square brackets so the title given to TheTVDB will be more correct.
I've also heard about :
  • --q to force a show title but I'm not sure it applies to my setup because I use this script for multiple shows.
  • --filter "age < 7" but I don't only download recent anime/tv show so it might not work.
Are some of you familiar with this issue ?
Is there any way to remove everything under square brackets using regex for example ?

Thank you for your help,
MrJF.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unable to match data from TheTVDB because of release group

Post by rednoah »

1.
Added to list of known release groups:
viewtopic.php?f=5&t=4


2.
"Vinland Saga" is a new show, so it's not well established and search is more error prone. This will usually resolve itself.


3.
You could pre-rename the files, to make them easier to process, but that would be entirely separate from the amc script:
viewtopic.php?f=3&t=2072

Code: Select all

$ filebot -rename *.mp4 --db file --action TEST --format "{fn.removeAll(/\[.+?\]/)}"
Rename files using [Plain File]
[TEST] from [[Natsumi no Sekai] Vinland Saga - 03 VOSTFR [1080p AAC].mp4] to [Vinland Saga - 03 VOSTFR.mp4]


EDIT:

I did some debugging with this particular example and make a few possible improvements to the code. FileBot r6537 and up should work better.
:idea: Please read the FAQ and How to Request Help.
MrJF
Posts: 2
Joined: 09 Jul 2019, 09:14

Re: Unable to match data from TheTVDB because of release group

Post by MrJF »

Thank you very much for you quick and complete answer !
1. Can anyone add an item to the list or should I make a suggestion to add one ?
2. I also have this issue with another show that is relatively new. I think it is inherent from my use of rtorrent because I have a script that auto-download from a private tracker RSS Feed. So I almost only downlad recent show.
But I guess 3. could work for me. By making a script that take the original file make a hardlink to my media folder, rename it and then search on TheTVDB.
I am not sure if this could work :

Code: Select all

#Hardlink to media 
ln $TORRENT_PATH $HOME/media/$TORRENT_NAME

#Rename without release group name for better match
filebot -rename "$HOME/media/$TORRENT_NAME" --db file --action TEST --format "{fn.removeAll(/\[.+?\]/)}"

#Rename using TheTVDB data
filebot -script /opt/filebot/scripts/amc.groovy \
        --output "$HOME/media" \
        -non-strict --lang fr --encoding utf8 --log all --log-file amc-rtorrent.log \
        --def "ut_kind=multi" "ut_dir=$HOME/media/???" "ut_title=???" "ut_label=$TORRENT_LABEL"\
Is there a way to get the name of the file after the -rename ?

I'm glad my issue could improve furthermore the code, thanks :D
Post Reply