Receiving TV Data

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

Receiving TV Data

Post by Sheldon »

Hi,

how do you request and receive the TV data for episodes f.e.?
Can they be exported and stored somehow?

I would need such a mechanism for my enviroment.
Would be great to get them imported into a SQLite db.
A csv would be great.

I tried your hint with the parameter setting

-DuseExtendedAttributes=true

but I didn't get a xattr (NTFS filesystem is present) in json format.
Where can I find it?

Kind regards

Sheldon
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

You can use the xattr script to view xattr metadata.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Run Groovy script

Post by Sheldon »

Ooops!
You mean running the xattr.groovy, right?
I'm not really familiar with groovy.

Is it like running

filebot -script fn:xattr /path of the renamed files

in the FileBot dir?

But if I get it right it shows only the data for renamed files, or?

I want to do something different.
If i send a request in FileBot for episodes of a series I get a list of episode names.
Can this be stored somehow without renaming anything?

I see that the received episode names are stored in a temporary text file.
But if I apply my custom naming scheme where can I find this changed names
I see on the right side of the renaming screen?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

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 »

Can I run the jar instead of the exe?
You know I don't have java installed.
If so can you provide a syntax sample?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

I know that you have filebot.cmd and that one shows you all you need to know. ;)
: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! Next step done!
So far I have as an example

FileBot.jar " -list --db thetvdb --q Dexter --format "{n} - {s.pad(2)} - {e.pad(2)} - {t}" %*

at the end of my cmd.

According to the FileBot CLI this prints all episode names to the console in the given format.
That works fine. So I am quite close to reach my goal.
But how can I write this to a file.
I tries
--output output.txt
but this didn't work.

That's what I need!!!
I can't find it in the CLI.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

No, this searchs by --q query on the given --db and -list lists the data in --format, it might be what you want, but it's definitely not taking into account the files you pass in.

If you want -list to text you can use IO redirection, or just do it in the GUI with dragging Episodes to file.
: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 want a list of all episodes of a series in a text file.
A special episode is of no interest in my case.
I tried to redirect by

>> outpur.txt

at the end of the cmd but this doesn't work.

Later on I want to do this for all my series in a loop. So I need an automatism.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Ok! now I tried it again and the redirection works. :-)

So now I have a text file with all episodes of one series.
Is there a way to pass a list of series to FileBot so that I can get all episodes of all this series?

Ah! By the way!
I found the parameter

net/sourceforge/filebot/ui/transfer/save.location

in my prefs.properties.

What does this do and there can I set this?
Currently it links to my local desktop.
I don't think this is a good idea for a portable.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

1.
Make a shell script and call filebot -list for all your shows.

2.
Ignore that. It just tries to remember where the file chooser has been last.
: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! I works fine!
So thank you once again very, very much for your support.

As I can see from your profile you are from Taiwan.
So:

Xie xie ni!

Kind regard,

Sheldon
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

For the time being. :P

Gern geschehen!
: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 »

Dann hätten wir das Ganze ja gleich auf Deutsch machen können.
Und ich hatte mich schon gewundert, woher ein Chinese Serienjunkies kennt. :o
Ja, ja! Die Anonymität im Internet! :-)
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Let's switch back to English.

How do you specify a special season of a series in the cmd command.
I didn't see any special option for this in the Filebot CLI.
So I tried

--filter "(s =~ /1/)"

to get only episodes of season1.
But it didn't work.
Wrong syntax?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

You mean with the -list command? I guess that one just doesn't use the --filter option.
: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 how do you get all episodes of season 1 of a series?
You do this in the GUI.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

: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 »

No, not in the GUI. That I know.
I need it in my cmd command.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

On Unix systems you'd use grep:
http://linux.101hacks.com/unix/egrep/

There's probably a similar command for Windows if you Google for it.
: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 how does the windows GUI do it?
I mean the backend function for the GUI.

Or let's ask in a different way.
If I select a series, a season and a language in the GUI.
How does the cmd command look like that send the request to db=TheTVDB.com f. e..
You need to specify the season somewhere and somehow?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

No. TheTVDB only supports episode lists as a whole. You always get all episodes, and then you can filter out the ones you don't want.
: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 »

