PDA

View Full Version : Pb with gac:GetInformation



sonata31
November 19th, 2008, 04:35 AM
I have the code :



videoLibrary = GAC:new{var='videoLibrary',includeSubItemCount=0,i mageSize='M',fields='',count= DVDCount, useGP=1 };
...
function SelectItemFromVideoLibraryList(index)
videoLibrary:GetInformation(index,'DVDI',true);
NetRemote.SetVariable('NR.DVDplaying.Name', NetRemote.GetVariable('MP.DVDI.Name'));
end;


I run twice SelectItemFromVideoLibraryList(index) : in the second run I have NR.DVDplaying.Name with the value of the first run ???

sonata31
November 19th, 2008, 07:11 AM
Resolved with :



videoLibrary = GAC:new{var='videoLibrary',includeSubItemCount=0,i mageSize='M',fields='',count= DVDCount, useGP=1 };
...
function SelectItemFromVideoLibraryList(index)
videoLibrary:GetInformation(index,'DVDI',true);
end;

function SaveDVDInfos()
NetRemote.SetVariable('NR.DVDinfos.Name', NetRemote.GetVariable('MP.DVDI.Name'));
NetRemote.SetVariable('NR.DVDinfos.Cast', NetRemote.GetVariable('MP.DVDI.Cast'));
NetRemote.SetVariable('NR.DVDinfos.Genre', NetRemote.GetVariable('MP.DVDI.Genre'));
NetRemote.SetVariable('NR.DVDinfos.Duration', NetRemote.GetVariable('MP.DVDI.Duration'));
NetRemote.SetVariable('NR.DVDinfos.Synopsis', NetRemote.GetVariable('MP.DVDI.Synopsis'));
NetRemote.SetVariable('NR.DVDinfos.Duration', NetRemote.GetVariable('MP.DVDI.Duration'));
NetRemote.SetImageVariable('NR.DVDinfos.AlbumCover ', "image/jpg", NetRemote.GetVariable('MP.DVDI.AlbumCover'));
end;

NetRemote.RegisterVariableWatch('MP.DVDI.AlbumCove r', SaveDVDInfos);