Search found 45 matches

by nls
01 Dec 2022, 11:54
Forum: Scripting and Automation
Topic: filebot can't use existing script (renall)
Replies: 5
Views: 978

Re: filebot can't use existing script (renall)

I'm using xattrs to store metadata so this might be a good fit. It also seems there are changes in functionality that make my life a bit easier. I'll try what's best for my use case, thanks.
by nls
01 Dec 2022, 10:52
Forum: Scripting and Automation
Topic: filebot can't use existing script (renall)
Replies: 5
Views: 978

Re: filebot can't use existing script (renall)

Thanks for the hints. I don't remember why I used the renall script in my shell script, I wrote it several years ago. All I want is to create symlinks that follow the Plex naming requirements in a temp directory, then in a separate step I convert all the generated symlinks absolute in the final targ...
by nls
30 Nov 2022, 22:48
Forum: Scripting and Automation
Topic: filebot can't use existing script (renall)
Replies: 5
Views: 978

Re: filebot can't use existing script (renall)

Just to note, this works:

Code: Select all

 ... -script /home/media/filebot/scripts/renall.groovy ...
by nls
30 Nov 2022, 19:32
Forum: Scripting and Automation
Topic: filebot can't use existing script (renall)
Replies: 5
Views: 978

filebot can't use existing script (renall)

It's been a while since I ran a scan for my TV shows and since then, there was an OS upgrade as well (Debian 10->11). There's this command I use in one of my scripts but now it refuses to work, and I don't fully understand why. filebot --encoding UTF-8 -rename --db xattr --action symlink --format &q...
by nls
02 Nov 2020, 11:54
Forum: Ubuntu & Desktop Linux
Topic: plex.tail.derive not working any more?
Replies: 4
Views: 8633

Re: plex.tail.derive not working any more?

:idea: Since passing formats on the command-line can be somewhat cumbersome, you may prefer to pass in your format via a Groovy script file: --format /path/to/my-format.groovy I know, thanks. It's inside a shell script so it's fine there. I remembered why I'm using renall. IIRC it's renaming per di...
by nls
02 Nov 2020, 09:19
Forum: Ubuntu & Desktop Linux
Topic: plex.tail.derive not working any more?
Replies: 4
Views: 8633

Re: plex.tail.derive not working any more?

