Page 1 of 2
[DEPRECATED] support for XEM?
Posted: 16 Jul 2018, 20:45
by howdymilsap
Hi,
I am wondering if support for XEM has been considered (to augment tvdb for example). I have run across several shows that have discrepancies between naming/numbering from the scene and what thetvdb lists. These are always fixable in a manual way, but having it automated would be even better.
many thanks.
-hm
Re: support for XEM?
Posted: 16 Jul 2018, 20:52
by rednoah
1.
What is XEM?
2.
Are you using the amc script? The Advanced File-Tuning section will explain a good solution for making things pretty much error-proof for newly aired episodes.
Re: support for XEM?
Posted: 16 Jul 2018, 21:15
by howdymilsap
XEM is the cross entity map for tv shows.
http://thexem.de/
Basically, discrepancies in tvdb, anidb and the scene are managed here. The episode mismatches for shows like Mythbusters and SNL have already been re-mapped in XEM. Season 43 of SNL is a great example of the issue, where the scene episode numbering is off by 2 compared to tvdb. This is because of how tvdb handled 2 specials that aired this season.
Fixing this is not that difficult, but i have to manually edit the files and change the filename. if we could use XEM, this wouldn't be necessary as someone has already "fixed" this mismatch in the XEM data. Just for clarity, the mismatch is in the scene numbering and what tvdb thinks that episode is. For example, SNL S43E23 is Tina Fey/Nicki Minaj per the scene numbering. SNL S43E23 does not exist in tvdb, S43E21 is the Tina Fey/Nicki Minaj episode in their database.
Lastly, I am using your AMC script (it is fantastic) and am using the advanced file tuning suggestions. This doesn't remedy this particular situation however.
-hm
Re: support for XEM?
Posted: 16 Jul 2018, 21:30
by rednoah
A few examples of original file names that get matched incorrectly by the amc script would be helpful.
Re: support for XEM?
Posted: 16 Jul 2018, 23:32
by howdymilsap
filebot output is not all that useful (in this example) as the file is seemingly properly identified as Saturday Night live S43E21 and filebot using tvdb applies S43E21 metadata.
However, the scene numbering for S43E21 is really the Donald Glover/Childish Gambino episode. the TVDB has this as the Tina Fey/Nicki Minage episode instead.
Here is theTVDB page for this episode
https://www.thetvdb.com/series/saturday ... es/6681723
Here is the official NBC page indicating S43E21 is the Donald Glover episode
https://www.nbc.com/saturday-night-live ... er/3712034
Here is theXEM page showing how it fixes this issue
http://thexem.de/xem/show/4294
Finally, here is the output from when I run filebot:
Code: Select all
Run script [fn:amc] at [Mon Jul 16 23:43:36 CEST 2018]
Parameter: ut_dir = /home/hd1/torrents/data/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta.mkv/.
Parameter: subtitles = en
Parameter: artwork = false
Parameter: extractFolder = /home/hd1/torrents/extracted
Parameter: skipExtract = n
Parameter: ut_label = TV
Parameter: music = y
Parameter: clean = y
Input: /home/hd1/torrents/data/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta.mkv
Group: [tvs:saturday night live] => [Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta.mkv]
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /home/hd1/torrents/data/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Saturday Night Live]
Fetching episode data for [Saturday Night Live]
Fetching episode data for [SNL Poland]
Fetching episode data for [Saturday Night Live (JP)]
Fetching episode data for [Saturday Night Live Korea]
Fetching episode data for [Weekend Update]
[OVERRIDE] Delete [/home/hd1/media/TV Shows/Saturday Night Live/Season 43/Saturday Night Live - S43E21 - Tina Fey Nicki Minaj.mkv]
[COPY] From [/home/hd1/torrents/data/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta/Saturday.Night.Live.S43E21.1080p.HEVC.x265-MeGusta.mkv] to [/home/hd1/media/TV Shows/Saturday Night Live/Season 43/Saturday Night Live - S43E21 - Tina Fey Nicki Minaj.mkv]
Processed 1 files
and here is a screenshot of this episode playing in Plex showing Donald Glover.
https://imgur.com/a/eii2huU
this is a screengrab from inside Plex, showing this episode identified as Tina fey
https://imgur.com/a/NpdUXns
Re: support for XEM?
Posted: 17 Jul 2018, 05:57
by rednoah
Thanks for the logs. I always need the original file paths so I can add them to my test dataset.
Support for XEM won't make it into the upcoming release, but maybe the next.
Re: support for XEM?
Posted: 02 Jan 2019, 09:45
by rednoah
It's on my TODO list, but I'm not quite sure on how to implement this well in a consistent way that fits into how things currently work. It won't be in 4.8.5 but possibly in the next release, especially if if there's lots of demand for this particular feature.
Re: support for XEM?
Posted: 03 Feb 2019, 17:31
by rednoah
I usually ask people to include file paths when reporting mismatches, so that should give some indication what kind of files are troublesome and if XEM could be a solution for those.
Re: support for XEM?
Posted: 22 Mar 2019, 15:21
by devster
+1 for this feature
American Dad is an example:
Code: Select all
$ filebot -rename --action test American\ Dad\ -\ 108\ Bullocks\ to\ Stan.mkv --format '{plex}' --q 'American Dad' --filter 's == 1' --db TheTVDB
Rename episodes using [TheTVDB]
Fetching episode data for [American Dad!]
Apply filter [s == 1] on [263] items
Include [American Dad! - 1x01 - Pilot]
Include [American Dad! - 1x02 - Threat Levels]
Include [American Dad! - 1x03 - Stan Knows Best]
Include [American Dad! - 1x04 - Francine's Flashback]
Include [American Dad! - 1x05 - Roger Codger]
Include [American Dad! - 1x06 - Homeland Insecurity]
Include [American Dad! - 1x07 - Deacon Stan, Jesus Man]
Failed to match files to episode data
Failure (°_°)
Scene releases include all episodes up to 23 in the first season, TVDB splits first and second season in 7 episodes and the rest. XEN contains the mapping from scene to TVDB
http://thexem.de/xem/show/4606
Re: support for XEM?
Posted: 30 Apr 2019, 08:57
by crawfs
Adding my +1 to this, I found out only today that sonarr uses thexem to map anime from anidb to their TVDB counterpart which I think would be a wonderful feature for filebot.
Re: support for XEM?
Posted: 30 Apr 2019, 09:55
by rednoah
crawfs wrote: 30 Apr 2019, 08:57
Adding my +1 to this, I found out only today that sonarr uses thexem to map anime from anidb to their TVDB counterpart which I think would be a wonderful feature for filebot.
Please post the original file name, and the desired file name, so I can add that to my test data.
Re: support for XEM?
Posted: 30 Apr 2019, 11:38
by crawfs
So I think a good example of what I'm talking about is a series like Monogatari:
https://www.thetvdb.com/series/monogatari/seasons/all
Where season 1 is known as Bakemonogatari, season 2 is Nisemonogatari etc, each season that is listed in TVDB is actually a completely seperate series so if you want the series named according TVDB metadata AMC just doens't really know what to do with a file called Bakemonogatari 01.mkv or Nisemonogatari 01.mkv (Monogatari S01E01 and S02E01 respectively).
Cross referencing anime on AniDB with thexem entries should help to solve that problem to rename the file to match TVDB metadata.
Have I effectively answered your request? When I made that comment I didn't have anything in mind in particular just the fact that aniDB and tvdb entries vary wildly and anime releases are more commonly named in such a way that makes matching to anidb more consistent than matching to TVDB.
Re: support for XEM?
Posted: 30 Apr 2019, 12:59
by rednoah
Alright, we wanna rename this:
to this:
By first matching to AniDB as per usual, and then using XEM to find the corresponding TheTVDB entry.
Re: support for XEM?
Posted: 30 Apr 2019, 22:50
by crawfs
Yeah pretty much
Re: support for XEM?
Posted: 01 May 2019, 04:40
by rednoah
I'd like to also appropriate this thread for possible solution.
* How would XEM support look like on the CLI?
* How would it look like in the GUI?
Re: support for XEM?
Posted: 01 May 2019, 11:21
by devster
At first glance XEM doesn't seem to qualify as standalone DB as it links between them mainly:
- provide mapping between scene releases and databases
- provide source of truth between database for same show with different names according to season
- provide mapping between AniDB order and TheTVDB order
- provide name mapping between different shows
XEN allows specifying both a source and a destination, so the double colon notation could be used like this
AniDB::XEN::TheTVDB.
This could potentially solve point 2, 3 but likely not 1 and 4.
For number 4 the above notation would be used like AniDB::XEN to specify that the matching process should query XEN for all available names before renaming, however the response doesn't seem to return a preferred name or be filterable by show (it returns all names in the XEN database).
Still no ideas about point 1 which is the fundamental one (mapping a single file to a specific episode or multiple episodes).
Re: support for XEM?
Posted: 01 May 2019, 18:56
by kim
American Dad!
http://thexem.de/xem/show/4606
Update? =
2012-03-26 20:47:14 UTC / 2019-02-18 03:47:19 UTC
if so and not updated the day a new episode comes out it's USELESS
But I made this so maybe you can use it:
Code: Select all
{
def currentSeason = 16
def currentEpisode = 4
def tvdbSeason, tvdbEpisode
def id = 73141
def show = 'American Dad!'
def slurper = new groovy.json.JsonSlurper()
def url = "http://thexem.de/map/all?id=$id&origin=tvdb"
def data = any{slurper.parseText( new URL( url ).text ).data
.find{ (it.scene.season == currentSeason && it.scene.episode == currentEpisode) || (it.tvdb.season == currentSeason && it.tvdb.episode == currentEpisode)}
.collectEntries{println it; [ (it.key) : [ 'season' : it.getValue().season, 'episode' : it.getValue().episode ] ] }}{}
any{"$show - (TVDb - Season ${data.tvdb.season.pad(2)} Episode ${data.tvdb.episode.pad(2)}) vs (Scene - Season ${data.scene.season.pad(2)} Episode ${data.scene.episode.pad(2)})"}{'Wrong info'}
}
Output:
American Dad! - (TVDb - Season 16 Episode 04) vs (Scene - Season 15 Episode 04)
FYI: when scaped from tvdb just replace the first part to:
Code: Select all
def currentSeason = s
def currentEpisode = e
def tvdbSeason, tvdbEpisode
def id = id
def show = n
Re: support for XEM?
Posted: 01 May 2019, 19:50
by kim
Anime
you can do a lookup for "alias" e.g. Nisemonogatari
http://thexem.de/map/allNames?origin=anidb
and then
http://thexem.de/map/all?id=6327&origin=anidb
Saturday Night Live
http://thexem.de/xem/show/4294
it only has season 43 ? USELESS
Re: support for XEM?
Posted: 02 May 2019, 03:11
by rednoah
1.
My idea is a new
xem.[AniDB, TheTVDB, Scene, ...] binding, so that we can map the output via xem for naming, but use the original value for matching.
2.
Additionally, a new
--xem option that'll let you re-map each original to a new episode, or multi-episode, or nothing at all, before matching, via Groovy code and existing bindings of course:
e.g. map to itself, and effectively do nothing
e.g. allow arbitrary Groovy code to come up with new Episode objects:
Code: Select all
--xem "new Episode(/Name/, 1, 1, /Title/)"
e.g. make the standard use case easy:
3.
A use case for matching with scene, but renaming with original TheTVDB data, might then look like this:
Code: Select all
--xem "xem.scene" --format "{xem.thetvdb.plex}"
Or just this, depending on whatever we decide to pass the xem'ed episodes on to the formatter, or really just use them for matching, but reverse-map them to the original Episode object before formatting:
Code: Select all
--xem "xem.scene" --format "{plex}"
Re: support for XEM?
Posted: 04 May 2019, 01:47
by crawfs
Is your posted example solution relying on thexem for matching in that case? That is to say if in your example the show you're matching to doesn't have an entry in thexem will it fail? Or will it fallback to TVDB/aniDB?
Because thexem only does mappings for shows where actually required so it won't be a complete catalogue like TVDB for example.
Just making sure you are aware of that aspect.
Re: support for XEM?
Posted: 04 May 2019, 03:47
by rednoah
I assume the implementation of {xem} would just return the original episode object if it can't be mapped to a new one.
Re: support for XEM?
Posted: 04 May 2019, 07:01
by crawfs
Yeah that sounds pretty much ideal.
Re: support for XEM?
Posted: 06 May 2019, 12:40
by rednoah
How would I match
Owarimonogatari (2017) - 01 to
Monogatari - S05E01 using the available API methods?
I only get back numbers. But I also need to somehow match AniDB ID to TheTVDB ID / SEASON.
e.g.
http://thexem.de/map/all?id=13033&origin=anidb
http://thexem.de/map/single?id=13033&or ... absolute=1
How do I know which "Episode 1" belongs to series AniDB::13033 since I'm not sure how to make sense of the numbers.
Re: support for XEM?
Posted: 06 May 2019, 14:58
by devster
Also the results seem wrong, ID 13033 absolute 01 should return tvdb season 5 episode 1 and 2, absolute 62 and 63
Re: support for XEM?
Posted: 06 May 2019, 15:20
by rednoah
Yep, that's what I'm thinking. Just double checking with you guys.
Re: support for XEM?
Posted: 09 May 2019, 12:37
by crawfs
Unfortunately I don't know the answer to that, not much of a programmer myself...
It might be worth taking a look at sonarr by eithertaking a look at their source code or hang around their discord and figure out how sonarr handles it as that project is how I first learned that this is possible.
Re: support for XEM?
Posted: 26 May 2019, 10:58
by devster
Found a possible solution:
http://thexem.de/map/allNames?origin=tv ... ultNames=1
the above link should return the entire list of shows but in a specific format.
The ID is still the basic one, corresponding to the default name (so for Monogatari/AniDB is 6327) however associated to that name there is an array of string and objects which map the default name (the string) and all alternative name to a season number (they correspond to the query strings above, default name can be skipped).
EDIT: I forgot to mention that -1 exists as a season and represents an alias of the default name.
Code: Select all
"6327": [
"Monogatari",
{
"Bakemonogatari": 1
},
{
"Nisemonogatari": 2
},
{
"Monogatari Series Second Season": 3
},
{
"Owarimonogatari": 4
},
{
"Owarimonogatari S2": 5
},
{
"Owarimonogatari Second Season": 5
}
]
So, in theory, Owarimonogatari S2 can be mapped to S5.
Requesting
http://thexem.de/map/all?id=13033&origi ... ation=tvdb and filtering for season 5 should then yield the correct corresponding episodes (or multiple episodes separated by _2, _3 and so on).
By the way, thexem.de already caches responses so it may be useful to reduce the default cache time for these requests.
Final useful method is
http://thexem.de/map/havemap?origin=tvdb which should return every ID which has a mapping associated.
A possible flow could be matching against AniDB as usual, with the resulting
name, not ID, search for correspondence in TheXEM, replace series name with "default" found and add season info, alternatively use absolute numbering from theTVDB, there is also a "master" category but I haven't seen it represented.
Re: support for XEM?
Posted: 27 May 2019, 09:07
by rednoah
FileBot r6419 now supports the
--mapper <expression> option.

Note that nothing specifically related to TheXEM is implemented at this point.
(i.e. fairly useless unless you're fairly comfortable with writing Groovy code)
e.g. identity mapper:
e.g. constant mapper:
Code: Select all
--mapper "new net.filebot.web.Episode(/Series Name/, 1, 1, /Episode Title/)"
e.g. arbitrary custom mapper that you have written yourself:
Re: support for XEM?
Posted: 27 May 2019, 09:20
by devster
Where can I find more info on how it's supposed to work?
For example, does mapper accept a class? Does it need to implement any specific methods?
What would be the flow for a custom mapper?
Please forgive the barrage, I believe it could be helpful for users.
Re: support for XEM?
Posted: 27 May 2019, 09:42
by rednoah
--mapper works exactly the same as
--filter, except where
--filter is expected to return type Boolean objects,
--filter is expected to return type
Episode objects.
* All the usual bindings, such as
episode,
n,
s,
e,
t and friends work exactly the same way as in format / filter / exec expressions.
* The mapper is applied to each Episode object
(unless it has already been excluded by the filter) then all the new Episode objects generated by your mapper are passed on to matching as usual.
* Just run with the useless examples from my last post, and then the console log will show you what's happening.
EDIT:
Here's another cute example:
Code: Select all
filebot -list --q "Firefly" --mapper "[seriesName: ny, season: s + 1, episode: e, title: /Episode / + absolute]"
Code: Select all
Firefly (2002) - 2x01 - Episode 2
Firefly (2002) - 2x02 - Episode 3
Firefly (2002) - 2x03 - Episode 6
Firefly (2002) - 2x04 - Episode 7
Firefly (2002) - 2x05 - Episode 8
...
* Add year to series name
* Add +1 to season number
* Replace episode title with absolute number
Re: support for XEM?
Posted: 27 May 2019, 11:20
by devster
Perfect, thanks, will play with it and see what happens.
However, trying to think about XEM, I'm not finding fields in the Episode class that refer to databases though, so, for example, if I changed season/episode but also mapped the season to another database entirely (AniDB > TheTVDB) the ID wouldn't match anymore (13033 becomes 102261 which is missing in AniDB).
Unless I misunderstood the "new Episode objects generated by your mapper are passed on to matching as usual". Is matching against the DB done before or after?
Re: support for XEM?
Posted: 27 May 2019, 12:01
by rednoah
1. Retrieve episode objects from database
2. (Optional) Map episode objects to other episode objects
3. Match episode objects with file objects
4. Format matches
The episode objects you get as input are typically more complex than just
[seriesName, season, episode, title] and so it might make sense to just copy over into the new Episode object all the fields you don't want to modify:
Code: Select all
Episode(String seriesName, Integer season, Integer episode, String title, Integer absolute, Integer special, SimpleDate airdate, Integer id, SeriesInfo seriesInfo)
https://www.filebot.net/docs/api/net/fi ... isode.html
{d} requires episode airdate,
{order} requires series id, etc, etc, etc. Depending on what information you keep, remove or change in the Episode object effects behavior later on.
Re: support for XEM?
Posted: 27 May 2019, 16:14
by devster
Got it now, I hope, thanks again for the explanation.
Re: support for XEM?
Posted: 27 May 2019, 22:41
by devster
It's extremely rough and untested but it seems to work (barely):
Code: Select all
// test with filebot -list --q "Monogatari" --db AniDB --mapper xem.groovy
import groovy.json.JsonSlurper
String origin = anime ? "anidb" : "tvdb"
Integer seas
if (anime) {
seas = 1
} else {
seas = s
}
def spec = call{special}
def ep = call{e}
def baseURL = new URL("http://thexem.de")
def reqHeaders = [:]
def params = [
"origin": origin
]
def query = params.collect { k, v -> "$k=$v" }.join('&')
def getResponse = new URL(baseURL, "/map/havemap?$query").get(reqHeaders)
String stringID = id.toString()
Map json = new JsonSlurper().parseText(getResponse.text)
def item = json.data.any{ it == stringID }
if (item) {
def paramsName = [
"origin": origin,
"id": id,
"defaultNames": 1,
]
def queryName = paramsName.collect { k, v -> "$k=$v" }.join('&')
def getResName = new URL(baseURL, "/map/names?$queryName").get(reqHeaders)
Map jsonName = new JsonSlurper().parseText(getResName.text)
def mat = jsonName.data.collect{
if (it.value instanceof Map) {
def name = it.value.entrySet().value
[(it.key): name.flatten()]
} else if (it.value instanceof String) {
[(it.key): it.value]
}
}
String newN = mat.findAll{ it.all }?.all.first()
Integer foundS = mat.findAll{
it.entrySet().value.any{ v -> v =~ /(?i)$n/ }
}.first().entrySet().key.first().toInteger()
Integer newS = (foundS < 0) ? seas : foundS
def paramsMap = [
"origin": origin,
"id": id,
"season": newS,
"episode": ep,
]
def queryMap = paramsMap.collect { k, v -> "$k=$v" }.join('&')
def getResponseMap = new URL(baseURL, "/map/single?$queryMap").get(reqHeaders)
Map jsonMap = new JsonSlurper().parseText(getResponseMap.text)
// assuming tvdb destination, could be included in the query
def result = jsonMap.data.entrySet().findAll{ it.key.matches(/tvdb.*/) }
if (result.size() < 2) {
return new net.filebot.web.Episode(newN, newS, result.first().value.episode, t, result.first().value.absolute, spec, d, id, series)
} else {
def multi = []
for ( i in 0..result.size()-1 ) {
multi << new net.filebot.web.Episode(newN, newS, result[i].value.episode, t, result[i].value.absolute, spec, d, id, series)
}
return new net.filebot.web.MultiEpisode(*multi)
}
}
// hopefully return the episode untouched if not matched
return new net.filebot.web.Episode(n, seas, ep, t, absolute, spec, d, id, series)
Hopefully all multi-episodes are just multi-part because I couldn't find a way to merge titles.
I'm no groovy dev so forgive my horrible code.
Re: support for XEM?
Posted: 28 May 2019, 04:57
by rednoah
Wow! Impressive! I'd have added the
--mapper option much sooner
(that part was easy) if I had known you'd do all the heavy lifting afterwards!
I'll play with it as well next week, and see what I can add into the core to make this a built-in feature in upcoming releases.
EDIT:
And so the student has become the master! I had no idea you can use the spread operator to spread an array into a method as arguments!
Code: Select all
def x = [1, 2, 3]
def f = { a, b, c -> a * b * c }
f(*x)
EDIT 2:
I'd add a bit of caching as well, like so:
Code: Select all
def cache = Cache.getCache('xem', CacheType.Daily)
def url = 'https://www.filebot.net/update.xml'
def content = cache.text(url, String.&toURL).get()
println content
Re: support for XEM?
Posted: 28 May 2019, 07:17
by devster
Will try, thanks.
I just noticed my script seems to halt after the first result in the -list (e.g. for Firefly it prints only the first item).
Not sure what's happening.
Re: support for XEM?
Posted: 28 May 2019, 07:24
by rednoah
Can you paste your command so I can try and see what's going on?
Re: support for XEM?
Posted: 28 May 2019, 08:00
by devster
Code: Select all
# this returns only the first 2 episodes despite XEM having 3 mappings, but it's an issue with AniDB only reporting the first 2 as regular episodes and the third as special.
# they also join titles on their own, so that shouldn't be a byproduct of the MultiEpisode object
filebot -list --q "Owarimonogatari Second Season" --db AniDB --mapper xem.groovy
# this should return episodes unchanged
filebot -list --q "Firefly" --db TheTVDB --mapper xem.groovy
Re: support for XEM?
Posted: 28 May 2019, 08:20
by rednoah
I see, since the mapper will automatically get rid of duplicates for you, and since you're using the series id as episode id, you end up with only one episode object per series id:
Code: Select all
filebot -list --q "Owarimonogatari Second Season" --db AniDB --format "{id} | {episode.id}"

Try using
episode.id instead of
id when creating episode objects.
e.g. tail tail xem.groovy
Code: Select all
if (result.size() < 2) {
return new net.filebot.web.Episode(newN, newS, result.first().value.episode, t, result.first().value.absolute, spec, d, episode.id, series)
} else {
def multi = []
for ( i in 0..result.size()-1 ) {
multi << new net.filebot.web.Episode(newN, newS, result[i].value.episode, t, result[i].value.absolute, spec, d, episode.id, series)
}
return new net.filebot.web.MultiEpisode(*multi)
}
}
// hopefully return the episode untouched if not matched
return episode
Re: support for XEM?
Posted: 28 May 2019, 18:13
by devster
Code: Select all
// test with filebot -list --q "Monogatari" --db AniDB --mapper xem.groovy
import groovy.json.JsonSlurper
import net.filebot.Cache
import net.filebot.CacheType
Closure<Object> request = { Map headers = [:], String base = "http://thexem.de", String path, Map params ->
Cache cache = net.filebot.Cache.getCache('xem', CacheType.Daily)
URL baseURL = new URL(base)
String query = params.collect { k, v -> "$k=$v" }.join('&')
Object response = new URL(baseURL, "$path?$query").get(headers)
response
// TODO: daily caching
// def content = cache.text(url, String.&toURL).get()
}
String origin = anime ? "anidb" : "tvdb"
Integer seas = anime ? 1 : episode?.season
Object hasMap = request("/map/havemap", ["origin": origin])
Map jHasMap = new JsonSlurper().parseText(hasMap.text)
Boolean item = jHasMap.data.any{ it == id.toString() }
if (item) {
Object names = request("/map/names", [
"origin": origin,
"id": id,
"defaultNames": 1,
])
Map jName = new JsonSlurper().parseText(names.text)
ArrayList reflect = jName.data.collect{
if (it.value instanceof Map) {
def name = it.value.entrySet().value
[(it.key): name.flatten()]
} else if (it.value instanceof String) {
[(it.key): it.value]
}
}
// String newN = reflect.findAll{ it instanceof String }.first()
String newN = reflect.findAll{ it.all }?.all.first()
Integer foundS = reflect.findAll{
it.entrySet().value.any{ v -> v =~ /(?i)$episode.seriesName/ }
}.first().entrySet().key.first().toInteger()
// Integer foundS = item.findAll{ it instanceof Map }*.find{ k, v -> k.match(/$n/) }.find{ it != null }?.value
Integer newS = (foundS < 0) ? seas : foundS
Map old = [
ep: episode.episode ? episode.episode : episode.special,
se: episode.special ? 0 : newS,
]
// assuming TVDB destination, could be included in the query
Object mapping = request("/map/single", [
"origin": origin,
"id": id,
"season": old.se,
"episode": old.ep,
])
Map jMapping = new JsonSlurper().parseText(mapping.text)
// also assuming TVDB destination
if (jMapping.data.isEmpty()) {
return episode
}
def result = jMapping.data.entrySet().findAll{ it.key.matches(/tvdb.*/) }
if (result.size() < 2) {
return new net.filebot.web.Episode(newN, newS, result.first().value.episode, episode?.title, result.first().value.absolute, episode?.special, episode?.airdate, episode.id, series)
} else {
def multi = []
for ( i in 0..result.size()-1 ) {
// hopefully all multi-episodes are just multi-part because I couldn't find a way to merge titles
multi << new net.filebot.web.Episode(newN, newS, result[i].value.episode, episode?.title, result[i].value.absolute, episode?.special, episode?.airdate, episode.id, series)
}
return new net.filebot.web.MultiEpisode(*multi)
}
}
// hopefully return the episode untouched if not matched
return episode
update, should work a bit better.
Re: support for XEM?
Posted: 01 Jun 2019, 10:46
by rednoah
I've added the
{xem} binding so you can now do this:
Code: Select all
filebot -list --q "Monogatari" --db AniDB --mapper XEM.TheTVDB

It should work exactly the same as the Groovy version written by devster so his Groovy implementation is probably more useful for debugging.

How well does it work different series and corner cases? No idea. Fairly untested.
Re: support for XEM?
Posted: 02 Jun 2019, 18:17
by kim
How do I get this working ?
rednoah wrote: 28 May 2019, 04:57
I'd add a bit of caching as well, like so:
Code: Select all
def cache = Cache.getCache('xem', CacheType.Daily)
def url = 'https://www.filebot.net/update.xml'
def content = cache.text(url, String.&toURL).get()
println content
Error:
Expression yields empty value: No signature of method: java.lang.String.toURL() is applicable for argument types: (String) values: [
https://www.filebot.net/update.xml]
Possible solutions: toURL(), toURL(), toURI(), toURI(), toSet(), toFile(java.lang.String)
Re: support for XEM?
Posted: 03 Jun 2019, 03:24
by rednoah
How are you using this code?
I think I only tested this in the Groovy Pad script. Does it not work out if used inside a format?
EDIT:
This should work better:
Code: Select all
def cache = Cache.getCache('xem', CacheType.Daily)
def url = 'https://www.filebot.net/update.xml'
def content = cache.text(url, { new URL(it) }).get()
println content
Re: support for XEM?
Posted: 04 Jun 2019, 06:14
by crawfs
will --mapper work for AMC scripts? Or will it throw an error if it doesn't find a matching xem entry for an item it's trying to match?
Re: support for XEM?
Posted: 04 Jun 2019, 09:39
by rednoah
Untested. Should work though.
What happens if there is no match is entirely up to your --mapper code.
The xem binding will either translate to xem mappings, or keep the episode object as is.
Re: support for XEM?
Posted: 07 Jun 2019, 21:56
by rednoah
I'm also looking into support for
Anime Lists for mapping information:
https://github.com/ScudLee/anime-lists
e.g.
Code: Select all
filebot -list --q 14444 --db AniDB --mapper "AnimeLists.TheTVDB"
Apply mapper [AnimeLists.TheTVDB] on [10] items
Map [Attack on Titan Season 3 (2019) - 01 - The Town Where Everything Began] to [Attack on Titan Season 3 (2019) - 3x13 - The Town Where Everything Began]
Map [Attack on Titan Season 3 (2019) - 02 - Thunder Spears] to [Attack on Titan Season 3 (2019) - 3x14 - Thunder Spears]
Map [Attack on Titan Season 3 (2019) - 03 - Descent] to [Attack on Titan Season 3 (2019) - 3x15 - Descent]
Map [Attack on Titan Season 3 (2019) - 04 - Perfect Game] to [Attack on Titan Season 3 (2019) - 3x16 - Perfect Game]
Map [Attack on Titan Season 3 (2019) - 05 - Hero] to [Attack on Titan Season 3 (2019) - 3x17 - Hero]
Map [Attack on Titan Season 3 (2019) - 06 - Midnight Sun] to [Attack on Titan Season 3 (2019) - 3x18 - Midnight Sun]
Map [Attack on Titan Season 3 (2019) - 07 - The Basement] to [Attack on Titan Season 3 (2019) - 3x19 - The Basement]
Map [Attack on Titan Season 3 (2019) - 08 - Episode 8] to [Attack on Titan Season 3 (2019) - 3x20 - Episode 8]
Map [Attack on Titan Season 3 (2019) - 09 - Episode 9] to [Attack on Titan Season 3 (2019) - 3x21 - Episode 9]
Map [Attack on Titan Season 3 (2019) - 10 - Episode 10] to [Attack on Titan Season 3 (2019) - 3x22 - Episode 10]
Attack on Titan Season 3 (2019) - 3x13 - The Town Where Everything Began
Attack on Titan Season 3 (2019) - 3x14 - Thunder Spears
Attack on Titan Season 3 (2019) - 3x15 - Descent
Attack on Titan Season 3 (2019) - 3x16 - Perfect Game
Attack on Titan Season 3 (2019) - 3x17 - Hero
Attack on Titan Season 3 (2019) - 3x18 - Midnight Sun
Attack on Titan Season 3 (2019) - 3x19 - The Basement
Attack on Titan Season 3 (2019) - 3x20 - Episode 8
Attack on Titan Season 3 (2019) - 3x21 - Episode 9
Attack on Titan Season 3 (2019) - 3x22 - Episode 10
Re: support for XEM?
Posted: 09 Jun 2019, 19:27
by kim
rednoah wrote: 03 Jun 2019, 03:24
This should work better:
Code: Select all
def cache = Cache.getCache('xem', CacheType.Daily)
def url = 'https://www.filebot.net/update.xml'
def content = cache.text(url, { new URL(it) }).get()
println content
thx
how do I read/load an already written file into filebot ?
and also the, when will it expire and the other properties ?
Re: support for XEM?
Posted: 09 Jun 2019, 19:33
by rednoah
kim wrote: 09 Jun 2019, 19:27
how do I read/load an already written file into filebot ?
The code above will either do a network request to get the data, or read the data from local disk cache. It's all handled implicitly if you use it like in the example above. Your code doesn't know or care if the data came from cache or via web request.
kim wrote: 09 Jun 2019, 19:27
and also the, when will it expire and the other properties ?
If you use the code above, then it'll get cached for about a day. If you tell me what expiration times or properties you're looking for, then I can give you examples.
Re: support for XEM?
Posted: 09 Jun 2019, 19:42
by rednoah
FileBot r6486 now supports both
AnimeLists and
XEM to map between AniDB and TheTVDB.
AnimeLists mappings are now used implicitly used when using season bindings like
{s} {sxe} and
{s00e00} on Anime-type Episode objects.
Re: support for XEM?
Posted: 09 Jun 2019, 19:42
by kim
but you can't use this code to read e.g. data_0.*
I'm writing a IMDb scraper, here is data from cache file:
index:
Code: Select all
"¬í t Top250Moviessr 7net.sf.ehcache.store.disk.DiskStorageFactory$DiskMarkerþ-U\†å J expiryJ hitCountJ positionI sizeL keyt Ljava/lang/Object;xp kw æÐ ¤¼q ~ "
data:
Code: Select all
¬í sr net.sf.ehcache.Element>é_” Z cacheDefaultLifespanJ hitCountJ idJ lastUpdateTimeI
timeToIdleI
timeToLiveJ versionL keyt Ljava/lang/Object;L valueq
so how do i read the expiry, hitCount...
Re: support for XEM?
Posted: 09 Jun 2019, 20:28
by rednoah
IDK. I don't seem to need detailed statistics that that. However, the FileBot Cache API is build on top of ehcache 2.10.6 so you could use those APIs directly if you need fine-grained caching.
Re: support for XEM?
Posted: 09 Jun 2019, 20:32
by rednoah
e.g. Using
--mapper for matching and reverse-mapping via
--format and
{order} binding:
Code: Select all
filebot -list --db AniDB --q "Monogatari Series: Second Season" --order Absolute --mapper AnimeLists.TheTVDB --format "{episode} || {order.absolute.episode}"
Code: Select all
Monogatari Series Second Season - 3x01 - Tsubasa Tiger, Part 1 || Monogatari Series Second Season - 01 - Tsubasa Tiger, Part 1
Monogatari Series Second Season - 3x02 - Tsubasa Tiger, Part 2 || Monogatari Series Second Season - 02 - Tsubasa Tiger, Part 2
Monogatari Series Second Season - 3x03 - Tsubasa Tiger, Part 3 || Monogatari Series Second Season - 03 - Tsubasa Tiger, Part 3
Monogatari Series Second Season - 3x04 - Tsubasa Tiger, Part 4 || Monogatari Series Second Season - 04 - Tsubasa Tiger, Part 4
Monogatari Series Second Season - 3x05 - Tsubasa Tiger, Part 5 || Monogatari Series Second Season - 05 - Tsubasa Tiger, Part 5
Monogatari Series Second Season - Special 7 - Summary 1 || Monogatari Series Second Season - 06 - Summary 1
Monogatari Series Second Season - 3x06 - Mayoi Jiangshi, Part 1 || Monogatari Series Second Season - 07 - Mayoi Jiangshi, Part 1
Monogatari Series Second Season - 3x07 - Mayoi Jiangshi, Part 2 || Monogatari Series Second Season - 08 - Mayoi Jiangshi, Part 2
Monogatari Series Second Season - 3x08 - Mayoi Jiangshi, Part 3 || Monogatari Series Second Season - 09 - Mayoi Jiangshi, Part 3
Monogatari Series Second Season - 3x09 - Mayoi Jiangshi, Part 4 || Monogatari Series Second Season - 10 - Mayoi Jiangshi, Part 4
Monogatari Series Second Season - Special 8 - Summary 2 || Monogatari Series Second Season - 11 - Summary 2
Monogatari Series Second Season - 3x10 - Nadeko Medusa, Part 1 || Monogatari Series Second Season - 12 - Nadeko Medusa, Part 1
Monogatari Series Second Season - 3x11 - Nadeko Medusa, Part 2 || Monogatari Series Second Season - 13 - Nadeko Medusa, Part 2
Monogatari Series Second Season - 3x12 - Nadeko Medusa, Part 3 || Monogatari Series Second Season - 14 - Nadeko Medusa, Part 3
Monogatari Series Second Season - 3x13 - Nadeko Medusa, Part 4 || Monogatari Series Second Season - 15 - Nadeko Medusa, Part 4
Monogatari Series Second Season - Special 9 - Summary 3 || Monogatari Series Second Season - 16 - Summary 3
Monogatari Series Second Season - 3x14 - Shinobu Time, Part 1 || Monogatari Series Second Season - 17 - Shinobu Time, Part 1
Monogatari Series Second Season - 3x15 - Shinobu Time, Part 2 || Monogatari Series Second Season - 18 - Shinobu Time, Part 2
Monogatari Series Second Season - 3x16 - Shinobu Time, Part 3 || Monogatari Series Second Season - 19 - Shinobu Time, Part 3
Monogatari Series Second Season - 3x17 - Shinobu Time, Part 4 || Monogatari Series Second Season - 20 - Shinobu Time, Part 4
Monogatari Series Second Season - 3x18 - Hitagi End, Part 1 || Monogatari Series Second Season - 21 - Hitagi End, Part 1
Monogatari Series Second Season - 3x19 - Hitagi End, Part 2 || Monogatari Series Second Season - 22 - Hitagi End, Part 2
Monogatari Series Second Season - 3x20 - Hitagi End, Part 3 || Monogatari Series Second Season - 23 - Hitagi End, Part 3
Monogatari Series Second Season - 3x21 - Hitagi End, Part 4 || Monogatari Series Second Season - 24 - Hitagi End, Part 4
Monogatari Series Second Season - 3x22 - Hitagi End, Part 5 || Monogatari Series Second Season - 25 - Hitagi End, Part 5
Monogatari Series Second Season - 3x23 - Hitagi End, Part 6 || Monogatari Series Second Season - 26 - Hitagi End, Part 6
Monogatari Series Second Season - Special 1 - Koyomi History || Monogatari Series Second Season - Special 1 - Koyomi History
Re: support for XEM?
Posted: 09 Jun 2019, 21:07
by rednoah
e.g. same thing, but in reverse:
Code: Select all
filebot -list --db TheTVDB --q "Monogatari" --order Airdate --mapper AnimeLists.AniDB --format "{episode} || {seasonize.episode}" --filter "s == 3" --log OFF
Code: Select all
Monogatari Series: Second Season - 01 - Tsubasa Tiger - Part 1 || Monogatari - 3x01 - Tsubasa Tiger - Part 1
Monogatari Series: Second Season - 02 - Tsubasa Tiger - Part 2 || Monogatari - 3x02 - Tsubasa Tiger - Part 2
Monogatari Series: Second Season - 03 - Tsubasa Tiger - Part 3 || Monogatari - 3x03 - Tsubasa Tiger - Part 3
Monogatari Series: Second Season - 04 - Tsubasa Tiger - Part 4 || Monogatari - 3x04 - Tsubasa Tiger - Part 4
Monogatari Series: Second Season - 05 - Tsubasa Tiger - Part 5 || Monogatari - 3x05 - Tsubasa Tiger - Part 5
Monogatari Series: Second Season - 07 - Mayoi Jiangshi - Part 1 || Monogatari - 3x06 - Mayoi Jiangshi - Part 1
Monogatari Series: Second Season - 08 - Mayoi Jiangshi - Part 2 || Monogatari - 3x07 - Mayoi Jiangshi - Part 2
Monogatari Series: Second Season - 09 - Mayoi Jiangshi - Part 3 || Monogatari - 3x08 - Mayoi Jiangshi - Part 3
Monogatari Series: Second Season - 10 - Mayoi Jiangshi - Part 4 || Monogatari - 3x09 - Mayoi Jiangshi - Part 4
Monogatari Series: Second Season - 12 - Nadeko Medusa - Part 1 || Monogatari - 3x10 - Nadeko Medusa - Part 1
Monogatari Series: Second Season - 13 - Nadeko Medusa - Part 2 || Monogatari - 3x11 - Nadeko Medusa - Part 2
Monogatari Series: Second Season - 14 - Nadeko Medusa - Part 3 || Monogatari - 3x12 - Nadeko Medusa - Part 3
Monogatari Series: Second Season - 15 - Nadeko Medusa - Part 4 || Monogatari - 3x13 - Nadeko Medusa - Part 4
Monogatari Series: Second Season - 17 - Shinobu Time - Part 1 || Monogatari - 3x14 - Shinobu Time - Part 1
Monogatari Series: Second Season - 18 - Shinobu Time - Part 2 || Monogatari - 3x15 - Shinobu Time - Part 2
Monogatari Series: Second Season - 19 - Shinobu Time - Part 3 || Monogatari - 3x16 - Shinobu Time - Part 3
Monogatari Series: Second Season - 20 - Shinobu Time - Part 4 || Monogatari - 3x17 - Shinobu Time - Part 4
Monogatari Series: Second Season - 21 - Hitagi End - Part 1 || Monogatari - 3x18 - Hitagi End - Part 1
Monogatari Series: Second Season - 22 - Hitagi End - Part 2 || Monogatari - 3x19 - Hitagi End - Part 2
Monogatari Series: Second Season - 23 - Hitagi End - Part 3 || Monogatari - 3x20 - Hitagi End - Part 3
Monogatari Series: Second Season - 24 - Hitagi End - Part 4 || Monogatari - 3x21 - Hitagi End - Part 4
Monogatari Series: Second Season - 25 - Hitagi End - Part 5 || Monogatari - 3x22 - Hitagi End - Part 5
Monogatari Series: Second Season - 26 - Hitagi End - Part 6 || Monogatari - 3x23 - Hitagi End - Part 6
Re: support for XEM?
Posted: 10 Jun 2019, 06:16
by rednoah

Playing around with it. Does it make sense to keep the mapped value for formatting? Or would it make more sense to use the mapped value only for matching, but always unmap to the original Episode values before formatting?
Re: support for XEM?
Posted: 10 Jun 2019, 10:11
by devster
Sorry, I don't understand to which mapped value you're referring?
However, in your two previous posts I would be surprised by the results.
In the second one I would expect AniDB title to be Owarimonogatari Second Season, not Monogatari, and in the first one I would expect season title to be Monogatari, in both cases I see the flow going from DB to Mapper to Destination with final bindings referring only to the last step.
--db AniDB --mapper Xem.TVDB >> from AniDB information (for matching) to Xem to TheTVDB (final output Monogatari with season/episodes).
--db TheTVDB --mapper Xem.AniDB >> from TheTVDB to Xem to AniDB (final output Owarimonogatari S2 and absolute numbers).
"XEM" binding also seems to already include information about the pre-matching values.
Re: support for XEM?
Posted: 10 Jun 2019, 10:39
by rednoah
I've published a new release with better logging and default toString representation of mapped Episode objects.
-list calls will print mapping information and original information by default.
-rename will use the mapping information for matching but then just pass on the original information for use in formatting, i.e. after renaming, numbers will match your chosen database.

Note that the examples above use AnimeLists and not XEM. Looks good to me according to the mapping information AnimeLists provides.
Re: support for XEM?
Posted: 10 Jun 2019, 12:54
by devster
Sorry about AnimeList vs XEM, I'd expect similar info, also the binding seems to be called XEM in the BETA (not sure if latest).
I wasn't questioning the information, I was simply saying my expectation was different.
I would consider --db as source, --mapper as intermediary.destination, your examples seem to do the opposite, --db is the destination, --mapper is intermediary.source.
I'd expect --db AniDB {episode} to correspond to Owarimonogatari S2 - absolute episode
and --db TheTVDB {episode} to correspond to Monogatary - S00E00 episodes.
That's all. If the decision is to use them as you demonstrate I'll adapt.
Re: support for XEM?
Posted: 10 Jun 2019, 14:38
by rednoah
It's all work in progress. I'll post some actual usage examples later and see if they work as one would expect.
Re: support for XEM?
Posted: 11 Jun 2019, 07:51
by rednoah
Here's what I get with
r6504. Comments appreciated.
Code: Select all
$ filebot --log INFO -list --db TheTVDB --q Monogatari --filter s==3 --mapper XEM.AniDB
Monogatari Series Second Season - 01 [Monogatari - 3x01 - Tsubasa Tiger - Part 1]
Monogatari Series Second Season - 02 [Monogatari - 3x02 - Tsubasa Tiger - Part 2]
...
Code: Select all
$ filebot --log INFO -list --db AniDB --q Monogatari --filter s==3 --mapper XEM.TheTVDB
Monogatari - 3x01 [Monogatari Series Second Season - 01 - Tsubasa Tiger, Part 1]
Monogatari - 3x02 [Monogatari Series Second Season - 02 - Tsubasa Tiger, Part 2]
...
--db AniDB --filter s==3 only works because FileBot is implicitly using AnimeList when the season value
{s} is requested, for Anime Episode objects for which
{s} would typically be undefined.
Code: Select all
$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper XEM.AniDB
...
[TEST] from [Monogatari Series Second Season - 22.mkv] to [Monogatari - 3x22 - Hitagi End - Part 5.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x23 - Hitagi End - Part 6.mkv]

Note that
XEM and
AnimeLists seem to have different mappings.
Code: Select all
$ filebot --log INFO -list --db AniDB --q "Monogatari Series Second Season" --mapper AnimeList.TheTVDB
...
Monogatari Series Second Season - 3x05 [Monogatari Series Second Season - 05 - Tsubasa Tiger, Part 5]
Monogatari Series Second Season - Special 7 [Monogatari Series Second Season - 06 - Summary 1]
Monogatari Series Second Season - 3x06 [Monogatari Series Second Season - 07 - Mayoi Jiangshi, Part 1]
Monogatari Series Second Season - 3x07 [Monogatari Series Second Season - 08 - Mayoi Jiangshi, Part 2]
Monogatari Series Second Season - 3x08 [Monogatari Series Second Season - 09 - Mayoi Jiangshi, Part 3]
Monogatari Series Second Season - 3x09 [Monogatari Series Second Season - 10 - Mayoi Jiangshi, Part 4]
Monogatari Series Second Season - Special 8 [Monogatari Series Second Season - 11 - Summary 2]
Monogatari Series Second Season - 3x10 [Monogatari Series Second Season - 12 - Nadeko Medusa, Part 1]
...
Monogatari Series Second Season - 3x18 [Monogatari Series Second Season - 21 - Hitagi End, Part 1]
Monogatari Series Second Season - 3x19 [Monogatari Series Second Season - 22 - Hitagi End, Part 2]
Monogatari Series Second Season - 3x20 [Monogatari Series Second Season - 23 - Hitagi End, Part 3]
...

Note that that the series name is not mapped to TheTVDB in this example, because AnimeList data only has the AniDB series name, but not the TheTVDB series name, so the name is mapped as is
(as to avoid additional TheTVDB network requests to look up the name by ID).
Code: Select all
$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper AnimeList.AniDB
[TEST] from [Monogatari Series Second Season - 21.mkv] to [Monogatari - 3x18 - Hitagi End - Part 1.mkv]
[TEST] from [Monogatari Series Second Season - 22.mkv] to [Monogatari - 3x19 - Hitagi End - Part 2.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x20 - Hitagi End - Part 3.mkv]
Re: support for XEM?
Posted: 12 Jun 2019, 09:49
by crawfs
Based on your exam]ple AnimeList seems a lot more accurate than TVDB and xem is similarly troublesome from my example.
However I can't get AnimeList working for me on the latest build:
Code: Select all
filebot.exe -version
FileBot 4.8.6 (r6492) / OpenJDK Runtime Environment 12.0.1 / Windows 10 10.0 (amd64)
And when I run:
Code: Select all
filebot.exe --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper AnimeList.AniDB
I get the following:
Code: Select all
Exclude [Monogatari Series: Second Season - 1x01 - Tsubasa Tiger - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x02 - Tsubasa Tiger - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x03 - Tsubasa Tiger - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x04 - Tsubasa Tiger - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x05 - Tsubasa Tiger - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x06 - Mayoi Jiangshi - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x07 - Mayoi Jiangshi - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x08 - Mayoi Jiangshi - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x09 - Mayoi Jiangshi - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x10 - Nadeko Medusa - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x11 - Nadeko Medusa - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x12 - Nadeko Medusa - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x13 - Nadeko Medusa - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x14 - Shinobu Time - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x15 - Shinobu Time - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x16 - Shinobu Time - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x17 - Shinobu Time - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x18 - Hitagi End - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x19 - Hitagi End - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x20 - Hitagi End - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x21 - Hitagi End - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x22 - Hitagi End - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari Series: Second Season - 1x23 - Hitagi End - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x01 - Hitagi Crab - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x02 - Hitagi Crab - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x03 - Mayoi Snail - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x04 - Mayoi Snail - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x05 - Mayoi Snail - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x06 - Suruga Monkey - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x07 - Suruga Monkey - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x08 - Suruga Monkey - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x09 - Nadeko Snake - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x10 - Nadeko Snake - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x11 - Tsubasa Cat - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x12 - Tsubasa Cat - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x13 - Tsubasa Cat - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x14 - Tsubasa Cat - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 1x15 - Tsubasa Cat - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x01 - Karen Bee - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x02 - Karen Bee - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x03 - Karen Bee - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x04 - Karen Bee - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x05 - Karen Bee - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x06 - Karen Bee - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x07 - Karen Bee - Part 7] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x08 - Tsukihi Phoenix - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x09 - Tsukihi Phoenix - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x10 - Tsukihi Phoenix - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 2x11 - Tsukihi Phoenix - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x01 - Tsubasa Tiger - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x02 - Tsubasa Tiger - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x03 - Tsubasa Tiger - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x04 - Tsubasa Tiger - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x05 - Tsubasa Tiger - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x06 - Mayoi Jiangshi - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x07 - Mayoi Jiangshi - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x08 - Mayoi Jiangshi - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x09 - Mayoi Jiangshi - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x10 - Nadeko Medusa - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x11 - Nadeko Medusa - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x12 - Nadeko Medusa - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x13 - Nadeko Medusa - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x14 - Shinobu Time - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x15 - Shinobu Time - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x16 - Shinobu Time - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x17 - Shinobu Time - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x18 - Hitagi End - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x19 - Hitagi End - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x20 - Hitagi End - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x21 - Hitagi End - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x22 - Hitagi End - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 3x23 - Hitagi End - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x01 - Ougi Formula - Parts 1 & 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x02 - Sodachi Riddle - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x03 - Sodachi Riddle - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x04 - Sodachi Lost - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x05 - Sodachi Lost - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x06 - Sodachi Lost - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x07 - Shinobu Mail - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x08 - Shinobu Mail - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x09 - Shinobu Mail - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x10 - Shinobu Mail - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x11 - Shinobu Mail - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 4x12 - Shinobu Mail - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x01 - Mayoi Hell - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x02 - Mayoi Hell - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x03 - Hitagi Rendezvous - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x04 - Hitagi Rendezvous - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x05 - Ougi Dark - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x06 - Ougi Dark - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - 5x07 - Ougi Dark - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 1 - Episode 5.5 (Recap)] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 2 - Kizumonogatari I: Iron Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 3 - Tsubasa Family - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 4 - Tsubasa Family - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 5 - Tsubasa Family - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 6 - Tsubasa Family - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 7 - Summary I] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 8 - Summary II] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 10 - Suruga Devil - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 9 - Summary III] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 11 - Suruga Devil - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 12 - Suruga Devil - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 13 - Suruga Devil - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 14 - Suruga Devil - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 15 - Yotsugi Doll - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 16 - Yotsugi Doll - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 17 - Yotsugi Doll - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 18 - Yotsugi Doll - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 19 - Kizumonogatari II: Passionate Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 20 - Kizumonogatari III: Cold Blood Arc] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 21 - Koyomi Stone] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 22 - Koyomi Flower] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 23 - Koyomi Sand] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 24 - Koyomi Water] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 25 - Koyomi Wind] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 26 - Koyomi Tree] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 27 - Koyomi Tea] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 28 - Koyomi Mountain] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 29 - Koyomi Torus] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 30 - Koyomi Seed] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 31 - Koyomi Nothing] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 32 - Koyomi Dead] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 33 - Koyomi Reverse - Part 1] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 34 - Koyomi Reverse - Part 2] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 35 - Koyomi Reverse - Part 3] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 36 - Koyomi Reverse - Part 4] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 37 - Koyomi Reverse - Part 5] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Exclude [Monogatari - Special 38 - Koyomi Reverse - Part 6] due to map failure: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: AnimeList for class: Script1
Re: support for XEM?
Posted: 12 Jun 2019, 10:02
by rednoah
r6504 or higher is required:
viewtopic.php?f=7&t=1609

