![]() |
|
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
|
||||
|
||||
AlbumID
According to the API's doc, there is no AlbumID in the AlbumAPI... Yet albums with the same name but different contents are treated separately, so obviously the Wiz.bin is using a unique key for those, but the API simply isn't exposing it. So any idea if there is any way to get to it? I tried to use ToString() on an album object, but it in wasn't there...
![]() |
#2
|
||||
|
||||
Easiest way is to look in the Stock STV and see how it tells them apart.
|
#3
|
||||
|
||||
Quote:
![]() So here's the motivation: I am developing a plugin for MainLobby which for efficiency reason basically needs its own database, using the relevant parts of SageTV's database for the Media Centre (i.e. Photos/Music/Videos). By using the MediaFileID of the photos/songs/videos as the primary key of the plugin's database, I ensure a 1:1 correspondence and it makes for easy updates. So the problem is that the Albums have no exposed ID, so while I can create arbitrary primary keys for the Albums table, on the next plugin's database update I would have to check the whole record, instead of just the primary key like for the other tables...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#4
|
||||
|
||||
Can't you use a MediaFileID as a surrogate?
albumID = album.GetAlbumTracks()[0].GetMediaFileForAiring().GetMediaFileID() album = mediaFileAPI.GetMediaFileForID(albumID).GetAlbumForFile() So long as you know that what you have in your hand is meant to be an AlbumID (and there are no empty albums), this ought to work.
__________________
-- Greg |
#5
|
||||
|
||||
Quote:
![]()
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#6
|
||||
|
||||
Quote:
OTOH, if I try to add that reconstructed album to a playlist {playlist.AddToPlaylist(album)}, nothing happens. I tried unwrapping album first, but that didn't work either. From album.GetAlbumName() I know that I have a proper album and the documentation says we can add an album to the playlist, which also happens to be how the STV adds it... Currently I have to loop and add individual songs from the album, but I would prefer to avoid that. ![]()
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
#7
|
||||
|
||||
Not seeing any obvious reason why it wouldn't work. Have you checked the debug log for error messages?
__________________
-- Greg |
#8
|
||||
|
||||
Yes, there was nothing special in the log. I guess I'll try something else.
EDIT: And now it started working using the unwrap method... Maybe I forgot to copy the .jar file when I tried it before... ![]()
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad Last edited by Fonceur; 08-31-2008 at 09:37 PM. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|