fn:artwork.tvdb stopped working

Running FileBot from the console, Groovy scripting, shell scripts, etc
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: fn:artwork.tvdb stopped working

Post by rednoah »

What type is fs and what value does it have?

That'd be what I ask myself.


:idea: Code level debugging via forum message makes no sense. I cannot help you with these kinds of things. You'll need to figure it out yourself. It'd start by doing some basic Groovy tutorials to acquire some basic development and debugging abilities.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: fn:artwork.tvdb stopped working

Post by kim »

fs = [filepath+ filename]
fs.getClass() = class java.util.ArrayList
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: fn:artwork.tvdb stopped working

Post by rednoah »

kim wrote: 09 Jun 2017, 16:01 Is fs a File object? = yes
How did you come to that conclusion?

Hint: It's not. It's a List object that contains File objects.


:arrow: The rest is up to you. I'll unsubscribe from this thread now.


EDIT: I see you figured it out. You'll be fine.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: fn:artwork.tvdb stopped working

Post by kim »

probably not the best way to do it, but it works, finally :)
I spend hours on this

Code: Select all

if (fs[0].metadata instanceof MultiEpisode){
log.fine "fs[0].metadata: ${fs[0].metadata}"
log.fine "fs[0].metadata: ${fs[0].metadata.episodes.id}"
}

I just don't get why when it worked in GUI + Groovy Pad and not in script ?
Post Reply