|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
API call to convert show title to file name?
When recording 'The Tonight Show with Conan O'Brien' Sage creates the recording file as:
TheTonightShowWithConanOBrien-xxxx-n.ts Is there an API call that will convert the full show title to that used in the file name for the recording (i.e. remove puncuation, spacing, etc. as SageTV does when creating files)? Or is Sage perhaps using a Java API call that I'm over looking?
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#2
|
||||
|
||||
What are you trying to accomplish? You can easily get the filename(s) for an existing recording w/o trying to build it yourself.
- 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. |
#3
|
|||
|
|||
Excellent point, assuming that Sage will always drop hyphens from show names then I can just take everything in front of the first hyphen in the file name? (reply to a post another user deleted)
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#4
|
||||
|
||||
I don't think there is an exposed function to do this, but, if I had to guess (and i am), then i'd think it would be something like this...
Code:
title = title.replaceAll("[^a-zA-Z0-9]","") + "-" + airingId + "-" + segmentNumber + "." + ext;
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
||||
|
||||
To my knowledge, there is no API contract to the effect that filenames shall have a particular format or obey a particular naming rule. In principle the core is free to name files as it sees fit, so long as it provides an API for obtaining the actual filename(s) chosen for an existing recording (which it does). It does not provide a way of predicting what the filename will be for a future recording, nor is there any guarantee that any prediction rule you come up with will remain valid in future versions.
So I guess I'm wondering the same thing Andy is: what is it you're trying to do that requires that sort of predictability?
__________________
-- Greg |
#6
|
||||
|
||||
Or to look at it another way:
What are you doing where you'll have a Show/Episode title string, but not a handle to the SageTV MediaFile/Airing object from which you could get the file handle (GetFileForSegment) Everything you do inside Sage revolves around having an Airing or MediaFile object/handle, including displaying the name (GetAiringTitle/GetShowTitle/GetShowEpisode called on the MediaFile/Airing object). Thus if you got the title string from the API, it's trivial to get the file name/path. Last edited by stanger89; 06-03-2009 at 02:45 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sort() API call sorts core's internal lists in place? | Slugger | SageTV Studio | 1 | 02-09-2009 01:30 PM |
Clarify the title/artist bit eg. [DVD TITLE] / [MOVIE TITLE]? | bcjenkins | SageMC Custom Interface | 1 | 12-31-2008 11:58 AM |
Using Keystroke API call...how do you send non-printable chars? | beelzerob | SageTV Studio | 23 | 03-02-2008 10:41 PM |
Call Batch File | scoful | SageTV Studio | 1 | 12-06-2006 10:31 PM |
Having trouble handling what an api call returns... | beelzerob | SageTV Studio | 2 | 05-31-2006 07:45 PM |