plex.tail.derive is incorrect. It used to work, you suggested using it IIRC. Do plex.derive first: {plex.derive{" by $director"}{" [$vf, $vc, $ac]"}} and then pick the tail section from the result of plex.derive : {plex.derive{" by $director"}{" [$vf, $vc, $ac]&qu...
by nls
01 Nov 2020, 16:49
Forum: Ubuntu & Desktop Linux
Topic: plex.tail.derive not working any more?
Replies: 4
Views: 8633

plex.tail.derive not working any more?

I had to reinstall my server after a crash, and had to reinstall Filebot as well with a new fresh license (old one expired anyway). I wanted to refresh my TV section for Plex, and I'm running into an issue. The `plex.tail.derive` expression below produces an empty string. `plex.derive` does work, bu...
by nls
21 Apr 2019, 10:23
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

Ah, I see. The built-in help text isn't saying much about how it works and when it's called during a command, etc, I think the find analogy sheds enough light on it.
by nls
20 Apr 2019, 19:27
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

rednoah wrote: 20 Apr 2019, 18:44 Now that I understand your use case, I can give you a solution:

Code: Select all

--action "{ a, b -> a }"
Sorry for not giving enough details. This simple solution works, thanks! I disabled the symlinking workaround.

And sorry for the nag, but is there docs available for -exec somewhere?
by nls
20 Apr 2019, 18:43
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

:idea: I guess by using --action symlink you can trick FileBot into writing xattr to the original file, via writing xattr to the destination symlink, which links to the original. Yes, that's my current workaround. I need to clean up symlinks made to a temp dir, though, but that's not a problem. Cou...
by nls
20 Apr 2019, 18:36
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

Yes, it's intentional. This filebot pass is only to fill xattr metadata. I do 2 more passes on my files to accommodate my file hierarchy/structure.
by nls
20 Apr 2019, 18:32
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

I think I'll use my workaround for now. Your examples outright fail and I don't intend to dig deep into Groovy and the filebot API for such a simple function that otherwise works, except for custom user functions. It does the bulk of the work nicely, eg. finding files in online databases, thanks for...
by nls
20 Apr 2019, 17:52
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Re: Xattr metadata are not written when action is external command

Sorry, I'm not sure I understand that Groovy code in the action. What is a, b and why do I return File(b) (why not File(a))? Could you please give me the exact Groovy code that makes the xattr update work and I can just copy-paste it? Thanks.
by nls
20 Apr 2019, 10:19
Forum: Feature Requests and Bug Reports
Topic: Xattr metadata are not written when action is external command
Replies: 12
Views: 4572

Xattr metadata are not written when action is external command

If I use a command similar to the following: filebot --encoding UTF-8 -rename --db TheTVDB --action /bin/true -non-strict --file-filter 'f.isVideo() || f.isSubtitle()' --format '{plex.tail}' -r . Then xattr attributes like `user.net.filebot.metadata` are not written. If I use something like `--actio...
by nls
26 Dec 2018, 14:50
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

OK, finally it looks like it works perfectly. The final command line is: sudo -u media filebot --encoding UTF-8 -rename --db xattr --action symlink --format "/target_root/ { plex.tail.derive{ def x = model.count{ [it.ext, it.episode, it.lang] == [ext, episode, any{m.lang.ISO2}{null}] } return x...
by nls
26 Dec 2018, 11:15
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

The good news here is that your --file-filter doesn't do anything, and can be removed from the command, since --db xattr ignores non-xattr tagged files by default (unless -non-strict is set). -non-strict is a leftover from copy-pasting my 1st pass command line. It might not do anything for the rena...
by nls
25 Dec 2018, 10:49
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

Well, -script fn:renall doesn't seem to process any files for me. My command line is: filebot --encoding UTF-8 -rename --db xattr --action symlink -non-strict --file-filter "f.xattr['net.filebot.metadata'] != null" --format "/targetdir/ { plex.tail.derive{ def x = model.count{ [it.ext...
by nls
25 Dec 2018, 10:04
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

Sorry, I was mistaken, FG has specials almost each season, not double eps. Season 8 has the problematic double ep. I use a multi-pass approach: 1. scrape into xattrs 2. symlink to temp dir (using --db xattr) 3. convert relative symlinks to absolute (there really should be a switch to make them absol...
by nls
24 Dec 2018, 12:39
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

I ended up using this formula: { plex.tail.derive{ def x = model.count{ [it.ext, it.episode, it.lang] == [ext, episode, any{m.lang.ISO2}{null}] } return x > 1 ? \" - part\$di\" : null } } It's working nicely for individual directories with a season worth of files, but recursively scanning ...
by nls
23 Dec 2018, 22:16
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

While testing the model.count solution, I run into an issue when trying to extend the group condition. I need to extend it with the language, because .srt files of different languages for the same episode are detected as duplicates, eg: filename.eng.srt -> seriesname - SXEXX - title - part1.eng.srt ...
by nls
23 Dec 2018, 21:29
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

No, I escaped it properly... If I use "sudo -iu long_command", it breaks, if I use "sudo -u long_command", it works, the only difference being that -i option for sudo. I don't want to get to the bottom of it, since it works with one way and it isn't a filebot issue. (It must have...
by nls
23 Dec 2018, 21:16
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

I had that " - part" attached because some weird shell mishap involving sudo. Sorry, that issue does not exist, it was just my own mistake. The duplicate detection where filename.mkv and filename.srt is flagged as a dup still stands, I'll try to handle that using your suggestions above.
by nls
23 Dec 2018, 20:41
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

rednoah wrote: 23 Dec 2018, 20:28 1.
You can do a per-file extension duplicate index like so:

Code: Select all

{
	plex.tail.derive{
		def x = model.count{ [it.ext, it.episode] == [ext, episode] }
		return x > 1 ? " - part$x" : null
	}
}
Thanks, I'll try this tomorrow.
by nls
23 Dec 2018, 20:39
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

I might not have been accurate. I wanted to say that once a duplicate is detected in a file set, possibly spanning hundreds of series or seasons within them, dc never gets reset, regardless of series or season. That's why I had file names attached the " - part" segment for ALL files, not j...
by nls
23 Dec 2018, 20:02
Forum: Help and Support
Topic: Condition for applying duplicate index pattern
Replies: 22
Views: 22810

Re: Condition for applying duplicate index pattern

One possible solution would be to introduce the concept of object hierarchies, based on scraped file metadata. Like how tv/series_name/season_no/file_type/episode forms a 5-level hierarchy. For handling duplicates, it would be sufficient to handle tv+series_name+season_no+file_type as a grouping par...