Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLAYRTS-5508 Beta only audio content pages #487

Merged
merged 25 commits into from
Jun 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9686286
PLAYRTS-5508 Add optional contentPageid string to channel and use it …
pyby Mar 7, 2024
410baf0
PLAYRTS-5508 Add optional audioContentHomePagePreferred boolean to di…
pyby Mar 7, 2024
81950f8
PLAYRTS-5508 Start audio podcast image integration
pyby Mar 10, 2024
d3388c2
PLAYRTS-5508 Fix show cell layout for podcast variant
pyby Mar 15, 2024
4df4d62
PLAYRTS-5508 Add content type on sections
pyby Mar 15, 2024
aec68c1
PLAYRTS-5508 Try audio podcast image integration for all BUs with aud…
pyby Mar 15, 2024
cf81020
PLAYRTS-5508 Add Podcast square images service override option in Set…
pyby May 4, 2024
818688d
PLAYRTS-5508 Fix channel page id property naming
pyby May 4, 2024
8b50d33
PLAYRTS-5508 Apply new remote config properties only for non producti…
pyby May 4, 2024
6246be5
PLAYRTS-5508 Add audio content home page override option in Settings
pyby May 4, 2024
341d03f
PLAYRTS-5508 Iterate on audio homepage option in Settings
pyby May 4, 2024
5d52617
PLAYRTS-5508 Connect new settings to tvOS debug build only
pyby May 4, 2024
a82c01e
PLAYRTS-5508 Renaming on audio homepage option in Settings
pyby May 4, 2024
4294fa8
Revert "PLAYRTS-5508 Try audio podcast image integration for all BUs …
pyby May 4, 2024
13c015f
PLAYRTS-5508 Apply square image on iOS media detail page show access
pyby May 4, 2024
a7209f8
PLAYRTS-5508 Improve advanced setting descriptions
pyby May 18, 2024
c88266b
PLAYRTS-5508 Remove default square settings state for SRF
pyby May 18, 2024
1c45101
PLAYRTS-5508 Rename shared constants
pyby May 22, 2024
260167c
PLAYRTS-5508 Fix linter
pyby May 29, 2024
6a27d7b
PLAYRTS-5508 Update DataProvider to develop branch
pyby May 29, 2024
a912acd
PLAYRTS-5508 Code refactoring
pyby May 31, 2024
a2a7855
PLAYRTS-5508 Remove unused code
pyby May 31, 2024
df97c65
PLAYRTS-5508 Update to official SRGDataProvider release
pyby May 31, 2024
d8ccd6e
PLAYRTS-5508 Prepare translations
pyby May 31, 2024
2f2b6c1
PLAYRTS-5508 Update romansh translations
pyby Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PLAYRTS-5508 Renaming on audio homepage option in Settings
  • Loading branch information