I'm uploading new release builds into the BETA directory as well. Please check back an hour later.
Re: support for XEM?
Posted: 13 Jun 2019, 04:46
by rednoah
FileBot
r6509 now allows the
--mapper to
map 1..* episode options, so you can increase the chance that the perfect match is among them, but might also increase ambiguity, depending on the specific circumstances:
Code: Select all
$ filebot --log INFO --action TEST -rename *.mkv -non-strict --db TheTVDB --mapper "[episode, AnimeList.AniDB]"
[TEST] from [Monogatari - 3x19.mkv] to [Monogatari - 3x19 - Hitagi End - Part 2.mkv]
[TEST] from [Monogatari Series Second Season - 23.mkv] to [Monogatari - 3x20 - Hitagi End - Part 3.mkv]
Re: support for XEM?
Posted: 13 Jun 2019, 11:00
by crawfs
Not sure I understand what that latest change is doing.
Re: support for XEM?
Posted: 13 Jun 2019, 11:57
by crawfs
The mapping has issues with shows that have a separate aniDB entry for each season but the file name itself is in absolute order, this was when I was testing it with amc
Code: Select all
filebot.exe --log INFO --action TEST --output "E:\FilebotTest" -script fn:amc -non-strict "E:\Downloads" --def animeFormat="{n}\Season {s.pad(2)}\{n} - {s00e00}" --map
per AnimeList.AniDB
Code: Select all
[TEST] from [E:\Downloads\[anime4life.] Kuroko's Basketball 51-75 Complete [Season 3] (BD1080p AC3 8bit) [x264_AVC] English Subbed\Kuroko's Basketball 75 Again and Again (BD1080p AC3 8bit).mkv] to [E:\FilebotTest\TV Shows\Kuroko's Basketball\Season 02\Kuroko's Basketball - S02E24 - Enough.mkv]
[TEST] from [E:\Downloads\[anime4life.] Kuroko's Basketball 51-75 Complete [Season 3] (BD1080p AC3 8bit) [x264_AVC] English Subbed\Kuroko's Basketball 72 Let Me Warn You (BD1080p AC3 8bit).mkv] to [E:\FilebotTest\TV Shows\Kuroko's Basketball\Season 03\Kuroko's Basketball - S03E03 - Don't You Get in My Way.mkv]
[TEST] from [E:\Downloads\[DameDesuYo] Shingeki no Kyojin (Season 3 Part 2) - 56v0 (1920x1080 10bit AAC) [00E4BAEE].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Specials\Attack on Titan - S00E04 - Chibi Theatre - Fly, Cadets, Fly! ~ Day 3 & 4.mkv]
[TEST] from [E:\Downloads\[DameDesuYo] Shingeki no Kyojin (Season 3 Part 2) - 56v0 (1920x1080 10bit AAC) [564AB91D].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Season 03\Attack on Titan - S03E02 - Pain.mkv]
[TEST] from [E:\Downloads\[BlurayDesuYo] Shingeki no Kyojin - Season 2 (BD 1920x1080 10bit FLAC)\[BlurayDesuYo] Shingeki no Kyojin (Season 2) - 35 (BD 1920x1080 10bit FLAC) [47B4753C].mkv] to [E:\FilebotTest\TV Shows\Attack on Titan\Season 02\Attack on Titan - S02E03 - Southwestward.mkv]
I didn't test the above filenames without AMC but figured it was worth mentioning, oh and I provided some links to aniDB pages where shows are split by season:
https://anidb.net/perl-bin/animedb.pl?s ... &aid=10944
https://anidb.net/perl-bin/animedb.pl?s ... &aid=14444
Re: support for XEM?
Posted: 13 Jun 2019, 13:01
by rednoah
If the files already use TheTVDB Absolute Order, then it'll work out of the box:
Code: Select all
$ filebot --log INFO --action TEST -rename -r *.mkv -non-strict --db TheTVDB --format "{n} - {sxe} [{absolute}]"
[TEST] from [Kuroko's Basketball 72 Let Me Warn You (BD1080p AC3 8bit).mkv] to [Kuroko's Basketball - 3x22 [72].mkv]
[TEST] from [Kuroko's Basketball 75 Again and Again (BD1080p AC3 8bit).mkv] to [Kuroko's Basketball - 3x25 [75].mkv]
BUG: The other way around indeed doesn't work well, as it seems
Code: Select all
filebot -list --q "Kuroko's Basketball" --db AniDB --mapper XEM.TheTVDB -non-strict
DEBUG: I guess I'll need to do some kind of normalization to match between AniDB and TheTVDB series names when using XEM:
Code: Select all
Kuroko's Basketball 3
Kuroko`s Basketball 3
--db AniDB --mapper AnimeList.TheTVDB works correctly because shows are mapped by numeric ID, but since AnimeList doesn't have absolute number mapping information, we will only have SxE information, and not absolute information, so it's useless in this particular example because we need absolute numbers for matching these files correctly.
Re: support for XEM?
Posted: 27 Jun 2019, 03:22
by rednoah
FileBot r6528 and above also support multi-mapping to give the FileBot matcher multiple options to choose from, increasing the likelihood that one of those numbers match exactly
(but also increasing the chance of mismatches since there's more options, especially multiple options with overlapping numbers, i.e. ambiguous options)
Code: Select all
--db AniDB --mapper "[episode, AnimeList.TheTVDB, XEM.TheTVDB]"
Re: support for XEM?
Posted: 27 Jun 2019, 07:10
by OutrageousGem
I still do not really get how the command is supposed to be used. Is --db now used for the initial matching Database or the final Database to rename against?
For example if I want to rename "
Fairy Tail (2018) - 02 - Because of Love.mkv" (AniDB) to "
Fairy Tail - S08E02 -Because of Love.mkv" (TheTVDB) would I use
Code: Select all
/usr/bin/filebot -rename --action test --db TheTVDB -non-strict --mapper AnimeList.AniDB --output /library/anime --format "{plex[1]/plex[2]/plex[3]}" /download
or
Code: Select all
/usr/bin/filebot -rename --action test --db AniDB -non-strict --mapper AnimeList.TheTVDB --output /library/anime --format "{plex[1]/plex[2]/plex[3]}" /download
?
Re: support for XEM?
Posted: 27 Jun 2019, 07:49
by rednoah
This particular example works out of the box:
Code: Select all
$ filebot -rename *.mkv --db TheTVDB -non-strict --action TEST
Rename episodes using [TheTVDB] with [Airdate Order]
Auto-detected query: [Fairy Tail]
Fetching episode data for [Fairy Tail]
[TEST] from [Fairy Tail (2018) - 02 - Because of Love.mkv] to [Fairy Tail - 8x02 - Because of Love.mkv]
Generally speaking, if you want to rename with TheTVDB but match with AnimeLists mapping information, then this should work:
Code: Select all
--db TheTVDB --mapper AnimeList.AniDB
Re: support for XEM?
Posted: 27 Jun 2019, 08:45
by OutrageousGem
Weird enough it does work out of the box. But it does NOT work if I add
You can see the error at:
https://pastebin.com/rr80xwQb
Re: support for XEM?
Posted: 27 Jun 2019, 10:21
by rednoah
Looks like it can't find a mapping:
Code: Select all
Exclude [Fairy Tail - 8x02 - Because of Love] due to map failure: javax.script.ScriptException: net.filebot.format.BindingException: Binding "AniDB": null
I'll look into it.
EDIT:
Fixed with
FileBot r6529:
Code: Select all
$ filebot -rename *.mkv --db TheTVDB --mapper AnimeList.AniDB --action TEST | grep "Because of Love"
Map [Fairy Tail - 8x02 - Because of Love] to [Fairy Tail (2018) - 02]
Reverse Map [Fairy Tail (2018) - 02] to [Fairy Tail - 8x02 - Because of Love]
[TEST] from [Fairy Tail (2018) - 02 - Because of Love.mkv] to [Fairy Tail - 8x02 - Because of Love.mkv]
Re: support for XEM?
Posted: 27 Jun 2019, 13:04
by OutrageousGem
That was quick! I tried it with r6530 and it works like a charm.
Re: support for XEM?
Posted: 05 Jul 2019, 16:18
by devster
Not sure if intentional or feasible, but binding for
{sc} seems to be undefined.
I tried with the following:
Code: Select all
FileBot 4.8.6 (r6531)
$ filebot -list --q 'neon genesis evangelion' --db AniDB --format '{s00e00} {absolute} {sc} {special}'
I expected sc to be 1, the season count for the show.
Re: support for XEM?
Posted: 05 Jul 2019, 16:46
by OutrageousGem
I think AniDB does not have the concept of seasons as each season is its own show. So sc stays undefined.
Re: support for XEM?
Posted: 05 Jul 2019, 17:03
by devster
It doesn’t, but it was my understanding that new versions made the match implicitly, via AnimeList.
See
viewtopic.php?f=6&t=6037&start=50#p44526
Re: support for XEM?
Posted: 06 Jul 2019, 02:37
by rednoah
{sc} and
{sy} are based on
{episodelist} so it doesn't work if
--db AniDB is being used.

Implicit conversion is only implemented for
{s} and
{sxe} and
{s00e00} at this point.

If
{sc} and
{sy} is desired, then I recommend using
--db TheTVDB, optionally with
--mapper AnimeList.AniDB to help with matching AniDB-named files.
EDIT:
Fixed
{sy} to work for AniDB data. No mapper involved. Just the years from the first to the last episode of the given AniDB series.
Re: support for XEM?
Posted: 06 Jul 2019, 13:27
by devster
rednoah wrote: 06 Jul 2019, 02:37
{sc} and
{sy} are based on
{episodelist} so it doesn't work if
--db AniDB is being used.
For the sake of argument, why is
{episodelist} undefined for AniDB?
rednoah wrote: 06 Jul 2019, 02:37

Implicit conversion is only implemented for
{s} and
{sxe} and
{s00e00} at this point.
Use case would be the following:
Code: Select all
{
Integer count = any{ sc }{ 0 }
if (episode.special) {
"S$special"
} else if (count > 1) {
s00e00
} else {
"EP" + absolute
}
}
As this is is not foreseen, how would I use the
amc.groovy script to have a single season folder for all shows in the same bucket (One-Punch Man and One-Punch Man S2), I mean, is there a way to add the mapper option to the script? Is this doable with
ut_label=anime?
Re: support for XEM?
Posted: 06 Jul 2019, 14:27
by rednoah
1.
Sounds like you don't want AniDB series organization. I recommend using
--db TheTVDB so all seasons belong to the same series
{n}.
2.
If you are set on using
--db AniDB for reasons I can't imagine, then you can access the TheTVDB series name like so, which would be the same for both One Punch man series seasons:
3.
The amc script will inherit the
--mapper option, and that's a Groovy expressions, so you can check the label, or other things, and map episodes accordingly:
Code: Select all
--mapper "label =~ /anime/ ? [episode, AnimeList.TheTVDB] : [episode, XEM.AniDB]"

Consider multiple mappings, derived from different sources, based on the label parameter. Not sure if this actually makes sense though.
4.
{sc} is always undefined for AniDB, since all season values will be undefined.
{sc} is going to be 1 or more for TheTVDB data since there's generally at least one season for any give series.

Are you using
{sc} to check if the database is AniDB or TheTVDB? Because that's effectively what you're doing, and using
{info.database} would be more readable.

Re: support for XEM?
Posted: 06 Jul 2019, 17:29
by devster
rednoah wrote: 06 Jul 2019, 14:27

Are you using
{sc} to check if the database is AniDB or TheTVDB? Because that's effectively what you're doing, and using
{info.database} would be more readable.
Not really, I only wanted to have absolute episode numbering for single-season animes, season-based for multi-season animes, even with different names. TheTVDB is a simpler solution, with the mapper as suggested on point 3, but I looked here since the category from the torrent client is Anime and amc.groovy defaults to AniDB for those.
Re: support for XEM?
Posted: 06 Jul 2019, 17:56
by rednoah
Now that we have the --mapper feature, it's probably feasible to always force TV Mode / TheTVDB while using --mapper to make it work for AniDB-numbered files.
Re: support for XEM?
Posted: 11 Aug 2019, 19:24
by devster
I apologize for asking, but as source is no longer available, is it possible to have a recap of the available mappers and what they match to?
Re: support for XEM?
Posted: 12 Aug 2019, 08:52
by rednoah
The
--mapper option accepts a Groovy expression, that can yield
Episode or
Episode[] objects.
(i.e. map on episode to one or more other episodes)
e.g. use and rename with TheTVDB episode data, but use AnimeList.AniDB episode mappings
(if available) for matching:
Code: Select all
filebot -rename . --db TheTVDB --mapper AnimeList.AniDB -non-strict
--mapper expressions you will most likely find useful:
e.g. map to itself
(i.e. identity mapper, do nothing)
e.g. re-number episode to Season 1 Episode (e+1) and match accordingly:
e.g. use different mapper for different TV Shows:
Code: Select all
n =~ /Monogatari/ ? AnimeList.AniDB : episode
e.g. use multiple mappers at the same time, and let the matcher try to figure out the rest given the available options
(NOTE: more options ➔ more room for error)
Code: Select all
[episode, AnimeList.AniDB, XEM.AniDB]
e.g. do your own thing entirely:
Code: Select all
[seriesName: /My Series/, season: 1, episode: 1, title: /Hello World/]

You can use the
Format Editor to test and prototype
--mapper expressions.

Time will tell which approach is best. The
--mapper option allows you to do anything, but just like
--filter, how to best use it probably depends on the exact use case, and maybe over time we can come up with a "standard" --mapper that works well enough for most use cases.
Re: support for XEM?
Posted: 12 Aug 2019, 11:19
by devster
Thanks, this may be worth a pinned post.
Re: support for XEM?
Posted: 12 Aug 2019, 12:36
by rednoah
I guess I could paste this in into a --mapper man page, and then update as things change.
Re: support for XEM?
Posted: 07 Sep 2019, 06:08
by crawfs
Hey, do you have a solution for the fact that files named with absolute ordering which are from anime that have the show split into 3 separate seasons doesn't work with the mapper? Unfortunately it's a bit of a deal breaker for using this feature as it will likely break a lot of stuff for me.
To clarify this is the issue I raised in this comment:
viewtopic.php?p=44573#p44573
Re: support for XEM?
Posted: 07 Sep 2019, 07:16
by rednoah
The use cases discussed in June should work nowadays.
What have you tried so far? What doesn't work as expected?
I'll need specific examples, and logs, please so I can help you out with concrete solutions.

I've been testing with the Monogatari series where 7 AniDB entities correlate to 7 seasons of a single TheTVDB entity. So it should generally work.
Re: support for XEM?
Posted: 08 Sep 2019, 03:39
by crawfs
Alright, I'll take another look and post based on how it resolves, I haven't tested it since back then.
Re: support for XEM?
Posted: 17 Oct 2019, 10:29
by Corey3443
I just saw this thread and was wondering if the mapper function allows you to use —dB tvdb but keep the original Romanized Japanese title for anime? I was using a csv generated from XML to map titles but this looks like it could be cleaner.
An example would be great if this is possible.
Re: support for XEM?
Posted: 17 Oct 2019, 15:55
by rednoah
Yes. Give me an example file path and example result, and I'll give you an example command to make that happen.

Re: support for XEM?
Posted: 17 Oct 2019, 22:18
by Corey3443
"Boku no Hero Academia" is probably a good example. TVDB uses My Hero Academia
So I would be expecting it stored like \path\to\Boku no Hero Academia\Season 4\Boku.no.Hero.Academia.S04E01.A064.720p.GROUP.mkv
My current name string. I would, of course, add the path later, but currently, a bash script has been handling moving files as part of my download-task; but if i can get filebot naming the way I like it, ill change it so filebot does the move.
Code: Select all
{n.space('.').replace(/]/,'.')+'.'}{s00e00}{episode.special ? '.'+t.space('_') : ''}{'.'+vf}{any{'.'+source}{'.'+fn.match(/BD|Blu-ray/)}}{bitdepth == 10 ? '.10bit' : null}{any{'.'+group}{'.NOGRP'}}
Since sleeping on the idea, it got me thinking that will work for 90% of cases, but for shows like "Nanatsu no Taizai" that have different titles for each season, would it still be possible to resolve the seasons to just "Nanatsu no Taizai" rather than like "Nanatsu no Taizai - Kamigami no Gekirin" which is season 3?
ie: \path\to\Nanatsu no Taizai\Season 3\Nanatsu.no.Taizai.S03E01.720p.GROUP.mkv
Re: support for XEM?
Posted: 18 Oct 2019, 01:11
by rednoah
e.g.
filebot -list is a good tool for testing on a complete set of episodes:
Code: Select all
filebot -list --q "Boku no Hero Academia" --format "{db.AniDB.primaryTitle}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}" --filter "e == 1" --log INFO
Boku no Hero Academia/Season 1/Boku no Hero Academia - S01E01 - Izuku Midoriya: Origin
Boku no Hero Academia (2017)/Season 2/Boku no Hero Academia (2017) - S02E01 - That's the Idea, Ochaco
Boku no Hero Academia (2018)/Season 3/Boku no Hero Academia (2018) - S03E01 - Game Start
Boku no Hero Academia (2019)/Season 4/Boku no Hero Academia (2019) - S04E01 - The Scoop on U.A. Class 1-A

The dynamic database binding
{db} like so to get the AniDB romanji title:
{db.AniDB.primaryTitle}

Note that
--mapper isn't necessary for this use case if files are already named using TheTVDB SxE numbering, though
{db} does of course utilize AniDB / TheTVDB mapping data internally.

Looks like "Boku no Hero Academia" is already a good example for multi-season Anime, since each season is a different entry on AniDB it it seems to be working correctly here.
Re: support for XEM?
Posted: 18 Oct 2019, 02:00
by Corey3443
So how about files with the original sourced names? I should have probably included them above instead of just "what I wanted". The above as mentioned already had SxE data which was sourced separately, so realistically not a fair comparison.
Here are a few examples (hopefully these will be varied enough to cover all bases):
Code: Select all
[Group] Boku no Hero Academia - 64 [720p].mkv (tvdb s4)
[Group] Nanatsu no Taizai - Kamigami no Gekirin - 01 [720p].mkv (tvdb s3)
[Group] Sword Art Online - Alicization - War of Underworld - 01 [720p].mkv (tvdb s4)
My main goal is to keep romanji titles while having access to sxe and absolute numbers for my naming scheme. I would also like to keep the main series romanji title for the series folder.
ie: "\path\to\sword art online\" no matter the season
Re: support for XEM?
Posted: 18 Oct 2019, 03:01
by rednoah
In this case, the
--mapper option will make sure you get the correct match according to AniDB naming and numbering, even though we're using TheTVDB (SxE Airdate Order) as database for naming and formatting:
Code: Select all
filebot -rename "Boku no Hero Academia - 64.mkv" --db TheTVDB --mapper AnimeList.AniDB -non-strict --action TEST --log INFO
[TEST] from [Boku no Hero Academia - 64.mkv] to [My Hero Academia - 4x01 - The Scoop on U.A. Class 1-A.mkv]
Now we just use the format expression discussed previously, and we get the desired destination path:
Code: Select all
--format "{db.AniDB.primaryTitle}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}"
Code: Select all
[TEST] from [Boku no Hero Academia - 64.mkv] to [Boku no Hero Academia (2019)/Season 4/Boku no Hero Academia (2019) - S04E01 - The Scoop on U.A. Class 1-A.mkv]
EDIT:
You'll probably want to use
replaceTrailingBrackets() on the AniDB/Romanji-based series name, at least on the folder level, to combine different AniDB entries
(with distinct series names) into the same folder
(if possible).
Code: Select all
db.AniDB.primaryTitle.replaceTrailingBrackets()
Code: Select all
filebot -rename "Boku no Hero Academia - 64.mkv" --db TheTVDB --mapper AnimeList.AniDB -non-strict --action TEST --log INFO --format "{db.AniDB.primaryTitle.replaceTrailingBrackets()}/Season {s}/{db.AniDB.primaryTitle} - {s00e00} - {t}"
Re: support for XEM?
Posted: 18 Oct 2019, 04:33
by Corey3443
I'll have a play and see if I can come up with any oddities. thanks rednoah =)
edit: doesn't look like it will do what I want for anything that has an alternative name for the season. ie: sword art online s3 title var is "Sword Art Online Alicization" instead of just "Sword Art Online".
It's fine, I'll just continue using what I had in place; I just thought I might be able to simplify the process.
Re: support for XEM?
Posted: 06 Nov 2019, 21:22
by rednoah

I found a new use case for
--mapper today:

Set SxE to 0x0 to let
Match by Title take over:
Code: Select all
$ filebot -rename *.mkv --db TheTVDB --mapper "episode.derive(0, 0)" -non-strict --action TEST --log INFO
[TEST] from [South Park S01E01 Tegridy Farms.mkv] to [South Park - 22x04 - Tegridy Farms.mkv]
viewtopic.php?f=4&t=11221
Re: support for XEM?
Posted: 06 Nov 2022, 05:46
by ZyFinity
@rednoah
I believe the XEM mapping is not working at the moment as XEM changed their domain from "thexem.de" to "thexem.info"
Where the mapping requests are getting "301 Moved Permanently" errors in the latest filebot version
Re: support for XEM?
Posted: 06 Nov 2022, 12:38
by rednoah
FileBot r9352 changes the API endpoint to
https://thexem.info/ so it should work again.

While you're here. Are you actually using the
{XEM} binding for some use case successfully? I've not found it useful for anything, since AnimeLists already takes care of AniDB/TheTVDB mappings and better at that.
Re: support for XEM?
Posted: 06 Nov 2022, 23:00
by ZyFinity
Is AnimeLists actually better and if so in what way?
I wanted to also ask why filebot only connects to a centralised "filebot hosted" animelists db that gets pulled monthly rather than just allowing us the user to download the database at our wanted set interval locally or even whenever there's a commit to the github repo or something. As I would be wanting to potentially have this setup with airing shows and be automated, however I guess this is where a fallback to the xem could come in handy.
Secondly, the reason I want this, is that I have a very large library sorted perfectly following AniDB with absolute numbering e.g. foldername: (animename [anidb-id])
What I've done is create a simple groovy script that extracts the anidb id from the folder name so that every anime should be perfectly mapped to the TVDB format.
One thing i noticed however is that file bot pulls a mapping for the show from anidb -> tvdb correctly, however then does a "reversemap" for whatever reason?
and then ends up getting a wrong match depending on the file layout.
I tested this by having the following dummy folder setup:
Code: Select all
/Attack on Titan The Final Season (2022) [anidb-16177]/
/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mkv
/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv
/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv
And it matched I believe only episode 2 correctly and mismatched the others to other episodes within the same season. This test purposely included missing episodes for testing reasons.
When I changed the test so instead of episode 12 it was episode 3, it seemed to map as expected. or is it simply that the original naming of the episodes are sub optimal?
Re: support for XEM?
Posted: 07 Nov 2022, 03:06
by ZyFinity
I just ran some tests, and it seems animelist mapped incorrectly here with that example folder structure above, what would the reasoning for that be?
Using THE XEM
Code: Select all
filebot.exe -script "C:/Users/Documents/AnidbToTvdb/anidbToTvdb.groovy" -non-strict --action TEST
Rename episodes using [AniDB] with [Absolute]
Lookup via [16177]
Fetching episode data for [16177]
└─ 12 episodes
Apply mapper [XEM.TheTVDB] on [12] episodes
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 1x01]
Map [Attack on Titan The Final Season (2022) - 02 - Sneak Attack] to [Attack on Titan - 1x02]
Map [Attack on Titan The Final Season (2022) - 03 - Two Brothers] to [Attack on Titan - 1x03]
Map [Attack on Titan The Final Season (2022) - 04 - Memories of the Future] to [Attack on Titan - 1x04]
Map [Attack on Titan The Final Season (2022) - 05 - From You, 2,000 Years Ago] to [Attack on Titan - 1x05]
Map [Attack on Titan The Final Season (2022) - 06 - Thaw] to [Attack on Titan - 1x06]
Map [Attack on Titan The Final Season (2022) - 07 - Sunset] to [Attack on Titan - 1x07]
Map [Attack on Titan The Final Season (2022) - 08 - Pride] to [Attack on Titan - 1x08]
Map [Attack on Titan The Final Season (2022) - 09 - Night of the End] to [Attack on Titan - 1x09]
Map [Attack on Titan The Final Season (2022) - 10 - Traitor] to [Attack on Titan - 1x10]
Map [Attack on Titan The Final Season (2022) - 11 - Retrospective] to [Attack on Titan - 1x11]
Map [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity] to [Attack on Titan - 1x12]
Reverse Map [Attack on Titan - 1x01] to [Attack on Titan The Final Season (2022) - 01 - Judgment]
Reverse Map [Attack on Titan - 1x12] to [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity]
Reverse Map [Attack on Titan - 1x02] to [Attack on Titan The Final Season (2022) - 02 - Sneak Attack]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 1 - Judgment [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E17 - Judgment.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E28 - The Dawn of Humanity.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E18 - Sneak Attack.mkv]
Processed 3 files
Done ?(?????)?
Using AnimeList
Code: Select all
filebot.exe -script "C:/Users/Documents/AnidbToTvdb/anidbToTvdb.groovy" -non-strict --action TEST
Rename episodes using [AniDB] with [Absolute]
Lookup via [16177]
Fetching episode data for [16177]
└─ 12 episodes
Apply mapper [AnimeList.TheTVDB] on [12] episodes
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17]
Map [Attack on Titan The Final Season (2022) - 02 - Sneak Attack] to [Attack on Titan - 4x18]
Map [Attack on Titan The Final Season (2022) - 03 - Two Brothers] to [Attack on Titan - 4x19]
Map [Attack on Titan The Final Season (2022) - 04 - Memories of the Future] to [Attack on Titan - 4x20]
Map [Attack on Titan The Final Season (2022) - 05 - From You, 2,000 Years Ago] to [Attack on Titan - 4x21]
Map [Attack on Titan The Final Season (2022) - 06 - Thaw] to [Attack on Titan - 4x22]
Map [Attack on Titan The Final Season (2022) - 07 - Sunset] to [Attack on Titan - 4x23]
Map [Attack on Titan The Final Season (2022) - 08 - Pride] to [Attack on Titan - 4x24]
Map [Attack on Titan The Final Season (2022) - 09 - Night of the End] to [Attack on Titan - 4x25]
Map [Attack on Titan The Final Season (2022) - 10 - Traitor] to [Attack on Titan - 4x26]
Map [Attack on Titan The Final Season (2022) - 11 - Retrospective] to [Attack on Titan - 4x27]
Map [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity] to [Attack on Titan - 4x28]
Reverse Map [Attack on Titan - 4x22] to [Attack on Titan The Final Season (2022) - 06 - Thaw]
Reverse Map [Attack on Titan - 4x28] to [Attack on Titan The Final Season (2022) - 12 - The Dawn of Humanity]
Reverse Map [Attack on Titan - 4x18] to [Attack on Titan The Final Season (2022) - 02 - Sneak Attack]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 1 - Judgment [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E22 - Thaw.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E28 - The Dawn of Humanity.mkv]
[TEST] from [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mkv] to [F:\ANIME\testRename\Attack on Titan The Final Season (2022) [anidb-16177]\Attack on Titan The Final Season (2022) - S04E18 - Sneak Attack.mkv]
Processed 3 files
Done ?(?????)?
Re: support for XEM?
Posted: 07 Nov 2022, 03:19
by rednoah
ZyFinity wrote: 06 Nov 2022, 23:00
Is AnimeLists actually better and if so in what way?
ZyFinity wrote: 07 Nov 2022, 03:06
I just ran some tests, and it seems animelist mapped incorrectly here with that example folder structure above, what would the reasoning for that be?
The console output you posted shows that
AnimeLists correctly maps
Attack on Titan The Final Season (2022) - 01 to
4x17:
Code: Select all
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17]
EDIT: I get confused. I don't watch that series so I don't actually know what the correct mapping should be for that one. I guess the mapping is right, but matching doesn't work out for other reasons. I'll check again some other day when I actually have time to research that series. The series / season names seem to be especially confusing.
The XEM mapping is definitely wrong, though FileBot does seem to arrive at the correct match in your specific use case, that's mostly by happy accident:
Code: Select all
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 1x01]

TheXEM can't work reliably for similarly-named shows because the API doesn't provide AniDB ID / TheTVDB ID mappings. The API might have improved over time since we started this thread here in 2018 but I haven't looked into TheXEM since then.
EDIT:
Map [A] to [M] indicates that you might be using
--mapper the wrong way around. The
[A] is what you want to see in the destination file path. The
[M] is what you have in your source file names and should match that, e.g.
Map [Attack on Titan The Final Season (2022) - 01 - Judgment] to [Attack on Titan - 4x17] means that you want to match files currently named "4x17" and then rename them to "01".
ZyFinity wrote: 06 Nov 2022, 23:00
I wanted to also ask why filebot only connects to a centralised "filebot hosted" animelists db that gets pulled monthly rather than just allowing us the user to download the database at our wanted set interval locally or even whenever there's a commit to the github repo or something. As I would be wanting to potentially have this setup with airing shows and be automated, however I guess this is where a fallback to the xem could come in handy.
* GitHub is not a CDN
* FileBot uses a modified XML file which adds in additional information, strips unnecessary entries, adds support for XZ compression and If-Modified-Since requests, etc
* FileBot does check for updates
(of our modified XML file) bi-weekly-ish nowadays
(I believe it's only updated every 1-2 weeks on the server-side though; but this can be adjusted if there is a actual use case that requires regular frequent updates; but the mappings are maintained by humans so entries are added slowly, and almost never change once added)
ZyFinity wrote: 06 Nov 2022, 23:00
One thing i noticed however is that file bot pulls a mapping for the show from anidb -> tvdb correctly, however then does a "reversemap" for whatever reason?
and then ends up getting a wrong match depending on the file layout.
The
--mapper option allows you to match an Episode object as if it was another Episode object, but rename with the original Episode object:
Code: Select all
Start with A
Map A to M (for matching)
Reverse Map M to A (for renaming)
Re: support for XEM?
Posted: 07 Nov 2022, 04:09
by rednoah
I've re-created your file structure and ran a few tests:
Code: Select all
Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mp4
Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mp4
Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4
In this case, you'll want to use
--db AniDB and match files with AniDB information
(i.e. no mapper) but then translate to TheTVDB episode information at format time by using the
{db} binding
(uses AnimeLists internally) in your
--format expression. The
--q option is very useful in this case because it'll allows us to force lookup-by-ID and skip search-by-name entirely:
Code: Select all
$ filebot -rename -r Anime --q "{ f.path.match(/anidb-([0-9]+)/) }" --db AniDB --output "TV Shows" --format "{ db.TheTVDB.plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 1 - Judgement [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E17 - Judgment.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E28 - The Dawn of Humanity.mp4]
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 2 - Sneak Attack [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 04/Attack on Titan - S04E18 - Sneak Attack.mp4]
In this case,
--mapper does
not work well because
[anidb-16177] isn't used during episode matching, and the ID is meaningless to TheTVDB for series lookup purposes, and the file name doesn't match AniDB primary naming either:
Code: Select all
$ filebot -rename -r Anime --db TheTVDB --mapper AnimeList.AniDB --output "TV Shows" --format "{ plex.id }" -non-strict --action TEST --log INFO
[TEST] from [Anime/Attack on Titan The Final Season (2022) [anidb-16177]/Attack on Titan The Final Season - 12 - The Dawn of Humanity [1080p] [Subsplease].mp4] to [TV Shows/TV Shows/Attack on Titan {tvdb-267440}/Season 01/Attack on Titan - S01E12 - Wound - The Struggle for Trost.mp4]
e.g. In this case, the
--mapper instructs FileBot to match "Shingeki no Kyojin: The Final Season (2022) - 12" but that's completely different from the file name "Attack on Titan The Final Season - 12 - The Dawn of Humanity" and so FileBot cannot arrive at the correct match based on series name or episode title, and so it'll just end up at some 12th Episode of some series vaguely named Attack on Titan:
Code: Select all
Map [Attack on Titan - 4x28 - The Dawn of Humanity] to [Shingeki no Kyojin: The Final Season (2022) - 12]