moved language select view assets to localization folder in Resources as well
This commit is contained in:
10
Assets/Resources/localization.meta
Normal file
10
Assets/Resources/localization.meta
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2bd6ad883b515814d9c8b932f563372d
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1545490981
|
||||||
|
licenseType: Free
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<localization>
|
<localization>
|
||||||
<language key="de" name="Deutsch" flagPath="localization/flag_de.png"/>
|
<language key="de" name="Deutsch" flagPath="localization/flag_de"/>
|
||||||
<language key="en" name="English" flagPath="localization/flag_uk_us.png" default="true"/>
|
<language key="en" name="English" flagPath="localization/flag_uk_us" default="true"/>
|
||||||
<entry name="t_color_name_light_blue">
|
<entry name="t_color_name_light_blue">
|
||||||
<text lang="de" type="inline" value="Hellblau"/>
|
<text lang="de" type="inline" value="Hellblau"/>
|
||||||
<text lang="en" type="inline" value="Light Blue"/>
|
<text lang="en" type="inline" value="Light Blue"/>
|
||||||
@@ -55,11 +55,11 @@
|
|||||||
<text lang="en" type="inline" value="Large"/>
|
<text lang="en" type="inline" value="Large"/>
|
||||||
</entry>
|
</entry>
|
||||||
<entry name="t_credits">
|
<entry name="t_credits">
|
||||||
<text lang="de" type="file" value="localization/t_credits_de.txt"/>
|
<text lang="de" type="file" value="localization/t_credits_de"/>
|
||||||
<text lang="en" type="file" value="localization/t_credits_en.txt"/>
|
<text lang="en" type="file" value="localization/t_credits_en"/>
|
||||||
</entry>
|
</entry>
|
||||||
<entry name="t_credits_version">
|
<entry name="t_credits_version">
|
||||||
<text lang="de" type="file" value="localization/t_credits_version.txt"/>
|
<text lang="de" type="file" value="localization/t_credits_version"/>
|
||||||
<text lang="en" type="file" value="localization/t_credits_version.txt"/>
|
<text lang="en" type="file" value="localization/t_credits_version"/>
|
||||||
</entry>
|
</entry>
|
||||||
</localization>
|
</localization>
|
||||||
BIN
Assets/Resources/localization/flag_de.png
Normal file
BIN
Assets/Resources/localization/flag_de.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 376 B |
78
Assets/Resources/localization/flag_de.png.meta
Normal file
78
Assets/Resources/localization/flag_de.png.meta
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 25491ea9c6e1b7244b2d9cacdd154d8f
|
||||||
|
timeCreated: 1545490981
|
||||||
|
licenseType: Free
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName: {}
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
platformSettings:
|
||||||
|
- buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
spritePackingTag:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Resources/localization/flag_jp.png
Normal file
BIN
Assets/Resources/localization/flag_jp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
78
Assets/Resources/localization/flag_jp.png.meta
Normal file
78
Assets/Resources/localization/flag_jp.png.meta
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2c05577f49b120f4b8ee7b9733af5ad2
|
||||||
|
timeCreated: 1545490982
|
||||||
|
licenseType: Free
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName: {}
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
platformSettings:
|
||||||
|
- buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
spritePackingTag:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Resources/localization/flag_uk_us.png
Normal file
BIN
Assets/Resources/localization/flag_uk_us.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
78
Assets/Resources/localization/flag_uk_us.png.meta
Normal file
78
Assets/Resources/localization/flag_uk_us.png.meta
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c64690fd7ce0e5c4a8061babcfa165a6
|
||||||
|
timeCreated: 1545490982
|
||||||
|
licenseType: Free
|
||||||
|
TextureImporter:
|
||||||
|
fileIDToRecycleName: {}
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 4
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -1
|
||||||
|
wrapU: -1
|
||||||
|
wrapV: -1
|
||||||
|
wrapW: -1
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
platformSettings:
|
||||||
|
- buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
spritePackingTag:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
17
Assets/Resources/localization/t_credits_de.txt
Normal file
17
Assets/Resources/localization/t_credits_de.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Diese Anwendung wurde als Projektarbeit im 6. Semester von Studenten der Hochschule für angewandte Wissenschaften Würzburg-Schweinfurt erstellt.
|
||||||
|
|
||||||
|
Entwicklerteam:
|
||||||
|
René Ziegler
|
||||||
|
Matthias Kleinhenz
|
||||||
|
Alexander Frühwald
|
||||||
|
|
||||||
|
Betreuer FHWS:
|
||||||
|
Prof. Dr. Frank Deinzer
|
||||||
|
Toni Fetzer
|
||||||
|
|
||||||
|
Besonderer Dank für die Aufnahme der 3D-Scans geht an Frank Ebner.
|
||||||
|
|
||||||
|
Verantwortlicher im Auftrag des Reichstadtmuseums in Rothenburg:
|
||||||
|
Dr. Hellmuth Möhring
|
||||||
|
|
||||||
|
Die in dieser App verwendeten Icons sind Teil der Google Material Icon Library, abrufbar unter https://material.io/icons/ und sind lizenziert unter der Apache License Version 2.0.
|
||||||
9
Assets/Resources/localization/t_credits_de.txt.meta
Normal file
9
Assets/Resources/localization/t_credits_de.txt.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5e33d40fce62ea349af0e5cb81a4058b
|
||||||
|
timeCreated: 1545490982
|
||||||
|
licenseType: Free
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
17
Assets/Resources/localization/t_credits_en.txt
Normal file
17
Assets/Resources/localization/t_credits_en.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
This app has been created as a project by 6th semester students at the University of Applied Sciences Wurzburg-Schweinfurt.
|
||||||
|
|
||||||
|
Developer Team:
|
||||||
|
René Ziegler
|
||||||
|
Matthias Kleinhenz
|
||||||
|
Alexander Frühwald
|
||||||
|
|
||||||
|
Project Monitoring FHWS:
|
||||||
|
Prof. Dr. Frank Deinzer
|
||||||
|
Toni Fetzer
|
||||||
|
|
||||||
|
Special thanks for taking the 3D-Scans go to Frank Ebner.
|
||||||
|
|
||||||
|
Responsible on behalf of the Reichstadtmuseum of Rothenburg:
|
||||||
|
Dr. Hellmuth Moehring
|
||||||
|
|
||||||
|
Icons used in this App are part of the Google Material Icon Library, available at https://material.io/icons/ and are licensed under the Apache License Version 2.0.
|
||||||
9
Assets/Resources/localization/t_credits_en.txt.meta
Normal file
9
Assets/Resources/localization/t_credits_en.txt.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7e87879c9f3136b4a8527b183fd599c8
|
||||||
|
timeCreated: 1545490982
|
||||||
|
licenseType: Free
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
1
Assets/Resources/localization/t_credits_version.txt
Normal file
1
Assets/Resources/localization/t_credits_version.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Version RC3 - 05.10.2017
|
||||||
9
Assets/Resources/localization/t_credits_version.txt.meta
Normal file
9
Assets/Resources/localization/t_credits_version.txt.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fe180226794a33a4fb817bbc80b657c6
|
||||||
|
timeCreated: 1545490982
|
||||||
|
licenseType: Free
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using UnityEngine;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
@@ -76,7 +77,7 @@ namespace RothenburgAR.Common
|
|||||||
TextEntryType type = TextElement.GetTextEntryTypeFromString(typeStr);
|
TextEntryType type = TextElement.GetTextEntryTypeFromString(typeStr);
|
||||||
var valueStr = xmlNode.Attributes["value"].Value;
|
var valueStr = xmlNode.Attributes["value"].Value;
|
||||||
if (type == TextEntryType.File)
|
if (type == TextEntryType.File)
|
||||||
valueStr = Path.Combine(basePath, valueStr);
|
valueStr = valueStr;
|
||||||
textElement.AddTextElement(langCode, type, valueStr);
|
textElement.AddTextElement(langCode, type, valueStr);
|
||||||
}
|
}
|
||||||
return textElement;
|
return textElement;
|
||||||
@@ -103,13 +104,15 @@ namespace RothenburgAR.Common
|
|||||||
if (Type == TextEntryType.Inline)
|
if (Type == TextEntryType.Inline)
|
||||||
return Value;
|
return Value;
|
||||||
|
|
||||||
// If it is no inline text, we need to have a file path as "value".
|
|
||||||
if (!File.Exists(Value))
|
|
||||||
throw new FileNotFoundException();
|
|
||||||
|
|
||||||
// Attention:
|
// Attention:
|
||||||
// if there should be performance issues, here could be a nice place to add caching
|
// if there should be performance issues, here could be a nice place to add caching
|
||||||
return File.ReadAllText(Value, System.Text.Encoding.UTF8);
|
var file = Resources.Load<TextAsset>(Value);
|
||||||
|
|
||||||
|
// If it is no inline text, we need to have a file path as "value".
|
||||||
|
if (file == null)
|
||||||
|
throw new FileNotFoundException();
|
||||||
|
|
||||||
|
return file.text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ namespace RothenburgAR
|
|||||||
{
|
{
|
||||||
var langKey = languageNode.Attributes["key"].Value;
|
var langKey = languageNode.Attributes["key"].Value;
|
||||||
var langName = languageNode.Attributes["name"].Value;
|
var langName = languageNode.Attributes["name"].Value;
|
||||||
var langFlagPath = Path.Combine(PathHelper.DataPath, languageNode.Attributes["flagPath"].Value);
|
var langFlagPath = languageNode.Attributes["flagPath"].Value;
|
||||||
|
|
||||||
AddLanguage(langKey, langName, langFlagPath);
|
AddLanguage(langKey, langName, langFlagPath);
|
||||||
|
|
||||||
|
|||||||
@@ -32,13 +32,10 @@ namespace RothenburgAR.UI
|
|||||||
{
|
{
|
||||||
var newFlag = GameObject.Instantiate(FlagPrefab, FlagContainer.transform);
|
var newFlag = GameObject.Instantiate(FlagPrefab, FlagContainer.transform);
|
||||||
newFlag.SetActive(true);
|
newFlag.SetActive(true);
|
||||||
|
|
||||||
if (File.Exists(language.FlagImagePath))
|
|
||||||
{
|
|
||||||
var bytes = File.ReadAllBytes(language.FlagImagePath);
|
|
||||||
Texture2D texture = new Texture2D(4, 4, TextureFormat.RGBA32, false);
|
|
||||||
texture.LoadImage(bytes);
|
|
||||||
|
|
||||||
|
var texture = Resources.Load<Texture2D>(language.FlagImagePath);
|
||||||
|
if (texture != null)
|
||||||
|
{
|
||||||
var image = newFlag.GetComponentInChildren<Image>();
|
var image = newFlag.GetComponentInChildren<Image>();
|
||||||
image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
|
image.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
|
||||||
image.preserveAspect = true;
|
image.preserveAspect = true;
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ namespace RothenburgAR.Updater
|
|||||||
var exhibits = JsonConvert.DeserializeObject<List<ApiExhibit>>(http.Download.text);
|
var exhibits = JsonConvert.DeserializeObject<List<ApiExhibit>>(http.Download.text);
|
||||||
foreach (var exhibit in exhibits)
|
foreach (var exhibit in exhibits)
|
||||||
{
|
{
|
||||||
UpdateMedia(exhibit);
|
UpdateMedia(exhibit, currentHandlers);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -225,13 +225,13 @@ namespace RothenburgAR.Updater
|
|||||||
private IEnumerator UpdateVersionFileCoroutine(List<HttpHandler> currentHandlers, string versionPath, string version)
|
private IEnumerator UpdateVersionFileCoroutine(List<HttpHandler> currentHandlers, string versionPath, string version)
|
||||||
{
|
{
|
||||||
// updates version file only if all sub files were downloaded successfully
|
// updates version file only if all sub files were downloaded successfully
|
||||||
yield return new WaitUntil(() => httpHandlers.All(h => h.IsDone));
|
yield return new WaitUntil(() => currentHandlers.All(h => h.IsDone));
|
||||||
if (httpHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break;
|
if (currentHandlers.Any(http => http.Request.isNetworkError || http.Request.isHttpError)) yield break;
|
||||||
|
|
||||||
File.WriteAllText(versionPath, version);
|
File.WriteAllText(versionPath, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateMedia(ApiExhibit exhibit)
|
private void UpdateMedia(ApiExhibit exhibit, List<HttpHandler> batchHandlers)
|
||||||
{
|
{
|
||||||
var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List<string> { null }).ToList();
|
var mediaIDs = exhibit.Pois.Select(p => p.MediaId).Except(new List<string> { null }).ToList();
|
||||||
|
|
||||||
@@ -255,6 +255,7 @@ namespace RothenburgAR.Updater
|
|||||||
.Send();
|
.Send();
|
||||||
|
|
||||||
httpHandlers.Add(http);
|
httpHandlers.Add(http);
|
||||||
|
batchHandlers.Add(http);
|
||||||
|
|
||||||
http.Operation.completed += ar =>
|
http.Operation.completed += ar =>
|
||||||
{
|
{
|
||||||
@@ -276,7 +277,7 @@ namespace RothenburgAR.Updater
|
|||||||
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
|
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var subfile in subfiles)
|
foreach (var subfile in subfiles)
|
||||||
{
|
{
|
||||||
UpdateSubfile(path, url, subfile);
|
UpdateSubfile(path, url, subfile, batchHandlers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,7 +327,7 @@ namespace RothenburgAR.Updater
|
|||||||
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
|
var subfiles = subfilesHeader.Split(separator, StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var subfile in subfiles)
|
foreach (var subfile in subfiles)
|
||||||
{
|
{
|
||||||
UpdateSubfile(path, url, subfile);
|
UpdateSubfile(path, url, subfile, new List<HttpHandler>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +352,7 @@ namespace RothenburgAR.Updater
|
|||||||
return eTag;
|
return eTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSubfile(string path, string parentUrl, string subfile)
|
private void UpdateSubfile(string path, string parentUrl, string subfile, List<HttpHandler> batchHandlers)
|
||||||
{
|
{
|
||||||
var filepath = Path.Combine(path, subfile);
|
var filepath = Path.Combine(path, subfile);
|
||||||
var eTag = GenerateETag(filepath);
|
var eTag = GenerateETag(filepath);
|
||||||
@@ -362,6 +363,7 @@ namespace RothenburgAR.Updater
|
|||||||
.Send();
|
.Send();
|
||||||
|
|
||||||
httpHandlers.Add(http);
|
httpHandlers.Add(http);
|
||||||
|
batchHandlers.Add(http);
|
||||||
|
|
||||||
http.Operation.completed += ar =>
|
http.Operation.completed += ar =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user