Page 1 of 1
Date Added Change To Date Created In Jellyfin
Posted: 27 Sep 2025, 19:59
by Stewart
Stewart wrote:27 Sep 2025, 15:37
Hi Rednoah
Can filebot change file created metadata to match release date in jellyfin?
Thanks in advance
Stewar
rednoah wrote:27 Sep 2025, 16:36
I think you mean to set the Last-Modified and Creation-Date to the episode airdate / movie release date. The
Set creation date feature will do just that.
PS: Please create a public thread if possible.
Hi rednoah
where do I put "--apply date" in filebot?
Thanks
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 28 Sep 2025, 02:29
by rednoah
rednoah wrote: ↑14 Sep 2019, 20:35
Post-processing features can be enabled for newly renamed files via
Renaming Settings ➔
Post Process.


If you're using the Desktop application, then you can enable the
Set creation date feature via
Renaming Settings ➔
Post Process and ticking the
Set creation date item.
Re: Date Added Change To Date Created In Jellyfin
Posted: 28 Sep 2025, 10:31
by Stewart
Hi rednoah
Do i have to rename again with jellyfin preset and tick set creation date in post proccessing to change date added in jellyfin?
Thanks
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 28 Sep 2025, 11:58
by rednoah
Assuming that files have been renamed with FileBot, and thus have
xattr metadata readily available,
Apply Post-Processing Features via Filter can be used to run the
Set creation date at any time on a selected set of files.
rednoah wrote: ↑14 Sep 2019, 20:35
Post-processing features can be applied to an existing set of files via
Attributes ➔
Apply assuming that
xattr metadata is readily available.
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 06:03
by Stewart
Hi rednoah
Thank you for info how to change file attributes which i have got working fine.
I have set in jellyfin to use file creation date for date added but does not seem to work without removing file and adding back into jellyfin?
I wanted to know if filebot could change date added to date created in jellyfin metadata?
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 08:45
by rednoah
Stewart wrote: ↑29 Sep 2025, 06:03
I wanted to know if filebot could change date added to date created in jellyfin metadata?
FileBot has no built-in way of talking to Jellyfin. Although what you want to do might be possible via a
custom post-processing script we'd first have to figure out how to directly interface with Jellyfin and modify its internal database.
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 09:17
by Stewart
Hi rednoah
That would be great but i would not know how to do that, thanks anyway i will have to go through all my movie and do it manually in jellyfin
Thanks for you quick responses
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 12:54
by rednoah
Well... looked easy at first, but did take quite a few hours in the end. The Jellyfin API is insane and stupid.
Updating tags with API fails and corrupts item and
api.py#L24 did help though and it got it working.
[Script] Set Jellyfin DateCreated property
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 18:44
by Stewart
Hi rednoah
Thanks a lot but can I just run this script or do I need to edit to suit my setup if so where ?
Please advise
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 29 Sep 2025, 19:48
by rednoah
You'll need to adjust the first few lines to match your Jellyfin server configuration:
Groovy: Select all
def host = '127.0.0.1'
def port = 8096
def auth = 'YOUR_API_KEY'
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 15:36
by Stewart
Hi rednoah
I tried the following but did not work for me
Def host 192.0.168.6
Def port 8096
def auth I copiied and pasted from api in jellyfin api’s
What have i done wrong?
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 17:44
by rednoah

How did you run a test? I guess I was doing test runs in the editor using a previously renamed file as sample file. It has occurred to me that if you organize files with FileBot, then Jellyfin might need a while to refresh. We change the date added property on the item if the item hasn't been added yet.

Please try the revised
[Script] Set Jellyfin DateCreated property code. The code will now start by asking Jellyfin to refresh its libraries and then wait for 15 seconds. Hopefully that'll make it work right after
Rename.
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 18:35
by Stewart
Hi rednoah,
I have created user script using your code and edited first few lines as below.
def host = 192.0.168.06
def port = 8096
def auth = 1aa3449d1862402f92bb6e5d6e4aab58 Note! (This in red solid box white lettering is this highlighting an error?)
I then tick this user script in post processing section to execute when renaming files
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 19:13
by rednoah
Looks like you stripped the '...' that delimit the String value. That won't work.
Example code is this:
Groovy: Select all
def host = '127.0.0.1'
def port = 8096
def auth = 'YOUR_API_KEY'
So your code should be this
Groovy: Select all
def host = '192.0.168.06'
def port = 8096
def auth = '1aa3449d1862402f92bb6e5d6e4aab58'
That should work. For testing and debugging you can also run the code in the script editor. That'll use the most recently renamed files as sample data and give you some debug output. It'll also tell you about syntax errors.
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 19:43
by Stewart
Hi rednoah,
Ran script after delimiters and now works great
Thanks that's save me a lot of time
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 30 Sep 2025, 21:23
by Stewart
Hi rednoah
Sorry it’s still not working thought it was but looked at some that i changed myself
Dont see any syntax errors so dont know why its not working
Any ideas
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 01 Oct 2025, 05:52
by rednoah

