INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need a bit of Theater View file caption help  (Read 964 times)

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Need a bit of Theater View file caption help
« on: July 02, 2007, 04:25:10 pm »

I have tried to make a few advanced expressions but failed misserably. Below I have written what I would like to accomplish with a bit of pseudo code. Would be great if someone could help me with the expression. Or maby someone could explain to me how the different parts are combined. I searched the help for some information but it did not exactly explain this. Only what each expression did on their own.

Here is what I would like to do:

if(isEqual([media type],video,1)
   if Name = "" show [Season]x[Episode],NP:[Number Plays] - [Last Played]
   else show [Season]x[Episode],NP:[Number Plays] - [Name]

if(isEqual([media type],audio,1)
   show [Name] - [Artist] - ([Album])
Logged
- I may not always believe what I'm saying

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Need a bit of Theater View file caption help
« Reply #1 on: July 03, 2007, 05:13:20 am »

Not entirly sure what you exactly want, but if you want an
if empty name then
   something
else then
   something else

then it should be easy to use the following:
Code: [Select]
If(IsEmpty([Name]), [Artist], [Name])
You write that you want the following (as i understand it...):
[Season]x[Episode],NP:[Number Plays] - [Last Played]

This means the following in a expression:
Code: [Select]
If(IsEmpty([Name]), [Season]x[Episode]/,NP:[Number Plays] - [Last Played], [Season]x[Episode]/,NP:[Number Plays] - [Name])
Which in total could be something like this:
Code: [Select]
If(IsEqual([Media Type], Video), If(IsEmpty([Name]), [Season]x[Episode]/,NP:[Number Plays] - [Last Played], [Season]x[Episode]/,NP:[Number Plays] - [Name])
, If(IsEqual([Media Type], Audio), [Name] - [Artist] - /([Album]/), Image file string))

Hope this helps. Haven't tried it out on videos, since i don't have any in my library here...
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Need a bit of Theater View file caption help
« Reply #2 on: July 03, 2007, 05:18:08 am »

For your info, ( ) and , are special chars which needs to be escaped with a / in order to display in a string.
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Need a bit of Theater View file caption help
« Reply #3 on: July 03, 2007, 11:45:26 am »

Wow. That worked. Almost as expected.... Thanks zirum!

The end result ended up like this:

If(IsEqual([Media Type], Video),
   If(IsEmpty([Episode]),/NP:[Number Plays] - [Name],
   S[Season]E[Episode]/ (NP:[Number Plays]/) - [Name]),
If(IsEqual([Media Type], Audio),
   [Name] - [Artist] - ([Album],
   [events] /(formatdate([date,0],d-MMM-yyyy/)) ||[people]))

I have no images yet, so I have not tested that. Also need to tune the actual output a bit. Don't look as good as I had hoped.

Someone have a suggestion to good text used for videos and series? I need something that looks ok and gives me the info I need.
Logged
- I may not always believe what I'm saying
Pages: [1]   Go Up