Skip to content

Commit 20adb35

Browse files
Merge pull request #713 from madeofpendletonwool/pod-mem
Fixed up email translations
2 parents 8b2c9a4 + d66b2d4 commit 20adb35

4 files changed

Lines changed: 24 additions & 11 deletions

File tree

database_functions/migration_definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,7 @@ def migration_032_create_user_default_playlists(conn, db_type: str):
27652765
'description': 'Perfect-length episodes (15-45 minutes) for your daily commute',
27662766
'min_duration': 900, # 15 minutes
27672767
'max_duration': 2700, # 45 minutes
2768-
'sort_order': 'random',
2768+
'sort_order': 'date_desc',
27692769
'icon_name': 'ph-car-simple',
27702770
'max_episodes': 1000
27712771
}

rust-api/src/database.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,9 +1809,9 @@ impl DatabasePool {
18091809
.bind(podcast_id)
18101810
.fetch_optional(pool)
18111811
.await?;
1812-
1812+
18131813
if let Some(row) = row {
1814-
if let Some(merged_json) = row.try_get::<Option<String>, _>("mergedpodcastids")? {
1814+
if let Some(merged_json) = row.try_get::<Option<String>, _>("MergedPodcastIDs")? {
18151815
let merged_ids: Vec<i32> = serde_json::from_str(&merged_json).unwrap_or_default();
18161816
Ok(merged_ids)
18171817
} else {
@@ -18732,7 +18732,7 @@ impl DatabasePool {
1873218732
let row = playlist_row.unwrap();
1873318733
let playlist_name: String = row.try_get("Name")?;
1873418734
let playlist_description: String = row.try_get("Description").unwrap_or_default();
18735-
let episode_count: i64 = row.try_get("EpisodeCount")?;
18735+
let episode_count: i64 = row.try_get("episode_count")?;
1873618736
let icon_name: String = row.try_get("IconName").unwrap_or_default();
1873718737
let is_system_playlist: bool = row.try_get::<i8, _>("IsSystemPlaylist")? != 0;
1873818738

@@ -23843,7 +23843,7 @@ impl DatabasePool {
2384323843
UserID, Name, Description, IsSystemPlaylist, MinDuration, MaxDuration, SortOrder,
2384423844
IncludeUnplayed, IncludePartiallyPlayed, IncludePlayed, TimeFilterHours,
2384523845
GroupByPodcast, MaxEpisodes, PlayProgressMin, PlayProgressMax, PodcastIDs,
23846-
IconName, episode_count
23846+
IconName, EpisodeCount
2384723847
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2384823848
")
2384923849
.bind(user_id).bind(name).bind(description).bind(false)
@@ -23925,7 +23925,7 @@ impl DatabasePool {
2392523925
UserID, Name, Description, IsSystemPlaylist, MinDuration, MaxDuration, SortOrder,
2392623926
IncludeUnplayed, IncludePartiallyPlayed, IncludePlayed, TimeFilterHours,
2392723927
GroupByPodcast, MaxEpisodes, PlayProgressMin, PlayProgressMax, PodcastIDs,
23928-
IconName, episode_count
23928+
IconName, EpisodeCount
2392923929
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2393023930
")
2393123931
.bind(user_id).bind(name).bind(description).bind(false)
@@ -24013,7 +24013,7 @@ impl DatabasePool {
2401324013
Ok(count) => {
2401424014
// Update the episode_count in the playlist
2401524015
match sqlx::query(
24016-
r#"UPDATE Playlists SET episode_count = ? WHERE PlaylistID = ?"#
24016+
r#"UPDATE Playlists SET EpisodeCount = ? WHERE PlaylistID = ?"#
2401724017
).bind(count).bind(playlist_id).execute(pool).await {
2401824018
Ok(_) => {
2401924019
debug!("Updated MySQL playlist '{}' (ID: {}) count to {}", name, playlist_id, count);
@@ -24615,10 +24615,10 @@ impl DatabasePool {
2461524615
debug!("User {} timezone: {} -> {}", user_id, raw_timezone, user_timezone);
2461624616

2461724617
let playlist_row = sqlx::query(
24618-
r#"SELECT UserID, Name, Description, MinDuration, MaxDuration, SortOrder,
24618+
r#"SELECT UserID, Name, Description, MinDuration, MaxDuration, SortOrder,
2461924619
IncludeUnplayed, IncludePartiallyPlayed, IncludePlayed, TimeFilterHours,
2462024620
GroupByPodcast, MaxEpisodes, PlayProgressMin, PlayProgressMax, PodcastIDs,
24621-
IsSystemPlaylist, Created, IconName, episode_count
24621+
IsSystemPlaylist, Created, IconName, EpisodeCount
2462224622
FROM Playlists WHERE PlaylistID = ?"#
2462324623
).bind(playlist_id).fetch_optional(pool).await?;
2462424624

web/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ fn language_handler() -> Html {
182182
("tr", include_str!("translations/tr.json")),
183183
("uk", include_str!("translations/uk.json")),
184184
("vi", include_str!("translations/vi.json")),
185-
("zh", include_str!("translations/zh.json")),
186185
("zh-Hans", include_str!("translations/zh-Hans.json")),
187186
("zh-Hant", include_str!("translations/zh-Hant.json")),
188187
("test", include_str!("translations/test.json")),

web/src/translations/en.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,21 @@
542542
"smtp_username_required": "SMTP username is required",
543543
"smtp_password_required": "SMTP password is required",
544544
"from_email_required": "From email is required",
545-
"test_email_recipient_required": "Test email recipient is required"
545+
"test_email_recipient_required": "Test email recipient is required",
546+
"current_settings": "Current Settings",
547+
"server": "Server",
548+
"encryption": "Encryption",
549+
"username": "Username",
550+
"auth_required": "Auth Required",
551+
"update_settings": "Update Settings",
552+
"port": "Port",
553+
"from_email_address": "From Email Address",
554+
"encryption_method": "Encryption Method",
555+
"require_authentication": "Authentication Required",
556+
"auth_username": "Username",
557+
"password": "Password",
558+
"yes": "Yes",
559+
"no": "No"
546560
},
547561
"mfa_settings": {
548562
"error_getting_mfa_status": "Error getting MFA status: ",

0 commit comments

Comments
 (0)