Search found 128 matches

by Wolfie
24 Jul 2024, 06:31
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Format: Select all

return /\d/
Returns /d

Same if I do '\\d' or "\\d"
by Wolfie
24 Jul 2024, 01:14
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Trying to do it for regex purposes, like "\d" to match a digit.
by Wolfie
23 Jul 2024, 18:18
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Okay... how do I get a backslash to stay a backslash when it's not being used in a pathname? No matter what I try, "\" is being changed to "/" when I need it to remain a "\."
by Wolfie
23 Jul 2024, 08:00
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

rednoah wrote: 23 Jul 2024, 07:59 Cheers to that! 🍻
Found it...

viewtopic.php?p=22576#p22576
by Wolfie
23 Jul 2024, 07:52
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Using @lines already. But I might swap the order of how it's working. Idea is that sometimes, movies aren't considered part of a collection even though they should be. Not FileBot's fault, of course, as it's relying on the information it grabs. So idea is to allow for fixing that, or for overriding ...
by Wolfie
23 Jul 2024, 07:00
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Doesn't that make it more complicated with having to use {}'s and []'s? Groovy syntax is definitely more complicated than JSON syntax, because the former does a lot more, and the latter is just meant to be a simple structured data notation. That said, you can use whatever works best for you. I'm ...
by Wolfie
23 Jul 2024, 05:24
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

String.stripReleaseInfo(boolean strict) does exist. There is no parameterless method of that name though. So value.stripReleaseInfo() won't work, and need to pass a paramater? def configs=include "P:/FileBot/config.groovy" If you're using include() just to create a structured data object for your ...
by Wolfie
23 Jul 2024, 05:02
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

Format: Select all

def configs=include "P:/FileBot/config.groovy"
That seems to be working.

Also, did "stripReleaseInfo()" get removed?
by Wolfie
23 Jul 2024, 04:54
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: How do I read a file into a variable?

:idea: If it's more about sharing a format between GUI and CLI, then How can I use the same format in both GUI and CLI? is the way to go. Problems. If I make the file and have the contents within {}'s, it's useless because I can't access the values. If I don't put the contents within {}'s, it ...
by Wolfie
23 Jul 2024, 04:08
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

Re: I got a new one for ya BlueNoah

You can use the csv() function to read a CSV / TSV file into a Map object. e.g. { def table = csv('/path/to/names.tsv') table[n] ?: n } $ cat ~/names.tsv Deep Space 9 DS9 How I Met Your Mother HIMYM Will need to take a look at that. So does a csv file have to have a "tsv" extension? 😉 I came across ...
by Wolfie
22 Jul 2024, 22:22
Forum: Scripting and Automation
Topic: How do I read a file into a variable?
Replies: 21
Views: 10762

How do I read a file into a variable?

Very simple. How do I read a file into a variable but treat it like it's importing code.

Code: Select all

A:Apple,
B:Banana,
S:Steak,
To have this...

Groovy: Select all

map=(file contents)
return map['A']
(returns "Apple")
by Wolfie
15 Jun 2024, 20:46
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

So then in the script, "ttags=(whatever)" still works, just Fb is throwing the warning as a precaution?
by Wolfie
15 Jun 2024, 16:52
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

When doing it in a script, I'm trying to pass "ttags" and get Invalid usage: --def ttags is not used and has no effect as a result. Using the command prompt directly, I get this: P:\FileBot>filebot -mediainfo --format "{defines} | {defines.qtags} | {fn}" --def "music=n" qtags="TD,IPT,One Two" * This ...
by Wolfie
15 Jun 2024, 08:43
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

Either I'm encountering a bug or I'm doing something wrong. I recall trying it when you initially showed it to me it worked. Now, when doing that same command, no matter what I try to use, it tells me that " This is not a -script call. The script parameter --def (name) has no effect. " Be it qtags ...
by Wolfie
01 Dec 2023, 07:58
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

Let's say that I have tags of TD,IPT, and "One Two," and all three are in a define.

--def qtags="%1" translates to --def qtags="TD,IPT,One Two"

How would I access it in the format file?
by Wolfie
01 Dec 2023, 07:16
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

