mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 10:34:43 +01:00
Merge branch 'master' into network-rewrite
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace Emby.Server.Implementations.IO
|
||||
{
|
||||
public class ExtendedFileSystemInfo
|
||||
{
|
||||
public bool IsHidden { get; set; }
|
||||
|
||||
public bool IsReadOnly { get; set; }
|
||||
|
||||
public bool Exists { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -267,25 +267,6 @@ namespace Emby.Server.Implementations.IO
|
||||
return result;
|
||||
}
|
||||
|
||||
private static ExtendedFileSystemInfo GetExtendedFileSystemInfo(string path)
|
||||
{
|
||||
var result = new ExtendedFileSystemInfo();
|
||||
|
||||
var info = new FileInfo(path);
|
||||
|
||||
if (info.Exists)
|
||||
{
|
||||
result.Exists = true;
|
||||
|
||||
var attributes = info.Attributes;
|
||||
|
||||
result.IsHidden = (attributes & FileAttributes.Hidden) == FileAttributes.Hidden;
|
||||
result.IsReadOnly = (attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Takes a filename and removes invalid characters.
|
||||
/// </summary>
|
||||
@@ -403,19 +384,18 @@ namespace Emby.Server.Implementations.IO
|
||||
return;
|
||||
}
|
||||
|
||||
var info = GetExtendedFileSystemInfo(path);
|
||||
var info = new FileInfo(path);
|
||||
|
||||
if (info.Exists && info.IsHidden != isHidden)
|
||||
if (info.Exists &&
|
||||
((info.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) != isHidden)
|
||||
{
|
||||
if (isHidden)
|
||||
{
|
||||
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
|
||||
File.SetAttributes(path, info.Attributes | FileAttributes.Hidden);
|
||||
}
|
||||
else
|
||||
{
|
||||
var attributes = File.GetAttributes(path);
|
||||
attributes = RemoveAttribute(attributes, FileAttributes.Hidden);
|
||||
File.SetAttributes(path, attributes);
|
||||
File.SetAttributes(path, info.Attributes & ~FileAttributes.Hidden);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -428,19 +408,20 @@ namespace Emby.Server.Implementations.IO
|
||||
return;
|
||||
}
|
||||
|
||||
var info = GetExtendedFileSystemInfo(path);
|
||||
var info = new FileInfo(path);
|
||||
|
||||
if (!info.Exists)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.IsReadOnly == readOnly && info.IsHidden == isHidden)
|
||||
if (((info.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly) == readOnly
|
||||
&& ((info.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden) == isHidden)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var attributes = File.GetAttributes(path);
|
||||
var attributes = info.Attributes;
|
||||
|
||||
if (readOnly)
|
||||
{
|
||||
@@ -448,7 +429,7 @@ namespace Emby.Server.Implementations.IO
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes = RemoveAttribute(attributes, FileAttributes.ReadOnly);
|
||||
attributes &= ~FileAttributes.ReadOnly;
|
||||
}
|
||||
|
||||
if (isHidden)
|
||||
@@ -457,17 +438,12 @@ namespace Emby.Server.Implementations.IO
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes = RemoveAttribute(attributes, FileAttributes.Hidden);
|
||||
attributes &= ~FileAttributes.Hidden;
|
||||
}
|
||||
|
||||
File.SetAttributes(path, attributes);
|
||||
}
|
||||
|
||||
private static FileAttributes RemoveAttribute(FileAttributes attributes, FileAttributes attributesToRemove)
|
||||
{
|
||||
return attributes & ~attributesToRemove;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Swaps the files.
|
||||
/// </summary>
|
||||
|
||||
28
Emby.Server.Implementations/Localization/Core/sn.json
Normal file
28
Emby.Server.Implementations/Localization/Core/sn.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"HeaderAlbumArtists": "Vaimbi vemadambarefu",
|
||||
"HeaderContinueWatching": "Simudzira kuona",
|
||||
"HeaderFavoriteSongs": "Nziyo dzaunofarira",
|
||||
"Albums": "Dambarefu",
|
||||
"AppDeviceValues": "Apu: {0}, Dhivhaisi: {1}",
|
||||
"Application": "Purogiramu",
|
||||
"Artists": "Vaimbi",
|
||||
"AuthenticationSucceededWithUserName": "apinda",
|
||||
"Books": "Mabhuku",
|
||||
"CameraImageUploadedFrom": "Mufananidzo mutsva vabva pakamera {0}",
|
||||
"Channels": "Machanewo",
|
||||
"ChapterNameValue": "Chikamu {0}",
|
||||
"Collections": "Akafanana",
|
||||
"Default": "Zvakasarudzwa Kare",
|
||||
"DeviceOfflineWithName": "{0} haasisipo",
|
||||
"DeviceOnlineWithName": "{0} aripo",
|
||||
"External": "Zvekunze",
|
||||
"FailedLoginAttemptWithUserName": "Vatadza kuloga chimboedza kushandisa {0}",
|
||||
"Favorites": "Zvaunofarira",
|
||||
"Folders": "Mafoodha",
|
||||
"Forced": "Zvekumanikidzira",
|
||||
"Genres": "Mhando",
|
||||
"HeaderFavoriteAlbums": "Madambarefu aunofarira",
|
||||
"HeaderFavoriteArtists": "Vaimbi vaunofarira",
|
||||
"HeaderFavoriteEpisodes": "Maepisodhi aunofarira",
|
||||
"HeaderFavoriteShows": "Masirisi aunofarira"
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
"Favorites": "我的最愛",
|
||||
"Folders": "資料夾",
|
||||
"Genres": "風格",
|
||||
"HeaderAlbumArtists": "專輯藝人",
|
||||
"HeaderAlbumArtists": "專輯歌手",
|
||||
"HeaderContinueWatching": "繼續觀看",
|
||||
"HeaderFavoriteAlbums": "最愛的專輯",
|
||||
"HeaderFavoriteArtists": "最愛的藝人",
|
||||
|
||||
Reference in New Issue
Block a user