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 03-11-2011, 07:12 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Saving/Editing multiple categories

Following on from this post.
Quote:
Please let me know what API calls you're referring to with this. Each category is stored separately, we don't store them all together with a slash between them. And please start another thread to continue this discussion.
I'm now using
value="Movie/Action"
SetMediaFileMetadata(MediaFile, Genre, value)

A quick test in 7.1.4/5 using
value="Movie, Action"
SetMediaFileMetadata(MediaFile, Genre, value)
seems to work with the built in category edit functions, and display in the STV.

I used to use AddShow() to set Category and SubCategory, but changed with the advent of SetMediaFileMetadata()

John
Reply With Quote
  #2  
Old 03-11-2011, 07:37 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
If you use "Movie/Action" for in that Set call, then it'll set the Category to be Movie and the Subcategory to Action. If there's more than that (which is supported in V7.1.3+) then it tokenizes the string on the '/' or ';' characters and each token becomes a category in the original order, with the first one being the Category and second one being the SubCategory.

If you use "Movie, Action" then the category will be set to "Movie,Action". The only time these are broken up based on a comma delimiter is when the FilterByMethod call with "UserCategories" is used, or when the GroupByMethod call with "Categories" is used.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #3  
Old 03-11-2011, 08:36 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by Narflex View Post
If you use "Movie/Action" for in that Set call, then it'll set the Category to be Movie and the Subcategory to Action. If there's more than that (which is supported in V7.1.3+) then it tokenizes the string on the '/' or ';' characters and each token becomes a category in the original order, with the first one being the Category and second one being the SubCategory.

If you use "Movie, Action" then the category will be set to "Movie,Action". The only time these are broken up based on a comma delimiter is when the FilterByMethod call with "UserCategories" is used, or when the GroupByMethod call with "Categories" is used.
Okay I could have sworn it use to store with a comma delimiter before the betas started back uo for 7.1 as I thought Andy and I and stuckless had this talk befoe but that was long agon and I have slept and drank allot of beers since then .
Reply With Quote
  #4  
Old 03-11-2011, 11:24 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
There does seem to be an inconsistency with how the Edit Video Information in imported videos works though.

It uses SetMediaFileMetadata() to save the Genres but appears to be saving them as comma delimited. It also saves them in alphabetical order (No way to set Category v SubCategory).

When using SetMediaFileMetadata(),
with categories saved as comma delimited, each one shows as checkboxed in the Edit Video Information.
with categories saved as / delimited then the Edit Video Information only displays the first 2 categories as checked.

John
Reply With Quote
  #5  
Old 03-14-2011, 01:25 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
But, the default STV is doing things that way for its own specific reasons & that work was done before the core could handle having more than 2 categories associated with a video.

Could you re-explain what the issue is that being encountered? We aren't entirely sure what the problem is and what the goal is. Thanks.

- 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
  #6  
Old 03-14-2011, 01:44 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
After rereading this & looking at the STV code some more, I think I may know what needs to be done.

The STV is currently only checking the category & subcategory when creating the list of cats to edit - it needs to check all possible cats.

Then, when writing the cat list back out via SetMediaFileMetadata(), I'll change the default STV to use a slash-separated list instead of a comma separated list, so each cat will be a separate value in the metadata for the item. It will still handle reading a comma-separated list for backwards compatibility.

Because the default STV simply uses checkboxes to mark which cats to assign, it doesn't have a away to mark cat vs subcat, so there isn't a gauranteee which one will be listed as the main cat, though it may still be in alphabetical order for consistency.

Does this sound right and/or did I miss anything?

- 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
  #7  
Old 03-14-2011, 01:52 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
How would the following "Category" be processed using SetMediaFileMetadata("Genre", "Action/Adventure,Drama,Horror")

I'm curious, because I think BMT uses the comma to separate genres (categories) but it doesn't care if you use / in there as well... ie, it just passes it through. Should BMT change and set everything using a forward slash?
Reply With Quote
  #8  
Old 03-14-2011, 01:59 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by stuckless View Post
How would the following "Category" be processed using SetMediaFileMetadata("Genre", "Action/Adventure,Drama,Horror")
That would end up with a category of "Action" and a subcategory of "Adventure,Drama,Horror".

Quote:
I'm curious, because I think BMT uses the comma to separate genres (categories) but it doesn't care if you use / in there as well... ie, it just passes it through. Should BMT change and set everything using a forward slash?
I'm fairly sure the above category string you posted came about because of the previous ability to have only 2 separate categories. If you want all those values to be 4 separate categories for the new multi-cat capability, then it should be changed to use all slashes.

- 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
  #9  
Old 03-14-2011, 05:09 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Opus4 View Post
That would end up with a category of "Action" and a subcategory of "Adventure,Drama,Horror".

I'm fairly sure the above category string you posted came about because of the previous ability to have only 2 separate categories. If you want all those values to be 4 separate categories for the new multi-cat capability, then it should be changed to use all slashes.

- Andy
Thanks Andy. I'll make a note to update the bmt code to use slashes.
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
Categories adone36 SageTV Software 2 05-21-2009 02:51 PM
Categories / Subcategories gman4nj SageTV Customizations 1 12-28-2007 07:59 PM
EPG Categories Ian Davies SageTV EPG Service 1 10-06-2007 08:03 AM
How do categories work? rjudge SageTV Software 1 06-30-2006 09:33 PM
Import media to multiple categories... CarlG SageTV Customizations 0 04-09-2006 10:57 PM


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.