support theme songs in the web client

This commit is contained in:
Luke Pulverenti
2014-04-14 23:54:52 -04:00
parent 2913638b67
commit e89d4e605b
14 changed files with 189 additions and 47 deletions

View File

@@ -34,7 +34,10 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
{
var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase))
var isStandalone = args.Parent == null;
if (isStandalone ||
string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase))
{
return new Controller.Entities.Audio.Audio();
}

View File

@@ -450,5 +450,70 @@
"LabelMinResumeDuration": "Min resume duration (seconds):",
"LabelMinResumePercentageHelp": "Titles are assumed unplayed if stopped before this time",
"LabelMaxResumePercentageHelp": "Titles are assumed fully played if stopped after this time",
"LabelMinResumeDurationHelp": "Titles shorter than this will not be resumable"
"LabelMinResumeDurationHelp": "Titles shorter than this will not be resumable",
"TitleAutoOrganize": "Auto-Organize",
"TabActivityLog": "Activity Log",
"HeaderName": "Name",
"HeaderDate": "Date",
"HeaderSource": "Source",
"HeaderStatus": "Status",
"HeaderDestination": "Destination",
"HeaderProgram": "Program",
"HeaderClients": "Clients",
"LabelCompleted": "Completed",
"LabelFailed": "Failed",
"LabelSkipped": "Skipped",
"HeaderEpisodeOrganization": "Episode Organization",
"LabelSeries": "Series:",
"LabelSeasonNumber": "Season number:",
"LabelEpisodeNumber": "Episode number:",
"LabelEndingEpisodeNumber": "Ending episode number:",
"LabelEndingEpisodeNumberHelp": "Only required for multi-episode files",
"HeaderSupportTheTeam": "Support the Media Browser Team",
"LabelSupportAmount": "Amount (USD)",
"HeaderSupportTheTeamHelp": "Help ensure the continued development of this project by donating. A portion of all donations will be contributed to other free tools we depend on.",
"ButtonEnterSupporterKey": "Enter supporter key",
"DonationNextStep": "Once complete, please return and enter your supporter key, which you will receive by email.",
"AutoOrganizeHelp": "Auto-organize monitors your download folders for new files and moves them to your media directories.",
"AutoOrganizeTvHelp": "TV file organizing will only add episodes to existing series. It will not create new series folders.",
"OptionEnableEpisodeOrganization": "Enable new episode organization",
"LabelWatchFolder": "Watch folder:",
"LabelWatchFolderHelp": "The server will poll this folder during the 'Organize new media files' scheduled task.",
"ButtonViewScheduledTasks": "View scheduled tasks",
"LabelMinFileSizeForOrganize": "Minimum file size (MB):",
"LabelMinFileSizeForOrganizeHelp": "Files under this size will be ignored.",
"LabelSeasonFolderPattern": "Season folder pattern:",
"LabelSeasonZeroFolderName": "Season zero folder name:",
"HeaderEpisodeFilePattern": "Episode file pattern",
"LabelEpisodePattern": "Episode pattern:",
"LabelMultiEpisodePattern": "Multi-Episode pattern:",
"HeaderSupportedPatterns": "Supported Patterns",
"HeaderTerm": "Term",
"HeaderPattern": "Pattern",
"HeaderResult": "Result",
"LabelDeleteEmptyFolders": "Delete empty folders after organizing",
"LabelDeleteEmptyFoldersHelp": "Enable this to keep the download directory clean.",
"LabelDeleteLeftOverFiles": "Delete left over files with the following extensions:",
"LabelDeleteLeftOverFilesHelp": "Separate with ;. For example: .nfo;.txt",
"OptionOverwriteExistingEpisodes": "Overwrite existing episodes",
"LabelTransferMethod": "Transfer method",
"OptionCopy": "Copy",
"OptionMove": "Move",
"LabelTransferMethodHelp": "Copy or move files from the watch folder",
"HeaderLatestNews": "Latest News",
"HeaderHelpImproveMediaBrowser": "Help Improve Media Browser",
"HeaderRunningTasks": "Running Tasks",
"HeaderActiveDevices": "Active Devices",
"HeaderPendingInstallations": "Pending Installations",
"HeaerServerInformation": "Server Information",
"ButtonRestartNow": "Restart Now",
"ButtonRestart": "Restart",
"ButtonShutdown": "Shutdown",
"ButtonUpdateNow": "Update Now",
"PleaseUpdateManually": "Please shutdown the server and update manually.",
"NewServerVersionAvailable": "A new version of Media Browser Server is available!",
"ServerUpToDate": "Media Browser Server is up to date",
"ErrorConnectingToMediaBrowserRepository": "There was an error connecting to the remote Media Browser repository.",
"LabelComponentsUpdated": "The following components have been installed or updated:",
"MessagePleaseRestartServerToFinishUpdating": "Please restart the server to finish applying updates."
}

View File

@@ -1182,6 +1182,13 @@ namespace MediaBrowser.Server.Implementations.Session
if (session.UserId.HasValue)
{
dto.UserId = session.UserId.Value.ToString("N");
var user = _userManager.GetUserById(session.UserId.Value);
if (user != null)
{
dto.UserPrimaryImageTag = GetImageCacheTag(user, ImageType.Primary);
}
}
return dto;
@@ -1311,6 +1318,11 @@ namespace MediaBrowser.Server.Implementations.Session
}
}
if (backropItem == null)
{
backropItem = item.Parents.FirstOrDefault(i => i.HasImage(ImageType.Backdrop));
}
if (thumbItem == null)
{
thumbItem = item.Parents.FirstOrDefault(i => i.HasImage(ImageType.Thumb));
@@ -1322,7 +1334,7 @@ namespace MediaBrowser.Server.Implementations.Session
info.ThumbItemId = GetDtoId(thumbItem);
}
if (thumbItem != null)
if (backropItem != null)
{
info.BackdropImageTag = GetImageCacheTag(backropItem, ImageType.Backdrop);
info.BackdropItemId = GetDtoId(backropItem);