public void ReImportShare(Guid shareId)
        {
            CpAction       action       = GetAction("ReImportShare");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(shareId)
            };

            action.InvokeAction(inParameters);
        }
        public void ClientCompletedShareImport(Guid shareId)
        {
            CpAction       action       = GetAction("ClientCompletedShareImport");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(shareId)
            };

            action.InvokeAction(inParameters);
        }
        public void RemoveMediaItemAspectStorage(Guid aspectId)
        {
            CpAction       action       = GetAction("RemoveMediaItemAspectStorage");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(aspectId)
            };

            action.InvokeAction(inParameters);
        }
        public async Task <PlaylistRawData> ExportPlaylistAsync(Guid playlistId)
        {
            CpAction       action       = GetAction("X_MediaPortal_ExportPlaylist");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(playlistId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((PlaylistRawData)outParameters[0]);
        }
        public async Task <MediaItemAspectMetadata> GetMediaItemAspectMetadataAsync(Guid miamId)
        {
            CpAction       action       = GetAction("X_MediaPortal_GetMediaItemAspectMetadata");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(miamId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((MediaItemAspectMetadata)outParameters[0]);
        }
        public async Task <Share> GetShareAsync(Guid shareId)
        {
            CpAction       action       = GetAction("X_MediaPortal_GetShare");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(shareId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((Share)outParameters[0]);
        }
Example #7
0
        public bool DeletePlaylist(Guid playlistId)
        {
            CpAction       action       = GetAction("X_MediaPortal_DeletePlaylist");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(playlistId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((bool)outParameters[0]);
        }
        public Share GetShare(Guid shareId)
        {
            CpAction       action       = GetAction("GetShare");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(shareId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((Share)outParameters[0]);
        }
Example #9
0
        public async Task <Guid> CreateClientProfileAsync(Guid profileId, string profileName)
        {
            CpAction       action       = GetAction("CreateClientProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), profileName
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return(MarshallingHelper.DeserializeGuid((string)outParameters[0]));
        }
Example #10
0
        public async Task <bool> SetProfileImageAsync(Guid profileId, byte[] profileImage)
        {
            CpAction       action       = GetAction("SetProfileImage");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), profileImage != null && profileImage.Length > 0 ? Convert.ToBase64String(profileImage) : ""
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
Example #11
0
        public bool DeleteProfile(Guid profileId)
        {
            CpAction       action       = GetAction("DeleteProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((bool)outParameters[0]);
        }
Example #12
0
        public async Task <bool> UpdateProfileAsync(Guid profileId, string profileName, UserProfileType profileType, string profilePassword)
        {
            CpAction       action       = GetAction("UpdateUserProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), profileName, (int)profileType, profilePassword
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
Example #13
0
        public async Task <bool> ChangeProfileIdAsync(Guid profileId, Guid newProfileId)
        {
            CpAction       action       = GetAction("ChangeProfileId");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), MarshallingHelper.SerializeGuid(newProfileId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
 public async Task NotifyPlaybackAsync(Guid mediaItemId, bool watched)
 {
   CpAction action = GetAction("X_MediaPortal_NotifyPlayback");
   IList<object> inParameters = new List<object>
   {
     MarshallingHelper.SerializeGuid(mediaItemId),
     watched
   };
   await action.InvokeAsync(inParameters);
 }
        public MediaItemAspectMetadata GetMediaItemAspectMetadata(Guid miamId)
        {
            CpAction       action       = GetAction("GetMediaItemAspectMetadata");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(miamId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((MediaItemAspectMetadata)outParameters[0]);
        }
        public PlaylistRawData ExportPlaylist(Guid playlistId)
        {
            CpAction       action       = GetAction("ExportPlaylist");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(playlistId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((PlaylistRawData)outParameters[0]);
        }
        public ResourceProviderMetadata GetResourceProviderMetadata(Guid resourceProviderId)
        {
            CpAction       action       = GetAction("GetResourceProviderMetadata");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(resourceProviderId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((ResourceProviderMetadata)outParameters[0]);
        }
Example #18
0
        public async Task <bool> ClearAllUserDataAsync(Guid profileId)
        {
            CpAction       action       = GetAction("ClearAllUserData");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
        public ResourcePath ExpandResourcePathFromString(Guid resourceProviderId, string path)
        {
            CpAction       action       = GetAction("ExpandResourcePathFromString");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(resourceProviderId), path
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return(ResourcePath.Deserialize((string)outParameters[0]));
        }
        public bool DoesResourceProviderSupportTreeListing(Guid resourceProviderId)
        {
            CpAction       action       = GetAction("DoesResourceProviderSupportTreeListing");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(resourceProviderId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((bool)outParameters[0]);
        }
Example #21
0
        public async Task <bool> ClearUserAdditionalDataKeyAsync(Guid profileId, string key)
        {
            CpAction       action       = GetAction("ClearUserAdditionalDataKey");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), key
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
Example #22
0
        public async Task <bool> RenameProfileAsync(Guid profileId, string newName)
        {
            CpAction       action       = GetAction("RenameProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId), newName
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
Example #23
0
        public bool GetProfile(Guid profileId, out UserProfile userProfile)
        {
            CpAction       action       = GetAction("GetProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId)
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            userProfile = (UserProfile)outParameters[0];
            return(userProfile != null);
        }
 public async Task<MediaItem> LoadItemAsync(string systemId, Guid mediaItemId,
     IEnumerable<Guid> necessaryMIATypes, IEnumerable<Guid> optionalMIATypes, Guid? userProfile)
 {
   CpAction action = GetAction("X_MediaPortal_LoadItemId");
   IList<object> inParameters = new List<object> {systemId, MarshallingHelper.SerializeGuid(mediaItemId),
       MarshallingHelper.SerializeGuidEnumerationToCsv(necessaryMIATypes),
       MarshallingHelper.SerializeGuidEnumerationToCsv(optionalMIATypes),
       userProfile.HasValue ? MarshallingHelper.SerializeGuid(userProfile.Value) : null };
   IList<object> outParameters = await action.InvokeAsync(inParameters);
   return (MediaItem)outParameters[0];
 }
Example #25
0
        public async Task <bool> DownloadMetadataAsync(Guid mediaItemId, IEnumerable <MediaItemAspect> mediaItemAspects)
        {
            CpAction       action       = GetAction("X_MediaPortal_DownloadMetadata");
            IList <object> inParameters = new List <object>
            {
                MarshallingHelper.SerializeGuid(mediaItemId),
                mediaItemAspects
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((bool)outParameters[0]);
        }
Example #26
0
        public async Task <AsyncResult <UserProfile> > GetProfileAsync(Guid profileId)
        {
            CpAction       action       = GetAction("GetProfile");
            IList <object> inParameters = new List <object> {
                MarshallingHelper.SerializeGuid(profileId)
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            var userProfile = (UserProfile)outParameters[0];

            return(new AsyncResult <UserProfile>(userProfile != null, userProfile));
        }
 public async Task NotifyUserPlaybackAsync(Guid userId, Guid mediaItemId, int percentage, bool updatePlayDate = true)
 {
   CpAction action = GetAction("X_MediaPortal_NotifyUserPlayback");
   IList<object> inParameters = new List<object>
   {
     MarshallingHelper.SerializeGuid(userId),
     MarshallingHelper.SerializeGuid(mediaItemId),
     percentage,
     updatePlayDate
   };
   await action.InvokeAsync(inParameters);
 }
        public async Task <UsageStatistics> GetFeatureUsageStatisticsAsync(Guid profileId, string scope)
        {
            CpAction       action       = GetAction("GetFeatureUsageStatistics");
            IList <object> inParameters = new List <object>
            {
                MarshallingHelper.SerializeGuid(profileId),
                scope
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return((UsageStatistics)outParameters[0]);
        }
Example #29
0
        public async Task <AsyncResult <string> > GetUserAdditionalDataAsync(Guid profileId, string key, int dataNo = 0)
        {
            CpAction       action       = GetAction("GetUserAdditionalData");
            IList <object> inParameters = new List <object>
            {
                MarshallingHelper.SerializeGuid(profileId),
                key,
                dataNo
            };
            IList <object> outParameters = await action.InvokeAsync(inParameters);

            return(new AsyncResult <string>((bool)outParameters[1], (string)outParameters[0]));
        }
Example #30
0
        public bool SetUserAdditionalData(Guid profileId, string key, string data)
        {
            CpAction       action       = GetAction("SetUserAdditionalData");
            IList <object> inParameters = new List <object>
            {
                MarshallingHelper.SerializeGuid(profileId),
                key,
                data
            };
            IList <object> outParameters = action.InvokeAction(inParameters);

            return((bool)outParameters[0]);
        }