If I go to the GUI, switch to Rename and select f.e.

TheTVDb
True Blood
Season 1
Airdate Order
German

an press find
I get all True Blood episodes of Season 1.
How do you get this?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

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 »

This is for Unix/Linux but what aboiut the Windows version.
How dows the exe/jar handle it on Windows?
You must do it somehow?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

There's probably a similar command for Windows if you Google for it.
And we're full circle :D
@see http://stackoverflow.com/a/9109138

If I must do it, I do so on Linux. :lol:
: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 we have a full circle because you don't answer my question!
You have relesed a WINDOWS VERSION.
So how do YOU do it on WINDOWS?
How is it implemented in the jar?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

How do I do it on Windows? I have GnuWin32 utilities installed. :D
Image

How is it implemented in the jar? In compiled Java byte code that you cannot change.
https://sourceforge.net/p/filebot/code/ ... s.java#l12

Is the answer to any of those questions useful to you?
Probably not.

Do I have all the answers, that have little to do with FileBot, but lots with basic cmdline usage on Windows?
No.

Does Google have all the answers?
Yes.
: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! You do the filtering in the Java code not in the request!
Thanks! That helps!
So I have to integrate GnuWin32 into my PortableApps Platform.
Now I know what to do.

Thanks a lot for your support!

By the way! Wouldn't it be a good idea to extend the -list command to support --filter?
Or is this not on your side?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

In the latest revision it's implemented already. ;)
: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 »

Latest version? I run version 4.0.
In this it is not implemented, or?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

No, I implemented it yesterday, so it's not in the latest stable release.
: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! Great! So discussion leads to improvement! That's how it should be! :D
Can you already say when it will be available in a stable release?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Maybe 2-3 months. But you can always grab the latest jar from sourceforge. See FAQ.
: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! I grabbed the latest FileBot.jar from sourceforge but it seems that the windows GUI is not working with it. It simply doesn't open at all.
And I testet --filter "s=1" but it didn't get data at all.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

You need at least Java 7 now.

== not =

Code: Select all

--filter "s == 1"
: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 use the latest Java 7.55 but --filter "s == 1" doesn't get any data at all.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

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 »

No not for me!
The same procedure works with version 4.0 except the --filter.
So there is something wrong with the jar or the --filter syntax.
Do you use Java 7.55? Or is it a Windows issue?
The Filbot app doesn't start.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

FYI: FileBot 4.1 RC1 portable fails opening the GUI!
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Tested on Mac and it works just fine.

Please run it with cmdline and post the logs.
: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 »

Mac? You are joking, aren't you? :lol:
I tested it on Windows and it failed!
I only run it with the cmd command (java command).
Where do I find the logs? There are some files in FileBot\Cache\0. Do you need one of those?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

I was at the HCI lab at the time, but the point is it works on all platforms. I've tested Windows, Ubuntu and Mac and it works. If you want to see the console output you're can run filebot from cmdline either with filebot.cmd or java -jar FileBot.jar and then copy/paste what you see in the cmd window.
: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 »

Here is the exception:

Code: Select all

Apr 23, 2014 11:32:07 AM net.filebot.Main main
Schwerwiegend: Can't instantiate Preferences factory net.sourceforge.tuned.prefs
.FilePreferencesFactory
java.lang.InternalError: Can't instantiate Preferences factory net.sourceforge.t
uned.prefs.FilePreferencesFactory
        at java.util.prefs.Preferences.factory(Unknown Source)
        at java.util.prefs.Preferences.<clinit>(Unknown Source)
        at net.filebot.Settings.forPackage(Settings.java:111)
        at net.filebot.ui.MainFrame.<clinit>(MainFrame.java:65)
        at net.filebot.Main.startUserInterface(Main.java:255)
        at net.filebot.Main.access$000(Main.java:69)
        at net.filebot.Main$2.run(Main.java:209)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: net.sourceforge.tuned.prefs.FilePre
ferencesFactory
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        ... 21 more
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

For the bigger releases you might need to get the new package, and not just the jar. The configs have changed, and the new jar in not compatible with the old config.
: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 took the new package but it failed.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

This exact error message is not possible if you are using the latest configuration:

Code: Select all

