本文整理汇总了C#中JMMServer.Repositories.VideoLocalRepository.GetTotalRecordCount方法的典型用法代码示例。如果您正苦于以下问题:C# VideoLocalRepository.GetTotalRecordCount方法的具体用法?C# VideoLocalRepository.GetTotalRecordCount怎么用?C# VideoLocalRepository.GetTotalRecordCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JMMServer.Repositories.VideoLocalRepository
的用法示例。
在下文中一共展示了VideoLocalRepository.GetTotalRecordCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetUserInfoData
public static UserInfo GetUserInfoData(string dashType = "", string vidPlayer = "")
{
try
{
if (string.IsNullOrEmpty(ServerSettings.AniDB_Username)) return null;
UserInfo uinfo = new UserInfo();
uinfo.DateTimeUpdated = DateTime.Now;
uinfo.DateTimeUpdatedUTC = 0;
// Optional JMM Desktop data
uinfo.DashboardType = null;
uinfo.VideoPlayer = vidPlayer;
System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
try
{
if (a != null) uinfo.JMMServerVersion = Utils.GetApplicationVersion(a);
}
catch {}
uinfo.UsernameHash = Utils.GetMd5Hash(ServerSettings.AniDB_Username);
uinfo.DatabaseType = ServerSettings.DatabaseType;
uinfo.WindowsVersion = Utils.GetOSInfo();
uinfo.TraktEnabled = ServerSettings.Trakt_IsEnabled ? 1 : 0;
uinfo.MALEnabled = string.IsNullOrEmpty(ServerSettings.MAL_Username) ? 0 : 1;
uinfo.CountryLocation = "";
// this field is not actually used
uinfo.LastEpisodeWatchedAsDate = DateTime.Now.AddDays(-5);
JMMUserRepository repUsers = new JMMUserRepository();
uinfo.LocalUserCount = (int)(repUsers.GetTotalRecordCount());
VideoLocalRepository repVids = new VideoLocalRepository();
uinfo.FileCount = repVids.GetTotalRecordCount();
AnimeEpisode_UserRepository repEps = new AnimeEpisode_UserRepository();
List<AnimeEpisode_User> recs = repEps.GetLastWatchedEpisode();
uinfo.LastEpisodeWatched = 0;
if (recs.Count > 0)
uinfo.LastEpisodeWatched = Utils.GetAniDBDateAsSeconds(recs[0].WatchedDate);
return uinfo;
}
catch (Exception ex)
{
logger.ErrorException(ex.ToString(), ex);
return null;
}
}