diff --git a/SpotifyGPX/Api/ISpotifyApiProportionable.cs b/SpotifyGPX/Api/ISpotifyApiProportionable.cs index 9726cfd..b58d404 100644 --- a/SpotifyGPX/Api/ISpotifyApiProportionable.cs +++ b/SpotifyGPX/Api/ISpotifyApiProportionable.cs @@ -1,5 +1,7 @@ // SpotifyGPX by Simon Field +using SpotifyGPX.SongInterfaces; + namespace SpotifyGPX.Api; /// diff --git a/SpotifyGPX/ISongEntry.cs b/SpotifyGPX/ISongEntry.cs index 1623671..33bcd15 100644 --- a/SpotifyGPX/ISongEntry.cs +++ b/SpotifyGPX/ISongEntry.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Input; +using SpotifyGPX.SongInterfaces; using System; namespace SpotifyGPX; diff --git a/SpotifyGPX/Input/Csv.cs b/SpotifyGPX/Input/Csv.cs index afb7ec9..2f9ff7a 100644 --- a/SpotifyGPX/Input/Csv.cs +++ b/SpotifyGPX/Input/Csv.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.IO; diff --git a/SpotifyGPX/Input/GeoJson.cs b/SpotifyGPX/Input/GeoJson.cs index 1b2c88c..aba8431 100644 --- a/SpotifyGPX/Input/GeoJson.cs +++ b/SpotifyGPX/Input/GeoJson.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.PointEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/Gpx.cs b/SpotifyGPX/Input/Gpx.cs index c06f4a7..4ce439d 100644 --- a/SpotifyGPX/Input/Gpx.cs +++ b/SpotifyGPX/Input/Gpx.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.PointEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/Json.cs b/SpotifyGPX/Input/Json.cs index 1e7dcdb..452990c 100644 --- a/SpotifyGPX/Input/Json.cs +++ b/SpotifyGPX/Input/Json.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/JsonReport.cs b/SpotifyGPX/Input/JsonReport.cs index 205f268..37b7da2 100644 --- a/SpotifyGPX/Input/JsonReport.cs +++ b/SpotifyGPX/Input/JsonReport.cs @@ -1,6 +1,8 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.PointEntry; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Data; diff --git a/SpotifyGPX/Input/Kml.cs b/SpotifyGPX/Input/Kml.cs index ce31d87..530a18b 100644 --- a/SpotifyGPX/Input/Kml.cs +++ b/SpotifyGPX/Input/Kml.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.PointEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/PointTest.cs b/SpotifyGPX/Input/PointTest.cs index 5a1d3bf..8f2ad92 100644 --- a/SpotifyGPX/Input/PointTest.cs +++ b/SpotifyGPX/Input/PointTest.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.PointEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/SongTest.cs b/SpotifyGPX/Input/SongTest.cs index c2b761d..e923ee2 100644 --- a/SpotifyGPX/Input/SongTest.cs +++ b/SpotifyGPX/Input/SongTest.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Input/Xspf.cs b/SpotifyGPX/Input/Xspf.cs index e505b73..c31f3b3 100644 --- a/SpotifyGPX/Input/Xspf.cs +++ b/SpotifyGPX/Input/Xspf.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Options.cs b/SpotifyGPX/Options.cs index 7724323..52b6e41 100644 --- a/SpotifyGPX/Options.cs +++ b/SpotifyGPX/Options.cs @@ -5,6 +5,8 @@ using SpotifyGPX.Input; using SpotifyGPX.Observation; using SpotifyGPX.Output; +using SpotifyGPX.PointEntry; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Globalization; @@ -125,33 +127,6 @@ private static string Help } } } - - public partial struct LastFmEntry - { - private const TimeUsage timeUsage = TimeUsage.Start; - } - - public partial struct SpotifyEntry - { - private static TimeUsage timeUsage => TimeUsage.End; - } - - public partial struct XspfEntry - { - private const TimeUsage timeUsage = TimeUsage.Start; - } - - public partial class PairingsHandler - { - protected override string BroadcasterPrefix => "PAIR"; - private static double? MaximumAbsAccuracy => null; // Greatest accepted error (in seconds) between song and point time (null = allow all pairings regardless of accuracy) - } - - public partial class DupeHandler - { - protected override string BroadcasterPrefix => "DUPE"; - private const int MinimumMatchingCoords = 2; // Minimum number of matching coordinates to be considered a duplicate - } } namespace SpotifyGPX.Input @@ -577,4 +552,37 @@ public partial class FileObserver { protected override Func MessageMatch => lvl => lvl >= LogLevel.Debug; } +} + +namespace SpotifyGPX.Pairings +{ + public partial class PairingsHandler + { + protected override string BroadcasterPrefix => "PAIR"; + private static double? MaximumAbsAccuracy => null; // Greatest accepted error (in seconds) between song and point time (null = allow all pairings regardless of accuracy) + } + + public partial class DupeHandler + { + protected override string BroadcasterPrefix => "DUPE"; + private const int MinimumMatchingCoords = 2; // Minimum number of matching coordinates to be considered a duplicate + } +} + +namespace SpotifyGPX.SongEntry +{ + public partial struct LastFmEntry + { + private const TimeUsage timeUsage = TimeUsage.Start; + } + + public partial struct SpotifyEntry + { + private static TimeUsage timeUsage => TimeUsage.End; + } + + public partial struct XspfEntry + { + private const TimeUsage timeUsage = TimeUsage.Start; + } } \ No newline at end of file diff --git a/SpotifyGPX/Output/Json.cs b/SpotifyGPX/Output/Json.cs index 2501305..7c2c802 100644 --- a/SpotifyGPX/Output/Json.cs +++ b/SpotifyGPX/Output/Json.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Output/Txt.cs b/SpotifyGPX/Output/Txt.cs index b85d541..717b93d 100644 --- a/SpotifyGPX/Output/Txt.cs +++ b/SpotifyGPX/Output/Txt.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongEntry; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/Output/Xlsx.cs b/SpotifyGPX/Output/Xlsx.cs index 754e92e..d55ac45 100644 --- a/SpotifyGPX/Output/Xlsx.cs +++ b/SpotifyGPX/Output/Xlsx.cs @@ -5,6 +5,7 @@ using OfficeOpenXml.Style; using OfficeOpenXml.Table; using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongInterfaces; using System; using System.Collections.Generic; using System.Drawing; diff --git a/SpotifyGPX/Output/Xspf.cs b/SpotifyGPX/Output/Xspf.cs index 8bd41f3..3058a96 100644 --- a/SpotifyGPX/Output/Xspf.cs +++ b/SpotifyGPX/Output/Xspf.cs @@ -1,6 +1,7 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Broadcasting; +using SpotifyGPX.SongInterfaces; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpotifyGPX/DupeHandler.cs b/SpotifyGPX/Pairings/DupeHandler.cs similarity index 99% rename from SpotifyGPX/DupeHandler.cs rename to SpotifyGPX/Pairings/DupeHandler.cs index 9c047ae..0915939 100644 --- a/SpotifyGPX/DupeHandler.cs +++ b/SpotifyGPX/Pairings/DupeHandler.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; /// /// Handle duplicate coordinate placements by shifting them to other locations. diff --git a/SpotifyGPX/DupeHandlerAuto.cs b/SpotifyGPX/Pairings/DupeHandlerAuto.cs similarity index 93% rename from SpotifyGPX/DupeHandlerAuto.cs rename to SpotifyGPX/Pairings/DupeHandlerAuto.cs index b6a7f2d..a60fe1f 100644 --- a/SpotifyGPX/DupeHandlerAuto.cs +++ b/SpotifyGPX/Pairings/DupeHandlerAuto.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public class DupeHandlerAuto : DupeHandler { diff --git a/SpotifyGPX/DupeHandlerManual.cs b/SpotifyGPX/Pairings/DupeHandlerManual.cs similarity index 98% rename from SpotifyGPX/DupeHandlerManual.cs rename to SpotifyGPX/Pairings/DupeHandlerManual.cs index d179ce7..9a2de44 100644 --- a/SpotifyGPX/DupeHandlerManual.cs +++ b/SpotifyGPX/Pairings/DupeHandlerManual.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public class DupeHandlerManual : DupeHandler { diff --git a/SpotifyGPX/PairerVanilla.cs b/SpotifyGPX/Pairings/PairerVanilla.cs similarity index 89% rename from SpotifyGPX/PairerVanilla.cs rename to SpotifyGPX/Pairings/PairerVanilla.cs index 7ac982d..9a85a59 100644 --- a/SpotifyGPX/PairerVanilla.cs +++ b/SpotifyGPX/Pairings/PairerVanilla.cs @@ -2,7 +2,7 @@ using SpotifyGPX.Broadcasting; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public class PairerVanilla : PairingsHandler { diff --git a/SpotifyGPX/PairingsFactory.cs b/SpotifyGPX/Pairings/PairingsFactory.cs similarity index 98% rename from SpotifyGPX/PairingsFactory.cs rename to SpotifyGPX/Pairings/PairingsFactory.cs index 7f210f8..9bb9eb8 100644 --- a/SpotifyGPX/PairingsFactory.cs +++ b/SpotifyGPX/Pairings/PairingsFactory.cs @@ -3,7 +3,7 @@ using SpotifyGPX.Broadcasting; using System; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public abstract class PairingsFactory : StringBroadcasterBase { diff --git a/SpotifyGPX/PairingsFromPairings.cs b/SpotifyGPX/Pairings/PairingsFromPairings.cs similarity index 96% rename from SpotifyGPX/PairingsFromPairings.cs rename to SpotifyGPX/Pairings/PairingsFromPairings.cs index a87bfc4..52d3160 100644 --- a/SpotifyGPX/PairingsFromPairings.cs +++ b/SpotifyGPX/Pairings/PairingsFromPairings.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.IO; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public class PairingsFromPairings : PairingsFactory { diff --git a/SpotifyGPX/PairingsFromSongsAndPoints.cs b/SpotifyGPX/Pairings/PairingsFromSongsAndPoints.cs similarity index 97% rename from SpotifyGPX/PairingsFromSongsAndPoints.cs rename to SpotifyGPX/Pairings/PairingsFromSongsAndPoints.cs index 0160ecc..7f2e858 100644 --- a/SpotifyGPX/PairingsFromSongsAndPoints.cs +++ b/SpotifyGPX/Pairings/PairingsFromSongsAndPoints.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.IO; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; public class PairingsFromSongsAndPoints : PairingsFactory { diff --git a/SpotifyGPX/PairingsHandler.cs b/SpotifyGPX/Pairings/PairingsHandler.cs similarity index 99% rename from SpotifyGPX/PairingsHandler.cs rename to SpotifyGPX/Pairings/PairingsHandler.cs index 11b4024..fac87bf 100644 --- a/SpotifyGPX/PairingsHandler.cs +++ b/SpotifyGPX/Pairings/PairingsHandler.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Threading.Tasks; -namespace SpotifyGPX; +namespace SpotifyGPX.Pairings; /// /// Handle SongPoint pairings, including list calculation, generation, operations, and exporting. diff --git a/SpotifyGPX/PointEntries/GenericPoint.cs b/SpotifyGPX/PointEntry/GenericPoint.cs similarity index 86% rename from SpotifyGPX/PointEntries/GenericPoint.cs rename to SpotifyGPX/PointEntry/GenericPoint.cs index c059b56..d1b51d1 100644 --- a/SpotifyGPX/PointEntries/GenericPoint.cs +++ b/SpotifyGPX/PointEntry/GenericPoint.cs @@ -2,7 +2,7 @@ using System; -namespace SpotifyGPX; +namespace SpotifyGPX.PointEntry; public struct GenericPoint : IGpsPoint { diff --git a/SpotifyGPX/PointEntries/GeoJsonPoint.cs b/SpotifyGPX/PointEntry/GeoJsonPoint.cs similarity index 95% rename from SpotifyGPX/PointEntries/GeoJsonPoint.cs rename to SpotifyGPX/PointEntry/GeoJsonPoint.cs index fa69ac7..25895ef 100644 --- a/SpotifyGPX/PointEntries/GeoJsonPoint.cs +++ b/SpotifyGPX/PointEntry/GeoJsonPoint.cs @@ -2,7 +2,7 @@ using System; -namespace SpotifyGPX; +namespace SpotifyGPX.PointEntry; public struct GeoJsonPoint : IGpsPoint { diff --git a/SpotifyGPX/PointEntries/GpxPoint.cs b/SpotifyGPX/PointEntry/GpxPoint.cs similarity index 86% rename from SpotifyGPX/PointEntries/GpxPoint.cs rename to SpotifyGPX/PointEntry/GpxPoint.cs index 86244e1..ef4a47b 100644 --- a/SpotifyGPX/PointEntries/GpxPoint.cs +++ b/SpotifyGPX/PointEntry/GpxPoint.cs @@ -2,7 +2,7 @@ using System; -namespace SpotifyGPX; +namespace SpotifyGPX.PointEntry; public struct GpxPoint : IGpsPoint { diff --git a/SpotifyGPX/PointEntries/KmlPoint.cs b/SpotifyGPX/PointEntry/KmlPoint.cs similarity index 91% rename from SpotifyGPX/PointEntries/KmlPoint.cs rename to SpotifyGPX/PointEntry/KmlPoint.cs index fbaa6d2..1ac6b83 100644 --- a/SpotifyGPX/PointEntries/KmlPoint.cs +++ b/SpotifyGPX/PointEntry/KmlPoint.cs @@ -2,7 +2,7 @@ using System; -namespace SpotifyGPX; +namespace SpotifyGPX.PointEntry; public struct KmlPoint : IGpsPoint { diff --git a/SpotifyGPX/Program.cs b/SpotifyGPX/Program.cs index 927e572..924fac1 100644 --- a/SpotifyGPX/Program.cs +++ b/SpotifyGPX/Program.cs @@ -3,6 +3,7 @@ using SpotifyGPX.Broadcasting; using SpotifyGPX.Observation; using SpotifyGPX.Output; +using SpotifyGPX.Pairings; using System; using System.Collections.Generic; diff --git a/SpotifyGPX/SongEntries/GenericEntry.cs b/SpotifyGPX/SongEntry/GenericEntry.cs similarity index 94% rename from SpotifyGPX/SongEntries/GenericEntry.cs rename to SpotifyGPX/SongEntry/GenericEntry.cs index 2c7c194..02a567b 100644 --- a/SpotifyGPX/SongEntries/GenericEntry.cs +++ b/SpotifyGPX/SongEntry/GenericEntry.cs @@ -3,7 +3,7 @@ using SpotifyGPX.Input; using System; -namespace SpotifyGPX; +namespace SpotifyGPX.SongEntry; public struct GenericEntry : ISongEntry { diff --git a/SpotifyGPX/SongEntries/LastFmEntry.cs b/SpotifyGPX/SongEntry/LastFmEntry.cs similarity index 96% rename from SpotifyGPX/SongEntries/LastFmEntry.cs rename to SpotifyGPX/SongEntry/LastFmEntry.cs index 8db13b5..5758870 100644 --- a/SpotifyGPX/SongEntries/LastFmEntry.cs +++ b/SpotifyGPX/SongEntry/LastFmEntry.cs @@ -3,7 +3,7 @@ using SpotifyGPX.Input; using System; -namespace SpotifyGPX; +namespace SpotifyGPX.SongEntry; public partial struct LastFmEntry : ISongEntry { diff --git a/SpotifyGPX/SongEntries/SpotifyEntry.cs b/SpotifyGPX/SongEntry/SpotifyEntry.cs similarity index 99% rename from SpotifyGPX/SongEntries/SpotifyEntry.cs rename to SpotifyGPX/SongEntry/SpotifyEntry.cs index 5930a92..6a8426c 100644 --- a/SpotifyGPX/SongEntries/SpotifyEntry.cs +++ b/SpotifyGPX/SongEntry/SpotifyEntry.cs @@ -2,11 +2,12 @@ using SpotifyGPX.Api; using SpotifyGPX.Input; +using SpotifyGPX.SongInterfaces; using System; using System.Linq; using System.Text.Json.Serialization; -namespace SpotifyGPX; +namespace SpotifyGPX.SongEntry; public partial struct SpotifyEntry : ISongEntry, IEstimatableSong, ISpotifyApiCompat, ISpotifyApiProportionable, IUrlLinkableSong, IAlbumableSong { diff --git a/SpotifyGPX/SongEntries/XspfEntry.cs b/SpotifyGPX/SongEntry/XspfEntry.cs similarity index 93% rename from SpotifyGPX/SongEntries/XspfEntry.cs rename to SpotifyGPX/SongEntry/XspfEntry.cs index f9a250e..ee40920 100644 --- a/SpotifyGPX/SongEntries/XspfEntry.cs +++ b/SpotifyGPX/SongEntry/XspfEntry.cs @@ -1,9 +1,10 @@ // SpotifyGPX by Simon Field using SpotifyGPX.Input; +using SpotifyGPX.SongInterfaces; using System; -namespace SpotifyGPX; +namespace SpotifyGPX.SongEntry; public partial struct XspfEntry : ISongEntry, IEstimatableSong { diff --git a/SpotifyGPX/SongInterfaces/IAlbumableSong.cs b/SpotifyGPX/SongInterfaces/IAlbumableSong.cs index 3dbc12c..da893a9 100644 --- a/SpotifyGPX/SongInterfaces/IAlbumableSong.cs +++ b/SpotifyGPX/SongInterfaces/IAlbumableSong.cs @@ -1,6 +1,6 @@ // SpotifyGPX by Simon Field -namespace SpotifyGPX; +namespace SpotifyGPX.SongInterfaces; /// /// Provides access to song album names. diff --git a/SpotifyGPX/SongInterfaces/IDuratableSong.cs b/SpotifyGPX/SongInterfaces/IDuratableSong.cs index f5d2d8e..c27f9f5 100644 --- a/SpotifyGPX/SongInterfaces/IDuratableSong.cs +++ b/SpotifyGPX/SongInterfaces/IDuratableSong.cs @@ -2,7 +2,7 @@ using System; -namespace SpotifyGPX; +namespace SpotifyGPX.SongInterfaces; /// /// Provides access to song playback durations. diff --git a/SpotifyGPX/SongInterfaces/IEstimatableSong.cs b/SpotifyGPX/SongInterfaces/IEstimatableSong.cs index 1169a4d..4a53680 100644 --- a/SpotifyGPX/SongInterfaces/IEstimatableSong.cs +++ b/SpotifyGPX/SongInterfaces/IEstimatableSong.cs @@ -3,7 +3,7 @@ using SpotifyGPX.Input; using System; -namespace SpotifyGPX; +namespace SpotifyGPX.SongInterfaces; /// /// Provides access to estimated start/end times for a song. diff --git a/SpotifyGPX/SongInterfaces/IUrlLinkableSong.cs b/SpotifyGPX/SongInterfaces/IUrlLinkableSong.cs index a7aeedf..119016e 100644 --- a/SpotifyGPX/SongInterfaces/IUrlLinkableSong.cs +++ b/SpotifyGPX/SongInterfaces/IUrlLinkableSong.cs @@ -1,6 +1,6 @@ // SpotifyGPX by Simon Field -namespace SpotifyGPX; +namespace SpotifyGPX.SongInterfaces; /// /// Provides access to URLs of songs.