SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 05-22-2009, 11:55 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay got this figured out if I call tablerow= 1 for the first and do the rest starting at 1 position all is well

Thanks again Stuckless.
Reply With Quote
  #22  
Old 05-22-2009, 12:02 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
the actors are stored as "name -- role\n" where \n is a newline. So if you "trim" your element, you should be ok... not sure, buy you may need to do something like.

Code:
ActorCell=java_lang_String_trim(ActorCell)
Not sure if that correct or not, i'll let someone else chime in with how to "trim()" a string in the stv.
Reply With Quote
  #23  
Old 05-22-2009, 12:04 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Actually just calling out TableRow if worked great I just start at position 0 for spot 1 and posistion 1 for all the others when I am putting them together works great.

Another question there is there a call to get if no image was found?

thanks again
Reply With Quote
  #24  
Old 05-22-2009, 12:20 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
You'd create a new file object and then test if the file exists.
Reply With Quote
  #25  
Old 05-22-2009, 01:06 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by stuckless View Post
Not sure if that correct or not, i'll let someone else chime in with how to "trim()" a string in the stv.
Looks right to me.

Quote:
Originally Posted by PLUCKYHD View Post
Actually just calling out TableRow if worked great I just start at position 0 for spot 1 and posistion 1 for all the others when I am putting them together works great.
It may work great today but what if someday the string is formatted a bit differently? Will anybody looking at that code (including the future you) have the faintest idea why that test is in there or what it's meant to accomplish? If your goal is to get rid of leading and trailing white space, use the trim() method as stuckless suggested, because it says what it means and is relatively immune to minor format changes.

More generally, the key to writing good code is not to try things at random until something seems to work. It's to understand exactly what each line of code is meant to do, and express that in the code as clearly as possible.
__________________
-- Greg
Reply With Quote
  #26  
Old 05-22-2009, 01:15 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by GKusnick View Post
Looks right to me.





More generally, the key to writing good code is not to try things at random until something seems to work. It's to understand exactly what each line of code is meant to do, and express that in the code as clearly as possible.
Good point changed code to trim. I usually work in a fact if I can't get it working I try until I do, but then I go back and make sure I understand why that is working and if it is doing what I want once I understand it.

thanks again
Reply With Quote
  #27  
Old 05-22-2009, 01:43 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by PLUCKYHD View Post
Okay I know if I got starting 1 on the second and so on it will work

But I don't know what that symbol is to make sure I don't parse it from the first actor
that symbol is new line "\n" if you open the txt file in word pad (it supports unix encoding) "Jennifer Aniston.png" shows up on the next line...

Again like stuckless pointed out you are not parsing the information correctly and including extra characters that shouldn't be there.... look at the actor string in the meta .properties file for a movie and see how it is formatted then go through a logical exercise to figure out what you need to get just the actors name....
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #28  
Old 05-22-2009, 01:55 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by razrsharpe View Post
that symbol is new line "\n" if you open the txt file in word pad (it supports unix encoding) "Jennifer Aniston.png" shows up on the next line...

Again like stuckless pointed out you are not parsing the information correctly and including extra characters that shouldn't be there.... look at the actor string in the meta .properties file for a movie and see how it is formatted then go through a logical exercise to figure out what you need to get just the actors name....
Thanks Razor this has been resolved thanks to stuckless and GK
Reply With Quote
  #29  
Old 05-22-2009, 02:04 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
ya i just read the rest of the thread... thats what i get for not reading page 2 ... glad you figured it out
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #30  
Old 05-22-2009, 02:13 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by razrsharpe View Post
ya i just read the rest of the thread... thats what i get for not reading page 2 ... glad you figured it out
Appreciate you trying to help
Reply With Quote
  #31  
Old 05-25-2009, 07:39 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay back on this array

GetShowPeopleListInShow

It does return an array which is great the problem being that it returnes the Actor and the Role played in the following format

ActorName -- RoleInFilm

What would be the best method/means of parsing out the "--" and everything after it when grouping for a table. In other words I am calling out

groupedactors = GroupByArrayMethod(files,"GetPeopleListInShow")

Which groups them but not by actor name since the Role is taken into consideration during the grouping.

Is there a way to call GetPeopleListInShow before grouping and parse out/scrub the information that I don't want so it is not taken into consideration when grouping. Do I need to build my own array from the array above(is that even possible)

I know how to Substring and StringIndexOf but can't figure out how to get that called on "GetPeopleListInShow" Sense it is already an array of actors.

Any insight is appreciated.
Reply With Quote
  #32  
Old 05-26-2009, 11:40 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay I am getting somewhere my problem is I don't know how to work with the given array of GetPeopleListInShow as it just returns the java string.

How do I call out the Java seperators within this array (basically take it apart) to make a new array.
Reply With Quote
  #33  
Old 05-26-2009, 01:06 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Okay Maybe some code will help. I have someone helping me but I am not quite sure how I can loop the attached code. I have looped the videofiles already but not sure how to loop the actors. Any help is appreciated because doing it this way is long...

I also know I have some repeativeness/erros in there this was more a trial code to make sure I understood it correctly but I can't figure out how I would loop this sense the varaibles are everychanging it seems but they are constant on each next actor

code
Reply With Quote
  #34  
Old 05-26-2009, 02:03 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Problem Solved

Reply With Quote
  #35  
Old 05-28-2009, 05:48 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Greg,Stuckless,Andy,Anyone

I need your eyes to help me I have looked over this array that I build it works 90% of the time (which is not 100% ) I can't seem to pinpoint what is wrong. It seems to break down when I add searching to the AllVidFiles but I know they are still pulling right because I evaluated them. For instance it may break it down to 3 movies but the actor array is only being built for 2 of the 3 movies.

I know the filters above it for AllVidFiles are correct as they show the right results when I evaluate them. Everynow and then though the actor array seems to not build the list for a movie or two and I can't figure out why.

I could get it all on one screen cap sorry about that.

Also I have changed
If ActorNum < Size(RelativePath)
to
If ActorNum < Size(ActorSize)
ActorSize = GetPeopleInShowListInRole
I found that returns a correct count size to work off.

thanks again
page1
page2
Reply With Quote
  #36  
Old 05-28-2009, 07:40 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I think I fixed it but may come back
Reply With Quote
  #37  
Old 05-30-2009, 07:52 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Go another array/grouping giving me trouble

I can seem to get subcategories and categories to group together using data union

I tried filtering seperately but that didn't help either. If I change

Categories = DataUnion(SubCategories,Categories)
to
Categories = SubCategories
or
Categories = Categories

then they will pull correctly but I can't seem to get them to union

code
Reply With Quote
  #38  
Old 05-31-2009, 12:12 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
You need to consider what type of data you want to end up with, what the API calls are expecting as parameters, and what the API calls return. You are creating groupings, then using DataUnion on those groups. The docs for DataUnion says it returns a vector. So: consider whether you are trying to end up with a) a grouping where you have items listed in the subgroup for each category in the group, or b) a simple flat list of category names.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing Tables bialio SageTV Studio 5 01-22-2008 01:17 PM
Building arrays of arrays in Studio evilpenguin SageTV Studio 2 02-15-2007 11:58 AM
Troubling Tables kuch68 SageTV Studio 5 09-13-2006 01:06 PM
Working with Arrays src666 SageTV Studio 2 11-12-2005 08:15 AM


All times are GMT -6. The time now is 02:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.