Skip to content

Commit

Permalink
code: Changed relational model to save only IDs instead of URLs for A…
Browse files Browse the repository at this point in the history
…pple Music, Spotify, Bookbeat (#69)
  • Loading branch information
YourMJK committed Oct 3, 2024
1 parent c8d9341 commit 2694493
Show file tree
Hide file tree
Showing 5 changed files with 710 additions and 710 deletions.
6 changes: 3 additions & 3 deletions code/dreimetadaten/MetadataModel/MetadataObjectModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ extension MetadataObjectModel {
cover_itunes: hörspiel.urlCoverApple,
cover_kosmos: hörspiel.urlCoverKosmos,
dreifragezeichen: hörspiel.urlDreifragezeichen,
appleMusic: hörspiel.urlAppleMusic,
spotify: hörspiel.urlSpotify,
bookbeat: hörspiel.urlBookbeat
appleMusic: hörspiel.idAppleMusic.map { "https://music.apple.com/de/album/\($0)" },
spotify: hörspiel.idSpotify.map { "https://open.spotify.com/intl-de/album/\($0)" },
bookbeat: hörspiel.idBookbeat.map { "https://www.bookbeat.com/de/book/\($0)" }
)
hörspielObject.ids = IDs(
dreimetadaten: hörspiel.hörspielID
Expand Down
12 changes: 6 additions & 6 deletions code/dreimetadaten/MetadataModel/MetadataRelationalModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ extension MetadataRelationalModel {
var urlCoverApple: String?
var urlCoverKosmos: String?
var urlDreifragezeichen: String?
var urlAppleMusic: String?
var urlSpotify: String?
var urlBookbeat: String?
var idAppleMusic: String?
var idSpotify: String?
var idBookbeat: String?
}

struct HörspielTeil: Codable {
Expand Down Expand Up @@ -296,9 +296,9 @@ extension MetadataRelationalModel {
t.column("urlCoverApple", .text)
t.column("urlCoverKosmos", .text)
t.column("urlDreifragezeichen", .text)
t.column("urlAppleMusic", .text)
t.column("urlSpotify", .text)
t.column("urlBookbeat", .text)
t.column("idAppleMusic", .text)
t.column("idSpotify", .text)
t.column("idBookbeat", .text)
}
// HörspielTeil
try db.create(table: HörspielTeil.databaseTableName) { t in
Expand Down
Loading

0 comments on commit 2694493

Please sign in to comment.