Movie Mode : hr:min:sec format
Movie Mode : hr:min:sec format
I would like to use hours,minutes and seconds to achieve the duration of a movie in the format of hours : minutes : seconds for example using 412 seconds is 6 minutes and 56 seconds or 6:56 . if the math is 412/60 = 6 and56/60 seconds. how is this done ? so the output is 6:56 thank you for the help! John
Re: Movie Mode : hr:min:sec format
e.g.
We're using ∶ ratio instead of : colon since the latter is not allowed in file paths.
Code: Select all
{ duration.format('HH∶mm∶ss') }

Re: Movie Mode : hr:min:sec format
using {d} can I format it like dec/25/2023?
Re: Movie Mode : hr:min:sec format
e.g.
Note that / is not allowed in file names.
Code: Select all
{ d.format('MMM dd yyyy') }

Re: Movie Mode : hr:min:sec format
IS there a way I can create an array to hold these :
array[1]="Sports"
array[2]="how to"
array[3} ="shorts"
Thank you for any Ideas , John
array[1]="Sports"
array[2]="how to"
array[3} ="shorts"
Thank you for any Ideas , John
Re: Movie Mode : hr:min:sec format
e.g.
https://docs.groovy-lang.org/latest/htm ... tml#_lists
Code: Select all
def names = ['A', 'B', 'C']

Re: Movie Mode : hr:min:sec format
Can I use that in to GUI??
Re: Movie Mode : hr:min:sec format
Yes. Format Expressions work the same in GUI and CLI.
Re: Movie Mode : hr:min:sec format
can I see an example of it in GUI? thank you, John
Re: Movie Mode : hr:min:sec format
What have you tried so far? Where are you stuck? Please include screenshots so that we can see what you see.
Re: Movie Mode : hr:min:sec format
Code: Select all
{def characters=["Mickey"," Minnie"," Donald" ,"Daisy"]} {assert characters instance of List}
Code: Select all
{"Main Charcter∶ " } {character.??? }
Re: Movie Mode : hr:min:sec format
What does the code you wrote try to do? The list is correct, but it's unclear what you're trying to do with that list.
Re: Movie Mode : hr:min:sec format
Code: Select all
{def characters=["Mickey"," Minnie"," Donald" ,"Daisy"]; characters instanceof List}
viewtopic.php?p=36619#p36619
viewtopic.php?p=56089#p56089
viewtopic.php?p=40459#p40459
maybe you can use this ?
Code: Select all
{ def Character = net.filebot.WebServices.TheTVDB.getActors(series.id, Locale.ENGLISH).character.findAll{it}.collect{it.split('/')*.replaceAll(/\s\(.*\)|\sand/, '')*.trim()*.tokenize(',')}.flatten().unique();
Character.take(4)
}
Code: Select all
[Daisy Duck, Huey, Dewey, Louie]
Code: Select all
[Daffy Duck, Bugs Bunny, Porky Pig, Speedy Gonzales]
Re: Movie Mode : hr:min:sec format
What does the code you wrote try to do? The list is correct, but it's unclear what you're trying to do with that list
I am trying to use it in renaming files with filebot(in Gui).such as
{"character :") ( character. name[1] } for Mickey Mouse. DO i have to define the List first?
I am trying to use it in renaming files with filebot(in Gui).such as
{"character :") ( character. name[1] } for Mickey Mouse. DO i have to define the List first?
Re: Movie Mode : hr:min:sec format
Don't write "code", but tell us the END RESULT you want and a sample show to test with.
?
=
bad code
This does like above but work:
you want "show" to = same characters in the way you want every time then use a CSV file like rednoah wrote back in 2018
viewtopic.php?p=36619#p36619
Code: Select all
{"character :") ( character.name[1] }
Code: Select all
{character.name[1]}
=No such property: character for class
bad code
This does like above but work:
Code: Select all
{ def Character = net.filebot.WebServices.TheTVDB.getActors(series.id, Locale.ENGLISH).character.findAll{it}.collect{it.split('/')*.replaceAll(/\s\(.*\)|\sand/, '')*.trim()*.tokenize(',')}.flatten().unique();
'character: ' + Character[0]
}
viewtopic.php?p=36619#p36619
something IN and output what you want4. Mappings from a CSV fileCode: Select all
{ csv('/path/to/names.csv').get(n) ?: n }
Re: Movie Mode : hr:min:sec format
Creating a list, and then taking the first element from that list would look like this:
The code above, if used as is, not useful, since it's just gonna yield the same constant value, thus functionally equivalent to just writing the value without any code at all:
Presumably, you want to retrieve the names of characters from your selected database. This may or may not be supported depending on your chosen database.
For TheMovieDB / Movie Mode this will work:
e.g.
If you want the same for episodes, then that is less well supported, and may or may not work for the individual episode from the chosen database, on a case-by-base basis:
e.g.
Code: Select all
{
def characters = ["Mickey", "Minnie", "Donald", "Daisy"]
characters[0]
}
Code: Select all
Mickey

For TheMovieDB / Movie Mode this will work:
Code: Select all
{ info.cast[0].character }
Code: Select all
$ filebot -list --db TheMovieDB --q 19995 --format "{ info.cast[0].character }"
Jake Sully
If you want the same for episodes, then that is less well supported, and may or may not work for the individual episode from the chosen database, on a case-by-base basis:
Code: Select all
{ episode.info.cast[0].character }
Code: Select all
$ filebot -list --db TheMovieDB::TV --q 01437 --format "{episode} => { episode.info.cast[0].character }"
Firefly - 1x01 - The Train Job => Lund
Firefly - 1x02 - Bushwhacked => Commander Harken
Firefly - 1x03 - Our Mrs. Reynolds =>
Firefly - 1x04 - Jaynestown => Magistrate Higgins
...