aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Localization/Core/fi.json68
-rw-r--r--Emby.Server.Implementations/Localization/Core/zh-TW.json8
-rw-r--r--Emby.Server.Implementations/Session/SessionManager.cs54
3 files changed, 87 insertions, 43 deletions
diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json
index 1bd906b8e..7d6ca0d79 100644
--- a/Emby.Server.Implementations/Localization/Core/fi.json
+++ b/Emby.Server.Implementations/Localization/Core/fi.json
@@ -1,6 +1,6 @@
{
- "HeaderLiveTV": "Netti-TV",
- "NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa",
+ "HeaderLiveTV": "TV-lähetykset",
+ "NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa.",
"NameSeasonUnknown": "Tuntematon Kausi",
"NameSeasonNumber": "Kausi {0}",
"NameInstallFailed": "{0} asennus epäonnistui",
@@ -8,9 +8,9 @@
"Music": "Musiikki",
"Movies": "Elokuvat",
"MixedContent": "Sekoitettu sisältö",
- "MessageServerConfigurationUpdated": "Palvelimen konfiguraatio on päivitetty",
- "MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen konfiguraatio-osa {0} on päivitetty",
- "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty {0}",
+ "MessageServerConfigurationUpdated": "Palvelimen asetukset on päivitetty",
+ "MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen asetusryhmä {0} on päivitetty",
+ "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}",
"MessageApplicationUpdated": "Jellyfin palvelin on päivitetty",
"Latest": "Viimeisin",
"LabelRunningTimeValue": "Kesto: {0}",
@@ -24,12 +24,12 @@
"HeaderFavoriteSongs": "Lempikappaleet",
"HeaderFavoriteShows": "Lempisarjat",
"HeaderFavoriteEpisodes": "Lempijaksot",
- "HeaderCameraUploads": "Kamera lataukset",
+ "HeaderCameraUploads": "Kamerasta lähetetyt",
"HeaderFavoriteArtists": "Lempiartistit",
"HeaderFavoriteAlbums": "Lempialbumit",
- "HeaderContinueWatching": "Jatka Katsomista",
- "HeaderAlbumArtists": "Albumiartistit",
- "Genres": "Lajipiiri",
+ "HeaderContinueWatching": "Jatka katsomista",
+ "HeaderAlbumArtists": "Albumin artistit",
+ "Genres": "Tyylilaji",
"Folders": "Kansiot",
"Favorites": "Suosikit",
"FailedLoginAttemptWithUserName": "Epäonnistunut kirjautumisyritys kohteesta {0}",
@@ -44,5 +44,53 @@
"Artists": "Artistit",
"Application": "Sovellus",
"AppDeviceValues": "Sovellus: {0}, Laite: {1}",
- "Albums": "Albumit"
+ "Albums": "Albumit",
+ "User": "Käyttäjä",
+ "System": "Järjestelmä",
+ "ScheduledTaskFailedWithName": "{0} epäonnistui",
+ "PluginUpdatedWithName": "{0} päivitetty",
+ "PluginInstalledWithName": "{0} asennettu",
+ "Photos": "Kuvat",
+ "ScheduledTaskStartedWithName": "{0} aloitettu",
+ "PluginUninstalledWithName": "{0} poistettu",
+ "Playlists": "Soittolistat",
+ "VersionNumber": "Versio {0}",
+ "ValueSpecialEpisodeName": "Erikois - {0}",
+ "ValueHasBeenAddedToLibrary": "{0} lisättiin mediakirjastoon",
+ "UserStoppedPlayingItemWithValues": "{0} toistaminen valmistui {1} laitteella {2}",
+ "UserStartedPlayingItemWithValues": "{0} toistaa {1} laitteella {2}",
+ "UserPolicyUpdatedWithName": "Käyttöoikeudet päivitetty käyttäjälle {0}",
+ "UserPasswordChangedWithName": "Salasana vaihdettu käyttäjälle {0}",
+ "UserOnlineFromDevice": "{0} on paikalla osoitteesta {1}",
+ "UserOfflineFromDevice": "{0} yhteys katkaistu {1}",
+ "UserLockedOutWithName": "Käyttäjä {0} kirjautui ulos",
+ "UserDownloadingItemWithValues": "{0} latautumassa {1}",
+ "UserDeletedWithName": "Poistettiin käyttäjä {0}",
+ "UserCreatedWithName": "Luotiin käyttäjä {0}",
+ "TvShows": "TV-Ohjelmat",
+ "Sync": "Synkronoi",
+ "SubtitlesDownloadedForItem": "Tekstitys ladattu {0}",
+ "SubtitleDownloadFailureFromForItem": "Tekstityksen lataaminen epäonnistui {0} - {1}",
+ "StartupEmbyServerIsLoading": "Jellyfin palvelin latautuu. Kokeile hetken kuluttua uudelleen.",
+ "Songs": "Kappaleet",
+ "Shows": "Ohjelmat",
+ "ServerNameNeedsToBeRestarted": "{0} vaatii uudelleenkäynnistyksen",
+ "ProviderValue": "Palveluntarjoaja: {0}",
+ "Plugin": "Laajennus",
+ "NotificationOptionVideoPlaybackStopped": "Videon toistaminen pysäytetty",
+ "NotificationOptionVideoPlayback": "Videon toistaminen aloitettu",
+ "NotificationOptionUserLockedOut": "Käyttäjä kirjautui ulos",
+ "NotificationOptionTaskFailed": "Ajastetun tehtävän ongelma",
+ "NotificationOptionServerRestartRequired": "Palvelimen uudelleenkäynnistys vaaditaan",
+ "NotificationOptionPluginUpdateInstalled": "Laajennuksen päivitys asennettu",
+ "NotificationOptionPluginUninstalled": "Laajennus poistettu",
+ "NotificationOptionPluginInstalled": "Laajennus asennettu",
+ "NotificationOptionPluginError": "Ongelma laajennuksessa",
+ "NotificationOptionNewLibraryContent": "Uusi sisältö lisätty",
+ "NotificationOptionInstallationFailed": "Asennusvirhe",
+ "NotificationOptionCameraImageUploaded": "Kameran kuva lisätty",
+ "NotificationOptionAudioPlaybackStopped": "Äänen toistaminen pysäytetty",
+ "NotificationOptionAudioPlayback": "Äänen toistaminen aloitettu",
+ "NotificationOptionApplicationUpdateInstalled": "Ohjelmistopäivitys asennettu",
+ "NotificationOptionApplicationUpdateAvailable": "Ohjelmistopäivitys saatavilla"
}
diff --git a/Emby.Server.Implementations/Localization/Core/zh-TW.json b/Emby.Server.Implementations/Localization/Core/zh-TW.json
index 33bdbfb98..3b0dc4ab2 100644
--- a/Emby.Server.Implementations/Localization/Core/zh-TW.json
+++ b/Emby.Server.Implementations/Localization/Core/zh-TW.json
@@ -50,10 +50,10 @@
"NotificationOptionCameraImageUploaded": "相機相片已上傳",
"NotificationOptionInstallationFailed": "安裝失敗",
"NotificationOptionNewLibraryContent": "已新增新內容",
- "NotificationOptionPluginError": "外掛失敗",
- "NotificationOptionPluginInstalled": "外掛已安裝",
- "NotificationOptionPluginUninstalled": "外掛已移除",
- "NotificationOptionPluginUpdateInstalled": "已更新外掛",
+ "NotificationOptionPluginError": "擴充元件安裝失敗",
+ "NotificationOptionPluginInstalled": "擴充元件已安裝",
+ "NotificationOptionPluginUninstalled": "擴充元件已移除",
+ "NotificationOptionPluginUpdateInstalled": "已更新擴充元件",
"NotificationOptionServerRestartRequired": "伺服器需要重新啟動",
"NotificationOptionTaskFailed": "排程任務失敗",
"NotificationOptionUserLockedOut": "使用者已鎖定",
diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index 0bba19f2a..e2cee5b03 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -67,17 +67,17 @@ namespace Emby.Server.Implementations.Session
public event EventHandler<GenericEventArgs<AuthenticationResult>> AuthenticationSucceeded;
/// <summary>
- /// Occurs when [playback start].
+ /// Occurs when playback has started.
/// </summary>
public event EventHandler<PlaybackProgressEventArgs> PlaybackStart;
/// <summary>
- /// Occurs when [playback progress].
+ /// Occurs when playback has progressed.
/// </summary>
public event EventHandler<PlaybackProgressEventArgs> PlaybackProgress;
/// <summary>
- /// Occurs when [playback stopped].
+ /// Occurs when playback has stopped.
/// </summary>
public event EventHandler<PlaybackStopEventArgs> PlaybackStopped;
@@ -690,7 +690,7 @@ namespace Emby.Server.Implementations.Session
}
/// <summary>
- /// Used to report playback progress for an item
+ /// Used to report playback progress for an item.
/// </summary>
/// <returns>Task.</returns>
public async Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated)
@@ -1383,20 +1383,16 @@ namespace Emby.Server.Implementations.Session
user = _userManager.GetUserByName(request.Username);
}
- if (user != null)
+ if (user == null)
{
- // TODO: Move this to userManager?
- if (!string.IsNullOrEmpty(request.DeviceId)
- && !_deviceManager.CanAccessDevice(user, request.DeviceId))
- {
- throw new SecurityException("User is not allowed access from this device.");
- }
+ AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
+ throw new SecurityException("Invalid username or password entered.");
}
- if (user == null)
+ if (!string.IsNullOrEmpty(request.DeviceId)
+ && !_deviceManager.CanAccessDevice(user, request.DeviceId))
{
- AuthenticationFailed?.Invoke(this, new GenericEventArgs<AuthenticationRequest>(request));
- throw new SecurityException("Invalid user or password entered.");
+ throw new SecurityException("User is not allowed access from this device.");
}
if (enforcePassword)
@@ -1439,14 +1435,13 @@ namespace Emby.Server.Implementations.Session
DeviceId = deviceId,
UserId = user.Id,
Limit = 1
-
}).Items.FirstOrDefault();
- var allExistingForDevice = _authRepo.Get(new AuthenticationInfoQuery
- {
- DeviceId = deviceId
-
- }).Items;
+ var allExistingForDevice = _authRepo.Get(
+ new AuthenticationInfoQuery
+ {
+ DeviceId = deviceId
+ }).Items;
foreach (var auth in allExistingForDevice)
{
@@ -1503,7 +1498,6 @@ namespace Emby.Server.Implementations.Session
{
Limit = 1,
AccessToken = accessToken
-
}).Items.FirstOrDefault();
if (existing != null)
@@ -1696,23 +1690,24 @@ namespace Emby.Server.Implementations.Session
throw new ArgumentNullException(nameof(itemId));
}
- //var item = _libraryManager.GetItemById(new Guid(itemId));
+ var item = _libraryManager.GetItemById(new Guid(itemId));
- //var info = GetItemInfo(item, null, null);
+ var info = GetItemInfo(item, null);
- //ReportNowViewingItem(sessionId, info);
+ ReportNowViewingItem(sessionId, info);
}
public void ReportNowViewingItem(string sessionId, BaseItemDto item)
{
- //var session = GetSession(sessionId);
+ var session = GetSession(sessionId);
- //session.NowViewingItem = item;
+ session.NowViewingItem = item;
}
public void ReportTranscodingInfo(string deviceId, TranscodingInfo info)
{
- var session = Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId));
+ var session = Sessions.FirstOrDefault(i =>
+ string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase));
if (session != null)
{
@@ -1727,8 +1722,9 @@ namespace Emby.Server.Implementations.Session
public SessionInfo GetSession(string deviceId, string client, string version)
{
- return Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) &&
- string.Equals(i.Client, client));
+ return Sessions.FirstOrDefault(i =>
+ string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase)
+ && string.Equals(i.Client, client, StringComparison.OrdinalIgnoreCase));
}
public SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion)