Page 1 of 1
Create a NFO with <tag>
Posted: 15 Nov 2019, 19:33
by syralk
I use Tynrmediamanager in the past and it is able to create nfo with <tag>
just wondering how do I do that with filebot
right now my command line is
Code: Select all
filebot -script fn:artwork.tmdb --filter "n == /$movie_name_year/" --def extras=y "$movie_path"
Re: Create a NFO with <tag>
Posted: 16 Nov 2019, 06:10
by rednoah

The artwork.* scripts don't use the
--filter option, so specifying it has no effect.
Indeed,
<tags> is not generated, and there is no option
(other than modifying the code) to change that:
https://github.com/filebot/scripts/blob ... roovy#L132

What kind of information would
<tags> include? Examples? I'm pretty sure TheTVDB doesn't have any "tags" information in their database records.
Re: Create a NFO with <tag>
Posted: 18 Nov 2019, 17:40
by syralk
I did a script that do exactly what I need
if it can be included in filebot that will be great
the way it work is I do
Code: Select all
filebot -script fn:artwork.tmdb --filter "n == /$movie_name_year/" --def extras=y "$movie_path"
then I run script below
Code: Select all
#!/bin/bash
API_KEY=# insert your TMDB API KEY HERE
PATH_NFO=#insert location of NFO generated by filebot
#------------------------------------------------------------
IMDBID=$(awk -F "[><]" '/<id>/{print $3}' "$PATH_NFO" | awk -F'[ ]' '{print $1}')
JSON_IMDB=($(curl -s "https://api.themoviedb.org/3/find/$IMDBID?api_key=$API_KEY&external_source=imdb_id" | jq -r '.movie_results[] | .id'))
TMDBID="${JSON_IMDB[0]}"
#-----------------------------------------------------------
echo "TMBD: $TMDBID"
JSON_TAG=$(curl -s "https://api.themoviedb.org/3/movie/$TMDBID/keywords?api_key=$API_KEY")
for row in $(echo "${JSON_TAG}" | jq -r '.keywords[] | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1}
}
tag_info="$(_jq '.name')"
sed -i 's/<\/movie>/ <tag>'"$tag_info"'<\/tag>\n&/' "$PATH_NFO"
done
Re: Create a NFO with <tag>
Posted: 18 Nov 2019, 18:43
by rednoah
Can you paste an example nfo file with <tag> values?
Re: Create a NFO with <tag>
Posted: 19 Nov 2019, 12:55
by syralk
for example in the Movie "Shrek 2 (2004)" it will be
Code: Select all
<tag>prison</tag>
<tag>magic</tag>
<tag>liberation</tag>
<tag>honeymoon</tag>
<tag>prince</tag>
<tag>fairy tale</tag>
<tag>parents-in-law</tag>
<tag>donkey</tag>
<tag>kingdom</tag>
<tag>enchantment</tag>
<tag>transformation</tag>
<tag>princess</tag>
<tag>sequel</tag>
<tag>anthropomorphism</tag>
<tag>dragon</tag>
<tag>ogre</tag>
Re: Create a NFO with <tag>
Posted: 19 Nov 2019, 14:25
by rednoah
Alright. I'll add support with the upcoming release.
Re: Create a NFO with <tag>
Posted: 19 Nov 2019, 14:57
by syralk
rednoah wrote: ↑19 Nov 2019, 14:25
Alright. I'll add support with the upcoming release.
Great thanks

let me know what will be the command line when its ready
