-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
261 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
Sources/EeveeSpotify/Lyrics/DataSources/LrclibLyricsDataSource.swift
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Foundation | ||
|
||
struct LyricsDto { | ||
var lines: [LyricsLineDto] | ||
var timeSynced: Bool | ||
|
||
func toLyricsData(source: String) -> LyricsData { | ||
return LyricsData.with { | ||
$0.timeSynchronized = timeSynced | ||
$0.restriction = .unrestricted | ||
$0.providedBy = "\(source) (EeveeSpotify)" | ||
$0.lines = lines.map { line in | ||
LyricsLine.with { | ||
$0.content = line.content | ||
$0.offsetMs = Int32(line.offsetMs ?? 0) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Foundation | ||
|
||
struct LyricsLineDto { | ||
var content: String | ||
var offsetMs: Int? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Foundation | ||
|
||
struct LyricsSearchQuery { | ||
var title: String | ||
var primaryArtist: String | ||
var spotifyTrackId: String | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Foundation | ||
|
||
protocol LyricsRepository { | ||
func getLyrics(_ query: LyricsSearchQuery) throws -> LyricsDto | ||
} |
Oops, something went wrong.