diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Data/Intro.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Data/Intro.cs index 8df7e79..fcfa893 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Data/Intro.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Data/Intro.cs @@ -9,7 +9,7 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper.Data; /// Result of fingerprinting and analyzing two episodes in a season. /// All times are measured in seconds relative to the beginning of the media file. /// -[DataContract] +[DataContract(Namespace = "http://schemas.datacontract.org/2004/07/ConfusedPolarBear.Plugin.IntroSkipper")] public class Intro { /// diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/XmlSerializationHelper.cs b/ConfusedPolarBear.Plugin.IntroSkipper/XmlSerializationHelper.cs index b7d90ec..c8c168c 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/XmlSerializationHelper.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/XmlSerializationHelper.cs @@ -73,6 +73,14 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper // Save the modified XML document 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) {