pyby committed May 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a82c01eaa36b977e36cf606edfb3b7461161d9f0
4 changes: 2 additions & 2 deletions Application/Sources/Configuration/ApplicationConfiguration.m
Original file line number Diff line number Diff line change
@@ -295,11 +295,11 @@ - (BOOL)isAudioContentHomepagePreferred
{
#if defined(DEBUG) || defined(NIGHTLY) || defined(BETA)
switch (ApplicationSettingAudioHomepageOption()) {
case SettingAudioHomepageOptionContentOne: {
case SettingAudioHomepageOptionCuratedOne: {
return YES;
break;
}
case SettingAudioHomepageOptionContentMany:
case SettingAudioHomepageOptionCuratedMany:
case SettingAudioHomepageOptionPredefinedMany: {
return NO;
break;
2 changes: 1 addition & 1 deletion Application/Sources/Content/PageViewModel.swift
Original file line number Diff line number Diff line change
@@ -588,7 +588,7 @@ private extension PageViewModel {
.map { Page(uid: $0.uid, sections: $0.sections.enumeratedMap { Section(.content($0, type: .videoOrTV), index: $1) }) }
.eraseToAnyPublisher()
case let .audio(channel: channel):
if let channel, let uid = channel.contentPageId, ApplicationSettingAudioHomepageOption() == .contentMany {
if let channel, let uid = channel.contentPageId, ApplicationSettingAudioHomepageOption() == .curatedMany {
return SRGDataProvider.current!.contentPage(for: ApplicationConfiguration.shared.vendor, uid: uid)
.map { Page(uid: $0.uid, sections: $0.sections.enumeratedMap { Section(.content($0, type: .audioOrRadio), index: $1) }) }
.eraseToAnyPublisher()
8 changes: 4 additions & 4 deletions Application/Sources/Settings/ApplicationSettings+Common.h
Original file line number Diff line number Diff line change
@@ -61,13 +61,13 @@ typedef NS_ENUM(NSInteger, SettingAudioHomepageOption) {
*/
SettingAudioHomepageOptionDefault,
/**
* Force one audio content home page usage.
* Force one audio curated home page usage.
*/
SettingAudioHomepageOptionContentOne,
SettingAudioHomepageOptionCuratedOne,
/**
* Force many audio content home pages usage.
* Force many audio curated home pages usage.
*/
SettingAudioHomepageOptionContentMany,
SettingAudioHomepageOptionCuratedMany,
/**
* Force many audio predefined home pages usage.
*/
4 changes: 2 additions & 2 deletions Application/Sources/Settings/ApplicationSettings+Common.m
Original file line number Diff line number Diff line change
@@ -136,8 +136,8 @@ SettingSquareImages ApplicationSettingSquareImages(void)
static NSValueTransformer *s_transformer;
static dispatch_once_t s_onceToken;
dispatch_once(&s_onceToken, ^{
s_transformer = [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ @"contentOne" : @(SettingAudioHomepageOptionContentOne),
@"contentMany" : @(SettingAudioHomepageOptionContentMany),
s_transformer = [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ @"curatedOne" : @(SettingAudioHomepageOptionCuratedOne),
@"curatedMany" : @(SettingAudioHomepageOptionCuratedMany),
@"predefinedMany" : @(SettingAudioHomepageOptionPredefinedMany) }
defaultValue:@(SettingAudioHomepageOptionDefault)
reverseDefaultValue:nil];
18 changes: 9 additions & 9 deletions Application/Sources/Settings/AudioHomepageOption.swift
Original file line number Diff line number Diff line change
@@ -8,28 +8,28 @@ import Foundation

enum AudioHomepageOption: String, CaseIterable, Identifiable {
case `default`
case contentOne
case contentMany
case curatedOne
case curatedMany
case predefinedMany

var id: Self {
return self
}

var useChannelContenId: Bool {
return self == .contentMany
return self == .curatedMany
}

var description: String {
switch self {
case .contentOne:
return NSLocalizedString("One content page", comment: "One audio content home page option setting state")
case .contentMany:
return NSLocalizedString("Many content pages", comment: "Many audio content home pages option setting state")
case .curatedOne:
return NSLocalizedString("One curated page", comment: "One curated audio homepage option setting state")
case .curatedMany:
return NSLocalizedString("Many curated pages", comment: "Many curated audio homepages option setting state")
case .predefinedMany:
return NSLocalizedString("Many predefined pages", comment: "Many predefined audio home page option setting state")
return NSLocalizedString("Many predefined pages", comment: "Many predefined audio homepage option setting state")
case .`default`:
return NSLocalizedString("Default (current configuration)", comment: "Audio content home page option setting state")
return NSLocalizedString("Default (current configuration)", comment: "Audio homepage option setting state")
}
}
}
8 changes: 4 additions & 4 deletions Application/Sources/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
@@ -653,7 +653,7 @@ struct SettingsView: View {

var body: some View {
HStack {
Text(NSLocalizedString("Podcast square images", comment: "Label of the button for Podcast square image format selection"))
Text("🎧 \(NSLocalizedString("Podcast square images", comment: "Label of the button for Podcast square image format selection"))")
Spacer()
Text(selectedSquareImages.description)
.foregroundColor(Color.play_sectionSecondary)
@@ -668,7 +668,7 @@ struct SettingsView: View {

var body: some View {
HStack {
Text(NSLocalizedString("Audio home page", comment: "Label of the button for audio homepage option selection"))
Text("🎧 \(NSLocalizedString("Audio home page", comment: "Label of the button for audio homepage option selection"))")
Spacer()
Text(selectedAudioHomepageOption.description)
.foregroundColor(Color.play_sectionSecondary)
@@ -824,7 +824,7 @@ struct SettingsView: View {
.play_scrollClipDisabled()
.frame(maxWidth: LayoutMaxListWidth)
#endif
.navigationTitle(NSLocalizedString("Podcast square images", comment: "Podcast square image format selection view title"))
.navigationTitle("🎧 \(NSLocalizedString("Podcast square images", comment: "Podcast square image format selection view title"))")
}
}

@@ -866,7 +866,7 @@ struct SettingsView: View {
.play_scrollClipDisabled()
.frame(maxWidth: LayoutMaxListWidth)
#endif
.navigationTitle(NSLocalizedString("Audio content home page", comment: "Audio content home page selection view title"))
.navigationTitle("🎧 \(NSLocalizedString("Audio home page", comment: "Audio home page selection view title"))")
}
}