Page 1 of 1

Metadata and Extended Attributes

Posted: 24 Oct 2012, 11:16
by rednoah
FileBot uses xattr (i.e. Extended Attributes / NTFS Alternative Streams) to store full metadata in filesystem attributes. These xattr are not to be confused with traditional tags that are embedded in the file content, but additional data streams stored in the file system for each file that are not part of the file itself. As such, xattr requires a filesystem that supports xattr, and xattr may be silently lost if files are moved to a filesystem that doesn't support xattr.

  • [xattr:net.filebot.metadata] Episode or Movie Object (as json)
  • [xattr:net.filebot.filename] Original filename
  • [basic:creationTime] Episode airdate or Movie release year (disabled by default for compatibility reasons)

FileBot and other programs have the original filename and all episode / movie metadata available regardless how the file is named. Sure nice to have full metadata instantly / offline available should you need it.

Disable this feature via the -no-xattr command-line flag:

Code: Select all

or via system properties:

Code: Select all

filebot -script fn:properties --def useExtendedFileAttributes=false

Configure FileBot to store xattr metadata in plain text files instead of filesystem xattr streams:

Code: Select all

filebot -script fn:properties --def
:idea: If you require cross-platform compatibility, then using .xattr folders and files is highly recommended. The FileBot Xattr Metadata Scanners & Plug-ins for Plex
support both native filesystem xattr and .xattr folders by default.

View or Clear Extended Attributes
with the filebot command-line tools and xattr script:

Code: Select all

filebot -script fn:xattr /path/to/files

View or Clear Extended Attributes

Posted: 08 Oct 2014, 05:33
by rednoah
If Extended Attributes are enabled and supported by your file system, then FileBot will the store original file name and episode / movie metadata into Extended Attributes for future reference by FileBot or other applications.

e.g. write xattr:

Code: Select all

$ filebot -rename . --db TheTVDB -non-strict --log INFO
[MOVE] from [Alias.1x01.mp4] to [Alias - 1x01 - Truth Be Told.mp4]

e.g. read xattr:

Code: Select all

$ filebot -script fn:xattr .
Alias - 1x01 - Truth Be Told.mp4
	net.filebot.filename: Alias.1x01.mp4
	net.filebot.metadata: {"@type":"Episode","seriesName":"Alias","season":1,"episode":1,"title":"Truth Be Told","airdate":{"year":2001,"month":9,"day":30},"id":180267,"seriesInfo":{"database":"TheTVDB","order":"Airdate","language":"en","type":"TV Series","id":75930,"name":"Alias","aliasNames":["Alias - Die Agentin","Alias (2001)","זהות בדויה","Alias - Codinome Perigo","Шпионка","特務A"],"certification":"TV-14","startDate":{"year":2001,"month":9,"day":30},"genres":["Action","Adventure","Drama","Suspense"],"network":"ABC (US)","rating":8.2,"ratingCount":3316,"runtime":45,"status":"Ended"}}

e.g. read xattr with 3rd party tools:

Code: Select all

$ xattr -p net.filebot.metadata *.mp4 | jsonpp
  "@type": "Episode",
  "seriesName": "Alias",
  "season": 1,
  "episode": 1,
  "title": "Truth Be Told",
  "airdate": {
    "year": 2001,
    "month": 9,
    "day": 30
  "id": 180267,
  "seriesInfo": {
    "database": "TheTVDB",
    "order": "Airdate",
    "language": "en",
    "type": "TV Series",
    "id": 75930,
    "name": "Alias",
    "aliasNames": [
      "Alias - Die Agentin",
      "Alias (2001)",
      "זהות בדויה",
      "Alias - Codinome Perigo",
    "certification": "TV-14",
    "startDate": {
      "year": 2001,
      "month": 9,
      "day": 30
    "genres": [
    "network": "ABC (US)",
    "rating": 8.2,
    "ratingCount": 3316,
    "runtime": 45,
    "status": "Ended"

e.g. read xattr via our python script:

Code: Select all

$ python *.mp4 net.filebot.metadata