Added api methods to mark an item as played or unplayed

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-09 22:30:34 -04:00
parent f68137ec4a
commit 614668a447
9 changed files with 130 additions and 23 deletions

View File

@@ -464,6 +464,22 @@ namespace MediaBrowser.ApiInteraction
}
}
/// <summary>
/// Updates played status for an item
/// </summary>
public async Task<DTOUserItemData> UpdatePlayedStatusAsync(Guid itemId, Guid userId, bool wasPlayed)
{
string url = ApiUrl + "/PlayedStatus?id=" + itemId;
url += "&userid=" + userId;
url += "&played=" + (wasPlayed ? "1" : "0");
using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
{
return DeserializeFromStream<DTOUserItemData>(stream);
}
}
/// <summary>
/// Updates a user's favorite status for an item and returns the updated UserItemData object.
/// </summary>