Can't instantiate Preferences factory net.sourceforge.tuned.prefs.FilePreferencesFactory
So you probably copied the cmdline options at some point. But now you need to update them cause things changed.
: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 changed the cmd and now it works. The filter works as well. Great!
Are multiple filters possible?
I think about some somethings like --filter "s==1" "e == 10".

I found this setting -Dnet.filebot.AcoustID.fpcalc="%~dp0fpcalc.exe".
What is it? I could't find any fpcalc.exe.
Seems to be new.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

1.
No, but yes. 1 expression of arbitrary complexity:

Code: Select all

"s==1 && e == 10"
2.
fpcalc is the program that computes the acoustid finger prints. It's only required for audio identification.
: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 »

Thanks! It works fine! :D
Shouldn't the fpcalc.exe be in the zip?

Ah! It seems that something like "e>=10","e<>10" or "e<10" is not possible.
That would be helpful!
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

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 »

Yes! It's "e <= 10" instead of "e<=10".
Thanks!
I guess "not equal" is "!=". Right?
It's ok! I tested "!=" and it worked.

And for strings it's like this t == /Titel/ . Right?
That's how I tested it positive. :)
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

: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 see! Thanks!
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Hi,

can I filter the data by episode release date?

Kind regards,

Sheldon
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Sure, same as in the Format Dialog. You have {startdate} and {airdate} and maybe some other stuff I can't recall now.

e.g.

Code: Select all

startdate.year >= 2000
: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! :)
Do you have a list or collection of all parameters that can be used for filtering.
Maybe with samples, too!
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

It's the same as in the Format Expression. So you have the Naming docs online lots of examples built into the Format Editor(click the (x)= button).
: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! If I click the (x)-Button and one of the links that are shown in the list nothing happens.
I would expect an url to be opened in my Firefox.
Is there something missing in my enviroment and/or the cmd?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

In the Format Editor you can easily prototype any expression:
Image

In the Bindings dialog you can easily check what bindings are available and what values they may have:
Image

It's all self-documenting really, but if you want a link you can have one:
http://www.filebot.net/naming.html#bindings

(Linked all over the website AND from within the application if you click Syntax)
: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 »

Thanks!
I just wanted to mention that I can't access any link from the "Rename Options" dialog.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

What links? Or rather, what do you think should be a link? If you click one of the preset formats it'll switch to that format.
: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 mean this:
Rename Options.jpg
Probably a misunderstanding from my side.
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Yes, that's Rename Options. Specifically what to do with Extensions and what Rename Action do use. If you don't know what a "hardlink" or a "symlink" is you probably won't need any of those. If you click it, you'll set the given option, do don't click it. :D
: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 »

Currently I use

--filter "airdate.year == 2014 && airdate.month == 6 && airdate.day == 1"

to filter the airdate 2014-06-01.

This is a bit inconvinient. Is there another way like airdate."something" == 2014-06-01 ?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Try something like this:

Code: Select all

{airdate.toString() == '2001-09-30'}
: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 »

Yep! It works! Thanks!
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

Is there something simular for airdate >,>=,<,<= ?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

e.g.

Code: Select all

{airdate.timeStamp > 14e11}
@see
http://www.unixtimestamp.com/index.php

timeStamp => airdate in milliseconds
today's date in milliseconds => 14015808001000

PS: Newer revisions also support {age} which is the age (today - airdate) in days.
: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 »

Thanks!

But it seems not to work properly.

I tried airdate.timestamp <= 1401613113 but received nothing what I should.
Is it Unix specific or do you use GregorianCalandar?

I work on Windows.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

I tested it again. airdate.timestamp doesn't work. Wrong function?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

all code is case-sensitive
: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! It works! Thanks! :)
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Receiving TV Data

Post by Sheldon »

I couldn't find a binding for the audio language.
Is there something like:

--format "{n} - {s.pad(2)} - {e.pad(2)} - {t} - {lang} - {airdate}"?
User avatar
rednoah
The Source
Posts: 24640
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Receiving TV Data

Post by rednoah »

Image

Obviously that's based on metadata embedded in the file, which may or may not be available.
: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 »

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: 24640
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: 24640
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: 24640
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: 24640
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: 24640
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: 24640
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: 24640
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: 24640
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: 24640
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