1
0
mirror of https://github.com/stonega/tsacdop synced 2025-02-18 04:20:37 +01:00

Support add by rss link

This commit is contained in:
stonegate 2020-04-19 03:46:10 +08:00
parent c465be2470
commit 29018b8c20
6 changed files with 13 additions and 11 deletions

View File

@ -23,7 +23,7 @@ The podcasts search engine is powered by [ListenNotes](https://listennotes.com).
* OMPL file export and import
* Auto syncing in background
* Listen and subscribe history record
* Dark mode/ Accent color personalization
* Dark mode / Accent color personalization
* Download for offline playing
More to come...

View File

@ -47,7 +47,7 @@ android {
applicationId "com.stonegate.tsacdop"
minSdkVersion 19
targetSdkVersion 28
versionCode 3
versionCode 4
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -290,7 +290,10 @@ class AudioPlayerNotifier extends ChangeNotifier {
AudioService.playbackStateStream.listen((event) async {
_current = DateTime.now();
_audioState = event?.basicState;
if (_audioState == BasicPlaybackState.stopped) _playerRunning = false;
if (_audioState == BasicPlaybackState.stopped) {
_playerRunning = false;
if (_switchValue > 0) _switchValue = 0;
}
if (_audioState == BasicPlaybackState.error) {
_remoteErrorMessage = 'Network Error';
@ -648,6 +651,7 @@ class AudioPlayerTask extends BackgroundAudioTask {
void onStop() async {
await _audioPlayer.stop();
_setState(state: BasicPlaybackState.stopped);
await Future.delayed(Duration(milliseconds: 500));
_completer.complete();
}

View File

@ -475,13 +475,13 @@ class _MenuBarState extends State<MenuBar> {
return snapshot.hasData
? snapshot.data.seekValue > 0.95
? Container(
height: 20,
height: 25,
padding: EdgeInsets.symmetric(horizontal: 15),
child: SizedBox(
width: 20,
height: 20,
width: 25,
height: 25,
child: CustomPaint(
painter: ListenedPainter(context.accentColor,
painter: ListenedAllPainter(context.accentColor,
stroke: 2.0),
),
),

View File

@ -100,7 +100,7 @@ class _MyHomePageDelegate extends SearchDelegate<int> {
static Future<List> getList(String searchText) async {
String apiKey = environment['apiKey'];
String url =
"https://listennotes.p.mashape.com/api/v1/search?only_in=title%2Cdescription&q=" +
"https://listennotes.p.rapidapi.com/api/v1/search?only_in=title%2Cdescription&q=" +
searchText +
"&sort_by_date=0&type=podcast";
Response response = await Dio().get(url,

View File

@ -74,10 +74,8 @@ class _PopupMenuState extends State<PopupMenu> {
return '1 hour ago';
} else if (diffrence.inHours < 24) {
return '${diffrence.inHours} hours ago';
} else if (diffrence.inHours == 24) {
return '1 day ago';
} else if (diffrence.inDays < 7) {
return '${diffrence.inDays} days ago';
return '${diffrence.inDays} day ago';
} else {
return DateFormat.yMMMd()
.format(DateTime.fromMillisecondsSinceEpoch(refreshDate));