Receiving TV Data

All about user-defined episode / movie / file name format expressions
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

That's what I alreasy tested without getting something.
But if it depends on the given metadata i can't rely on it.

I pass a variable holding the language to the batch that gets the data via FileBot.
Asume something like
SET language=%1
in the batch.

Can I somehow include this to the format like

--format "{n} - {s.pad(2)} - {e.pad(2)} - {t} - %language% - {airdate}"?

The first try didn't work.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Hi,

we discussed already the topic of comparing dates and you provided a solution by using milliseconds.
Away from Java this is not really convenient. So i wanted to ask for your opinion about the following approach.

You receive the airdate in format yyyy-mm-dd.
So what about some funtion like airdate.toNumber that converts this to a number yyyymmdd.
In Java this is simple. The same could be done with the custom date f.e. 2014-06-06 -> 20140606.
Now you would be able to simply compare this to dates.

What's your opinion?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

There's a new binding {age} which gives you the age in days.

Here's how I'd do what you suggested:

Code: Select all

{airdate.toString().removeAll(/\D/).toInteger()}
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Ah! Thanks! That's great!
I know that you created the new binding {age} and this is also very helpful in many cases.
But if you receive the airdate (not today) and want to compare it to any other date (not today) {age} doesn't help.

The approach

{airdate.toString().removeAll(/\D/).toInteger()}

looks much better. I will try.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

I tried it and it works great!
That's much more convenient and you can do things like
airdate.toString().removeAll(/\D/).toInteger() <= 20140608.
Thanks a lot!

Do you have an idea regarding the language parameter in the format?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Not sure what you're trying to do but you can read the environment the standard java way.

@see
http://docs.oracle.com/javase/7/docs/ap ... ng.String)
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Sorry for confusiing you. I was on the wrong road. But I shortly explain what I meant.

As you may remember I run all Filebot related stuff from batch under windows.
I tried to parametrize the cmd and my question was if this could be done for the format option.
So the format would get a parameter language f.e..
So it would nearly look like this

--format "{n} - {s.pad(2)} - {e.pad(2)} - {t} - %language% - {airdate}"

But now I came to the conclusion that the whole "--format" option can get a parameter.
The same is true for the "--lang" , "--filter" and others.
So in the batch I have something like

-list --db thetvdb --q %1 --lang %2 --filter %3 --format %4

thetvdb can be carried by a parameter as well.

And all the parameters can be set by my application.
That works fine.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Filebot version and german language

Post by Sheldon »

Hi,

just 2 small issues.

If I choose German as prefered language I still get English. Something wrong? Do I need some cmd setting?

And I think it would be a good idea to display the current Filebot version somewhrere in the app (f.e. in the window title)

Kind regards,

Sheldon
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

It seems that FileBot doesn't support Sereinjunkies data any more. What's the reason?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

* No reason to prefer SJ over TVDB
* Only used by German users
* I have since refused all requests of adding language specific data sources
* Very few people where actually using it
* Simplification
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Ok, thanks!

What changes did you do to the cmd for FileBot 4.3 Beta? I tried the jar and the app didn't start.
Normally cmd changes are the reason fpr that.
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Since you fail to provide any information that could help me guess on what the problem is, I'm just gonna guess you're not using Java 8.
FAQ wrote:Q: When I run filebot it fails with an UnsupportedClassVersionError. What does that mean?
If you get an error like Exception in thread "main" java.lang.UnsupportedClassVersionError: net/filebot/Main : Unsupported major.minor version 52.0 it means that you're running Java 6 or Java 7 and that you will need to upgrade to Java 8.
FYI you can always l look up the java -jar command in any of the packages that are uploaded as well.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Yes, I currently use Java 7.65. So FileBot 4.3 requires Java 8 there FileBot 4.2 works fine with my Java version.
Good to know!
Thanks!
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Will you bring the version to the gui somehow?
I know there is the -version option but to have in the gui would be helpful.
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

If you're using the latest revision. Press F5, then press F5 again. :o
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

I currently use the latest FileBot 4.2

F5 opens the Groovy Pad. Unfortunately the second F% does nothing
I only copied the latest jar. Do I need some groovy script?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

This will work for 4.3 or higher.

Image
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

So it doesn't work with FileBot 4.2. That's why I get this, right?

groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.runScript() is applicable for argument types: (java.lang.String) values: [fn:sysinfo]
at Script9.run(Script9.groovy:1)
at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:60)
at net.filebot.cli.GroovyPad$Runner$1.run(GroovyPad.java:235)

But it's good to know that it will be available in the future.
Thanks for the implementation of the info.

But you should place the info about how to get it somewhere.
Some short description like you provided above will help the other users to find it.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

I just read your latest announcement.
You should mention that Java 8 is required!
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

The Windows executable takes care of that. But you're bypassing that by running the jar directly, which is possible but not recommended.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

But if I switch to Java 8 it will work, yes?
Or is it only handled by the exe?
If so is there another way from the jar?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Only Java 8 or higher can execute the latest jar. The Windows executable checks the latest JTR, and either runs the jar with that, or displays an error message telling you to install the latest JRE 8.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Great, thanks!

But does it really make sense to switch to Java 8 now?
The official version is 7.67.
As I can see there is no official release yet.
The only available is a test or development release.
There is also no official release date.
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Java 8 has been officially released on March 18, 2014 and is available for Windows, Linux, Mac OS X, BSD, Solaris and Embedded Linux.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

rednoah wrote:* No reason to prefer SJ over TVDB
* Only used by German users
* I have since refused all requests of adding language specific data sources
* Very few people where actually using it
* Simplification

Oh, oh! It seems that removing SJ wasn't a good idea. :o
TVDB doesn't always provide the german episode title.
Actual example Defiance 0209.
Post Reply