Skip to content

Commit

Permalink
2024.51.1
Browse files Browse the repository at this point in the history
- PointEntry, SongEntry, SongInterfaces, Pairings namespaces synchronized
  • Loading branch information
simon-techkid committed Jun 28, 2024
1 parent 80a5e71 commit f42f3f4
Show file tree
Hide file tree
Showing 37 changed files with 75 additions and 47 deletions.
2 changes: 2 additions & 0 deletions SpotifyGPX/Api/ISpotifyApiProportionable.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.SongInterfaces;

namespace SpotifyGPX.Api;

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/ISongEntry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Input;
using SpotifyGPX.SongInterfaces;
using System;

namespace SpotifyGPX;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/Csv.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/GeoJson.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.PointEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/Gpx.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.PointEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/Json.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 2 additions & 0 deletions SpotifyGPX/Input/JsonReport.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/Kml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.PointEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/PointTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.PointEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/SongTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Input/Xspf.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
62 changes: 35 additions & 27 deletions SpotifyGPX/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -577,4 +552,37 @@ public partial class FileObserver
{
protected override Func<LogLevel, bool> 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;
}
}
1 change: 1 addition & 0 deletions SpotifyGPX/Output/Json.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Output/Txt.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongEntry;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Output/Xlsx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Output/Xspf.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SpotifyGPX by Simon Field

using SpotifyGPX.Broadcasting;
using SpotifyGPX.SongInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Linq;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

/// <summary>
/// Handle duplicate coordinate placements by shifting them to other locations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Linq;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public class DupeHandlerAuto : DupeHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public class DupeHandlerManual : DupeHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using SpotifyGPX.Broadcasting;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public class PairerVanilla : PairingsHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using SpotifyGPX.Broadcasting;
using System;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public abstract class PairingsFactory : StringBroadcasterBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.IO;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public class PairingsFromPairings : PairingsFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using System.IO;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

public class PairingsFromSongsAndPoints : PairingsFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Linq;
using System.Threading.Tasks;

namespace SpotifyGPX;
namespace SpotifyGPX.Pairings;

/// <summary>
/// Handle SongPoint pairings, including list calculation, generation, operations, and exporting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System;

namespace SpotifyGPX;
namespace SpotifyGPX.PointEntry;

public struct GenericPoint : IGpsPoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System;

namespace SpotifyGPX;
namespace SpotifyGPX.PointEntry;

public struct GeoJsonPoint : IGpsPoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System;

namespace SpotifyGPX;
namespace SpotifyGPX.PointEntry;

public struct GpxPoint : IGpsPoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System;

namespace SpotifyGPX;
namespace SpotifyGPX.PointEntry;

public struct KmlPoint : IGpsPoint
{
Expand Down
1 change: 1 addition & 0 deletions SpotifyGPX/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using SpotifyGPX.Broadcasting;
using SpotifyGPX.Observation;
using SpotifyGPX.Output;
using SpotifyGPX.Pairings;
using System;
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using SpotifyGPX.Input;
using System;

namespace SpotifyGPX;
namespace SpotifyGPX.SongEntry;

public struct GenericEntry : ISongEntry
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using SpotifyGPX.Input;
using System;

namespace SpotifyGPX;
namespace SpotifyGPX.SongEntry;

public partial struct LastFmEntry : ISongEntry
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion SpotifyGPX/SongInterfaces/IAlbumableSong.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SpotifyGPX by Simon Field

namespace SpotifyGPX;
namespace SpotifyGPX.SongInterfaces;

/// <summary>
/// Provides access to song album names.
Expand Down
2 changes: 1 addition & 1 deletion SpotifyGPX/SongInterfaces/IDuratableSong.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System;

namespace SpotifyGPX;
namespace SpotifyGPX.SongInterfaces;

/// <summary>
/// Provides access to song playback durations.
Expand Down
2 changes: 1 addition & 1 deletion SpotifyGPX/SongInterfaces/IEstimatableSong.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using SpotifyGPX.Input;
using System;

namespace SpotifyGPX;
namespace SpotifyGPX.SongInterfaces;

/// <summary>
/// Provides access to estimated start/end times for a song.
Expand Down
2 changes: 1 addition & 1 deletion SpotifyGPX/SongInterfaces/IUrlLinkableSong.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SpotifyGPX by Simon Field

namespace SpotifyGPX;
namespace SpotifyGPX.SongInterfaces;

/// <summary>
/// Provides access to URLs of songs.
Expand Down

0 comments on commit f42f3f4

Please sign in to comment.