undo namespace change for DataContract and migrate already changed xml files
This commit is contained in:
parent
2f9471ad01
commit
7860910f3c
@ -9,7 +9,7 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper.Data;
|
|||||||
/// Result of fingerprinting and analyzing two episodes in a season.
|
/// Result of fingerprinting and analyzing two episodes in a season.
|
||||||
/// All times are measured in seconds relative to the beginning of the media file.
|
/// All times are measured in seconds relative to the beginning of the media file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataContract]
|
[DataContract(Namespace = "http://schemas.datacontract.org/2004/07/ConfusedPolarBear.Plugin.IntroSkipper")]
|
||||||
public class Intro
|
public class Intro
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -73,6 +73,14 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper
|
|||||||
// Save the modified XML document
|
// Save the modified XML document
|
||||||
xmlDoc.Save(filePath);
|
xmlDoc.Save(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// undo namespace change
|
||||||
|
if (xmlDoc.DocumentElement.NamespaceURI == "http://schemas.datacontract.org/2004/07/ConfusedPolarBear.Plugin.IntroSkipper.Data")
|
||||||
|
{
|
||||||
|
xmlDoc.DocumentElement.SetAttribute("xmlns", "http://schemas.datacontract.org/2004/07/ConfusedPolarBear.Plugin.IntroSkipper");
|
||||||
|
// Save the modified XML document
|
||||||
|
xmlDoc.Save(filePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (XmlException ex)
|
catch (XmlException ex)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user