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
  #1  
Old 01-09-2010, 04:00 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Question on Sorting

Gents,

I'm working on an STV that displays TV Recordings, Imported Videos, DVDs and BluRays all at once and (hopefully) supports multiple grouping and sorting options. What is the best way to sort items if I want to sort them based on the result of different methods? For example, when sorting by title I need to use GetAiringTitle() for TV but GetShowEpisode() for other types of video. How do I get to a single list that contains all types of video sorted alphabetically by their title?

What I've got right now is separate lists for each type of video where each list is sorted using the proper method (TVList, VideoList, DVDList, BluRayList). I really hope I do not have to manually sort them all

Thanks,

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #2  
Old 01-09-2010, 04:55 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by tmiranda View Post
Gents,

I'm working on an STV that displays TV Recordings, Imported Videos, DVDs and BluRays all at once and (hopefully) supports multiple grouping and sorting options. What is the best way to sort items if I want to sort them based on the result of different methods? For example, when sorting by title I need to use GetAiringTitle() for TV but GetShowEpisode() for other types of video. How do I get to a single list that contains all types of video sorted alphabetically by their title?

What I've got right now is separate lists for each type of video where each list is sorted using the proper method (TVList, VideoList, DVDList, BluRayList). I really hope I do not have to manually sort them all

Thanks,

Tom
Why not filesGetMediaFiles("TVDBL")
SortByMethod(files,false,"GetShowTitle")

Unless I am misunderstanding what you are wanting/needing. You may have to use GetShowEpisde I can't remember but I believe one will work for both tv and videos.

If I am not mistaken that should work of course allot has changed with bmt so I could be wron.
Reply With Quote
  #3  
Old 01-09-2010, 05:38 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by PLUCKYHD View Post
Why not filesGetMediaFiles("TVDBL")
SortByMethod(files,false,"GetShowTitle")

Unless I am misunderstanding what you are wanting/needing. You may have to use GetShowEpisde I can't remember but I believe one will work for both tv and videos.

If I am not mistaken that should work of course allot has changed with bmt so I could be wron.
I want to sort the T's using GetAiringTitle and the rest using GetShowEpisode and then combine them into one list. There is no one method that works for all types of files, that is the problem.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #4  
Old 01-09-2010, 06:12 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by tmiranda View Post
I want to sort the T's using GetAiringTitle and the rest using GetShowEpisode and then combine them into one list. There is no one method that works for all types of files, that is the problem.
Not sure how to go about it in studio as I don't know if it will let you pass an expression In the sorting call but would be pretty easy to do in java.

As always more than willing to code it for you if needed but it will simply be

Gettitle(object mediaobject){
if(IsTV(mediaobject)){
return getairingtitle(mediaobject)}
else{
retune getepisodename(mediaobject)}
}

I would use sagex's calls to do this as it is object oriented as per above)
Reply With Quote
  #5  
Old 01-10-2010, 09:53 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
like plucky said the simplest way to do this is with some custom java code... i could have sworn the flux api had some code in there for specifically this purpose.... not sure though cause its been so damn long since i looked at the code. The ortus api definitely has this code in there... its very similar to what plucky wrote above in psuedocode.
__________________
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
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
Favorite Sorting bluenote SageTV Software 3 08-30-2008 03:56 PM
Sorting nathanm SageTV Studio 3 11-12-2006 11:15 AM
Sorting Recordings kummell SageTV Beta Test Software 0 01-30-2004 01:38 PM
Sorting recordings... jbuszkie SageTV Software 1 10-31-2003 06:21 PM
Sorting XMLTV drifting SageTV United Kingdom 3 08-28-2003 10:46 AM


All times are GMT -6. The time now is 06:04 PM.


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