You can add a few
println to see what's happening / not happening:
Groovy: Select all
def host = '192.0.168.6'
def port = 8096
def auth = '1aa3449d1862402f92bb6e5d6e4aab58'
// refresh and wait
curl "http://${host}:${port}/Library/Refresh", [:], Authorization: "MediaBrowser Token=$auth"
// sleep 15000
// get all items
def r = curl "http://$host:$port/Items?Recursive=true&Fields=Path,Genres,SortName,Studios,Writer,Taglines,LocalTrailerCount,OfficialRating,CumulativeRunTimeTicks,ItemCounts,Metascore,AirTime,DateCreated,People,Overview,CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,MediaSources,VoteCount,RecursiveItemCount,PrimaryImageAspectRatio", Authorization: "MediaBrowser Token=$auth"
// index items by folder name / file name
def index = r.Items.findAll{ it.MediaType == 'Video' }.groupBy{ it.Path.toFile().getRelativePathTail(2) }
println "INDEX: ${index.size()}"
model.each{ source, target ->
println "FILE: ${target.getRelativePathTail(2)}"
// lookup item by folder name / file name
index[target.getRelativePathTail(2)].each{
println "UPDATE: $it.Id"
it.DateCreated = d.format(/yyyy-MM-dd/)
// update item
curl "http://$host:$port/Items/$it.Id", it, Authorization: "MediaBrowser Token=$auth"
}
?: "FILE NOT FOUND: $target"
}

What does the output say when you run it in the script editor for testing? A working run might look like this:

Re: Date Added Change To Date Created In Jellyfin
Posted: 01 Oct 2025, 14:36
by Stewart
Hi rednoah,
Think I copied and pasted correct but see log below
Code: Select all
Run Script
POST http://192.168.0.5:8096/Library/Refresh {}
GET http://192.168.0.5:8096/Items?Recursive=true&Fields=Path,Genres,SortName,Studios,Writer,Taglines,LocalTrailerCount,OfficialRating,CumulativeRunTimeTicks,ItemCounts,Metascore,AirTime,DateCreated,People,Overview,CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,MediaSources,VoteCount,RecursiveItemCount,PrimaryImageAspectRatio
INDEX: 5311
FILE: The Lost Century - And How to Reclaim It (2023) [tmdbid-1136906]/The Lost Century - And How to Reclaim It (2023) - 1080p.mp4
[FILE NOT FOUND: /Volumes/Media/Movies/The Lost Century - And How to Reclaim It (2023) [tmdbid-1136906]/The Lost Century - And How to Reclaim It (2023) - 1080p.mp4]
DONE
Yes ip address is correct told you the wrong one sorry
I think file not found looks like error?
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 01 Oct 2025, 15:51
by rednoah
According to the log, your Jellyfin library does
not contain the file at hand:
Code: Select all
The Lost Century - And How to Reclaim It (2023) [tmdbid-1136906]/The Lost Century - And How to Reclaim It (2023) - 1080p.mp4
You can use the following code to see the file paths that are in your Jellyfin library:
Groovy: Select all
def host = '192.168.0.5'
def port = 8096
def auth = '1aa3449d1862402f92bb6e5d6e4aab58'
def r = curl "http://$host:$port/Items?Recursive=true&Fields=Path,Genres,SortName,Studios,Writer,Taglines,LocalTrailerCount,OfficialRating,CumulativeRunTimeTicks,ItemCounts,Metascore,AirTime,DateCreated,People,Overview,CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,MediaSources,VoteCount,RecursiveItemCount,PrimaryImageAspectRatio", Authorization: "MediaBrowser Token=$auth"
r.Items.findAll{
println "[$it.MediaType] $it.Path"
}
Re: Date Added Change To Date Created In Jellyfin
Posted: 01 Oct 2025, 19:16
by Stewart
Hi rednoah
Path Reported was as follows
/volume1/Media/Movies/The Lost Century - And How to Reclaim It (2023) [tmdbid-1136906]/The Lost Century - And How to Reclaim It (2023) - 1080p.mp4
This is correct and where all my movies are?
Regards
Stewart
Re: Date Added Change To Date Created In Jellyfin
Posted: 01 Oct 2025, 21:49
by rednoah
That can't be right. It's either in the list or it isn't. It can't be both. Unless something changed over time.

What does the output say for this one? I've added even more debug output:
Groovy: Select all
def host = '192.168.0.5'
def port = 8096
def auth = '1aa3449d1862402f92bb6e5d6e4aab58'
// refresh and wait
curl "http://${host}:${port}/Library/Refresh", [:], Authorization: "MediaBrowser Token=$auth"
sleep 5000
// get all items
def r = curl "http://$host:$port/Items?Recursive=true&Fields=Path,Genres,SortName,Studios,Writer,Taglines,LocalTrailerCount,OfficialRating,CumulativeRunTimeTicks,ItemCounts,Metascore,AirTime,DateCreated,People,Overview,CriticRating,CriticRatingSummary,Etag,ShortOverview,ProductionLocations,Tags,ProviderIds,ParentId,RemoteTrailers,SpecialEpisodeNumbers,MediaSources,VoteCount,RecursiveItemCount,PrimaryImageAspectRatio", Authorization: "MediaBrowser Token=$auth"
// index items by folder name / file name
def index = r.Items.findAll{ it.MediaType == 'Video' }.groupBy{ it.Path.toFile().getRelativePathTail(2) }
println "INDEX: ${index.size()}"
model.each{ source, target ->
def key = target.getRelativePathTail(2)
if (key in index) {
// lookup item by folder name / file name
index[key].each{
println "UPDATE: $it.Id"
it.DateCreated = d.format(/yyyy-MM-dd/)
// update item
curl "http://$host:$port/Items/$it.Id", it, Authorization: "MediaBrowser Token=$auth"
}
} else {
index.each{ k, v -> println "* [$key] ≠ [$k]" }
}
}
println ""
That'll either print
UPDATE or
* [A] ≠ [A] and the latter can't possibly be because A = A.