:idea: You can use {label} and {defines} to access --def ut_label specifically or the all --def name=value parameters. So something like --def qtags="%1" would let me use {qtags} ? Would it already be in an array, or would I need to split it? If so, would splits honor quote marks (if separating by ...
by Wolfie
01 Dec 2023, 06:24
Forum: Scripting and Automation
Topic: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?
Replies: 19
Views: 11219

Re: What does "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" mean?

Would it be possible to add in tag support, where tags (comma separated) would be put into two arrays? {tags[0]} returns returns the first tag, etc. {tag['name']} returns true if the tag has been set (but false otherwise vs an error) So if I use a tag like "TD," then {tag['TD']} will return true ...
by Wolfie
21 Dec 2020, 17:25
Forum: Feature Requests and Bug Reports
Topic: Change : to -
Replies: 15
Views: 16202

Re: Change : to -

Try this: {ny} [{genre}, {director}, {vf}]/{plex.name} [{genre}, {director}, {vf}][subt] This gives me the following result: Bad Boys (1995) [Action, Michael Bay, 1080p]/Bad Boys (1995).eng [Action, Michael Bay, 1080p][subt] My fault, I used [ ] instead of { }. {ny} [{genre}, {director}, {vf ...
by Wolfie
20 Dec 2020, 19:33
Forum: Feature Requests and Bug Reports
Topic: Change : to -
Replies: 15
Views: 16202

Re: Change : to -

{plex.name} [{genre}, {director}, {vf}]/{plex.name} [{genre}, {director}, {vf}] This gives me the following result for the SRT file of a movie: Bad Boys (1995).eng [Action, Michael Bay, 1080p]/Bad Boys (1995).eng [Action, Michael Bay, 1080p] Is there a way to get rid of the '.eng' part or to get it ...
by Wolfie
08 Jun 2020, 23:18
Forum: Feature Requests and Bug Reports
Topic: Purchased licence (no email confirmation received when using hotmail.com email address)
Replies: 2
Views: 6059

Re: Purchased licence (no email confirmation received when using hotmail.com email address)

The reason it's called "hotmail" is because it burns all the legitimate email.

Gmail is tons better.
by Wolfie
03 Jun 2020, 07:55
Forum: Feature Requests and Bug Reports
Topic: Force re-hashing in GUI
Replies: 5
Views: 3414

Re: Force re-hashing in GUI

Closing and re-opening is what I'm trying to avoid since it's a nuisance and I'm a lazy butt. Any chance that it could also compare the file size so that if the file size is different, it will generate a new hash instead of using the old one simply based on the same filename?
by Wolfie
03 Jun 2020, 07:36
Forum: Feature Requests and Bug Reports
Topic: Force re-hashing in GUI
Replies: 5
Views: 3414

Re: Force re-hashing in GUI

Yes, the {crc32} tag. The fact that it's stored in memory for awhile can causes issues in certain circumstances, such as the one I mentioned above. I use it on a file, decide that the resulting file and such can be tinkered with, so I get a new file that is different (obviously), but then it hashes ...
by Wolfie
03 Jun 2020, 07:32
Forum: Feature Requests and Bug Reports
Topic: [Read timed out] TheTVDB is down
Replies: 6
Views: 14775

Re: [Read timed out] TheTVDB is down

When TheTVDB is down, then FileBot should create a temporal path to the future when the server will be working again and use that... 🤣 Why did I not think of this elegant yet simple solution? :oops: EDIT: FileBot r7624+1i now implements time travel. Mostly untested though. Might work. Might not, a ...
by Wolfie
03 Jun 2020, 07:23
Forum: Feature Requests and Bug Reports
Topic: Force re-hashing in GUI
Replies: 5
Views: 3414

Force re-hashing in GUI

I know about the -clear-cache option, but this is more of a case-by-case basis option. When using the GUI and matching files, if a filename has already been hashed, then it uses that previous value instead of doing a fresh hash of the file. Okay so far. However, if encoding the same (movie/episode ...
by Wolfie
03 Jun 2020, 07:02
Forum: Feature Requests and Bug Reports
Topic: Download .torrent on PC1 then download files on PC2?
Replies: 4
Views: 3348

Re: Download .torrent on PC1 then download files on PC2?

Not sure why you would want to do it, but there is an easy way. Have a script called that will copy the .torrent file to a share from PC2 where PC2's torrent client is monitoring for new torrents to download. Though to be honest, wouldn't it just be easier to have a script copy the contents to the ...