Adds app whitelabling feature from kmountainflower site dumps
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:audio_service/audio_service.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'generated/app_config.dart';
|
||||
import 'kryz_audio_handler.dart';
|
||||
import 'live_info_business_object.dart';
|
||||
|
||||
@@ -38,7 +39,7 @@ class StreamingAudioBusinessObject extends ChangeNotifier {
|
||||
builder: () => KryzAudioHandler(),
|
||||
config: const AudioServiceConfig(
|
||||
androidNotificationChannelId: 'com.kryzgoflutter.audio.channel',
|
||||
androidNotificationChannelName: 'KRYZ Audio Playback',
|
||||
androidNotificationChannelName: '${AppConfig.appName} Audio Playback',
|
||||
androidNotificationOngoing: true,
|
||||
androidStopForegroundOnPause: true,
|
||||
),
|
||||
@@ -60,8 +61,8 @@ class StreamingAudioBusinessObject extends ChangeNotifier {
|
||||
StreamingPlaybackStatus _playbackStatus = StreamingPlaybackStatus.stopped;
|
||||
bool _isDisposed = false;
|
||||
bool _isAttached = false;
|
||||
String _currentTitle = 'KRYZ Live Stream';
|
||||
String _currentSubtitle = 'KRYZ Radio';
|
||||
String _currentTitle = AppConfig.defaultTitle;
|
||||
String _currentSubtitle = AppConfig.defaultArtist;
|
||||
|
||||
StreamingPlaybackStatus get playbackStatus => _playbackStatus;
|
||||
bool get isPlaying => _playbackStatus == StreamingPlaybackStatus.playing;
|
||||
@@ -145,9 +146,9 @@ class StreamingAudioBusinessObject extends ChangeNotifier {
|
||||
return;
|
||||
}
|
||||
|
||||
final title = item.title.trim().isEmpty ? 'KRYZ Live Stream' : item.title;
|
||||
final title = item.title.trim().isEmpty ? AppConfig.defaultTitle : item.title;
|
||||
final subtitle =
|
||||
(item.artist ?? '').trim().isEmpty ? 'KRYZ Radio' : item.artist!.trim();
|
||||
(item.artist ?? '').trim().isEmpty ? AppConfig.defaultArtist : item.artist!.trim();
|
||||
|
||||
if (title == _currentTitle && subtitle == _currentSubtitle) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user