|
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
|
|||
|
|||
Help with creating a playlist from Temp Media Files
I am having issue creating a Playlist from Temporary created MediaFiles. The do not have a sage id (and won't) but then at the end I am adding a MediaFile that does have a sage id. The end result is only the MediaFile is getting added to the playlist.
I am using sagex to build this playlist in java as follows Code:
Object NewPlaylist = sagex.api.PlaylistAPI.AddPlaylist(NewPlaylistName); File[] TempFiles = ListOfTempFiles Code:
Object TempMediaFile = sagex.api.MediaFileAPI.CreateTempMediaFile(TempFiles[i].toString()); sagex.api.PlaylistAPI.AddToPlaylist(NewPlaylist,TempMediaFile); |
#2
|
|||
|
|||
To add to this on log printout it is creating the TempMediaFiles but it is giving them all the same MediaFileID of "0" should that be the case?
|
#3
|
||||
|
||||
I think when I played with this, i tried doing something very similar, and the result was that CreateTempMediaFile() could only ever create a single temp file, and a second call would simply overwrite the previous call. Because of that, I found CreateTempMediaFile to not have much value, especially when you could have multiple clients, etc.
I was using it to dynamically build up a playlist of .vob files so that I could watch DVDs on my placeshifter clients, but in the end, it didn't work. I thought that somewhere there was a discussion about it, but I'm not sure where, maybe for CreateTempMediaFile and you might hit on that thread as well.
__________________
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 |
#4
|
|||
|
|||
Quote:
Last edited by PLUCKYHD; 07-08-2010 at 01:32 PM. |
#5
|
||||
|
||||
This should work...the only caveat was that you can only add temp media files to the now playing playlist (since that's the only temporary playlist and you can't save a temporary media file into a persistent playlist which will exist in the DB). If it's not working as designed, let us know.
__________________
Jeffrey Kardatzke Founder of SageTV |
#6
|
||||
|
||||
Quote:
__________________
-- Greg |
#7
|
|||
|
|||
Quote:
But I am still not able to get this to work as it won't add my temp media files to the playlist even though it shows it creates the temp media file. I have changed the above to this Code:
Object NewPlaylist = sagex.api.PlaylistAPI.GetNowPlayingList(UIContext); Any ideas Greg? |
#8
|
||||
|
||||
When in doubt, strip it down to basics and see if that works. Then build back up from there.
For instance, try this in Expression Evaluator: Code:
AddToPlaylist(GetNowPlayingList(), CreateTempMediaFile("C:\\somedir\\somefile.mp3")) Now try writing a loop in widget code to add multiple files from an array. Test it using Execute Widget Chain. If that works, then try using sagex APIs instead of the built-in APIs. In short: debug. There's an error in some code somewhere, so test each piece in isolation to figure out where.
__________________
-- Greg |
#9
|
|||
|
|||
You said check if it shows up in music this works for videos too right? Just double checking I think so but your comment through me off.
And yes going to start in studio and do process of elimination thanks for the advice |
#10
|
||||
|
||||
Yes, it works for videos. Either playlist browser (music or video) can show you the contents of Now Playing.
__________________
-- Greg |
#11
|
|||
|
|||
Okay thanks for the clarification. I will start in studio using the default sage methods and go from there.
|
#12
|
|||
|
|||
From testing I don't think the nowplaying playlist shows up in the playlist section. I can add items to a the playlist and verify they are there by playing it but it does not show up in the playlist section of the ui.
|
#13
|
||||
|
||||
Sure it does. It's not in the quick-pick playlist flyout on the Main Menu, but if you actually enter the Playlists section of the music or video browser (using Select instead of right arrow, grrr), it's there.
__________________
-- Greg |
#14
|
|||
|
|||
Yup you are correct darn right arrow and select gets me everytime
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
settings related to live tv temp files? | vince100 | SageTV Software | 1 | 11-09-2009 06:51 AM |
stopping HD-PVR from creating files | tvmaster2 | Hardware Support | 8 | 09-07-2009 02:20 PM |
stvxxxxxxxxxxxxxxx.img files in C:\temp | mkanet | SageTV Software | 4 | 04-15-2009 11:28 AM |
Moving thumbs and other temp files? | MattHelm | SageTV Software | 3 | 02-19-2007 09:36 AM |
Creating and Repeating a Video Playlist | rolandtroisch | SageTV Studio | 2 | 02-06-2006 03:15 AM |