{hours} is displayed as "HHH" instead of "HH:mm"

Support for Ubuntu and other Desktop Linux distributions
Post Reply
simmz
Posts: 5
Joined: 07 Apr 2017, 01:19

{hours} is displayed as "HHH" instead of "HH:mm"

Post by simmz »

Hello all, (mainly rednoah)

I'm simply trying to add the movie duration to my filenames using the {hours} expression. It's my understanding that it should be displayed as "1:42". Unfortunately i get "142" instead.

So my first question. Is 142 correct and it just requires further processing, or am I misreading the expression example

Code: Select all

hours	duration in HH:mm	0:23
Here is the current output:

Code: Select all

filebot -script fn:amc --action move --conflict override -non-strict -r -no-xattr --def music=y --def clean=y "movieFormat=/mnt/nas/Movies/{n} ({y}) {genres} {hours}" Always\ Be\ My\ Maybe\ \(2019\)\ \[Romance\,\ Comedy\].mp4 
Run script [fn:amc] at [Wed Sep 18 12:40:00 PDT 2019]
Parameter: music = y
Parameter: clean = y
Parameter: movieFormat = /mnt/nas/Movies/{n} ({y}) {genres} {hours}
Argument[0]: /home/me/Always Be My Maybe (2019) [Romance, Comedy].mp4
Input: /home/me/Always Be My Maybe (2019) [Romance, Comedy].mp4
Group: [Movie:Always Be My Maybe (2019)] => [Always Be My Maybe (2019) [Romance, Comedy].mp4]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/home/me/Always Be My Maybe (2019) [Romance, Comedy].mp4]
Stripping invalid characters from new path: /mnt/nas/Movies/Always Be My Maybe (2019) [Romance, Comedy] 1:42
[MOVE] from [/home/Forrest/Always Be My Maybe (2019) [Romance, Comedy].mp4] to [/mnt/nas/Movies/Always Be My Maybe (2019) [Romance, Comedy] 142.mp4]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
My second question is obvious, does anyone else have this issue? If so, please help :oops:

Here is my system info

Code: Select all

filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: 0.7.82
p7zip: p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,8 CPUs)
unrar: UNRAR 5.30 beta 2 freeware
Chromaprint: fpcalc version 1.2.0
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/snap.filebot/gvfs]
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_191
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 6 GB Max Memory / 22 MB Used Memory
OS: Linux (amd64)
HW: Linux Loki 5.2.14-1-default #1 SMP Tue Sep 10 10:52:01 UTC 2019 (374b0ae) x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/met/snap/filebot/24/data
Package: SNAP
License: FileBot License P9100343 (Valid-Until: 2020-08-30)
Done ヾ(@⌒ー⌒@)ノ
Any help would be appreciated.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {hours} is displayed as "HHH" instead of "HH:mm"

Post by rednoah »

{hours} works as expected as far as I can tell:

Code: Select all

filebot -mediainfo *.mkv --format {hours}
0:47

: is an invalid character on some file systems, so it's stripped by default:

Code: Select all

Stripping invalid characters from new path: /mnt/nas/Movies/Always Be My Maybe (2019) [Romance, Comedy] 1:42

You can use the -unixfs to turn off this feature, which should be fine as long as you only ever use Linux / Unix systems to access the files.

Code: Select all

-unixfs

Alternatively, you can use other unicode characters that aren't : but look similar, e.g. the ratio character:

Code: Select all

{hours.replace(/:/, /\u2236/)}
:idea: https://www.compart.com/en/unicode/U+2236
:idea: Please read the FAQ and How to Request Help.
simmz
Posts: 5
Joined: 07 Apr 2017, 01:19

Re: {hours} is displayed as "HHH" instead of "HH:mm"

Post by simmz »

Of course it's something that simple.

I really should have caught the line in the output.

Thanks for your help, it's greatly appreciated.
Post Reply