mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-28 03:18:27 +01:00
add subtitle language detection
This commit is contained in:
@@ -207,24 +207,6 @@ namespace SharpCifs.Util.Sharpen
|
||||
return (int)tzone.GetUtcOffset(MillisToDateTimeOffset(date, 0).DateTime).TotalMilliseconds;
|
||||
}
|
||||
|
||||
public static InputStream GetResourceAsStream(this Type type, string name)
|
||||
{
|
||||
//Type.`Assembly` property deleted
|
||||
//string str2 = type.Assembly.GetName().Name + ".resources";
|
||||
string str2 = type.GetTypeInfo().Assembly.GetName().Name + ".resources";
|
||||
string[] textArray1 = { str2, ".", type.Namespace, ".", name };
|
||||
string str = string.Concat(textArray1);
|
||||
|
||||
//Type.`Assembly` property deleted
|
||||
//Stream manifestResourceStream = type.Assembly.GetManifestResourceStream(str);
|
||||
Stream manifestResourceStream = type.GetTypeInfo().Assembly.GetManifestResourceStream(str);
|
||||
if (manifestResourceStream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return InputStream.Wrap(manifestResourceStream);
|
||||
}
|
||||
|
||||
public static long GetTime(this DateTime dateTime)
|
||||
{
|
||||
return new DateTimeOffset(DateTime.SpecifyKind(dateTime, DateTimeKind.Utc), TimeSpan.Zero).ToMillisecondsSinceEpoch();
|
||||
|
||||
Reference in New Issue
Block a user