Minor change.

This commit is contained in:
stonega 2021-02-17 00:57:20 +08:00
parent 48922e65cc
commit b3e57be396
1 changed files with 9 additions and 20 deletions

View File

@ -1,7 +1,5 @@
import 'dart:convert';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'package:tsacdop/type/episodebrief.dart'; import '../episodebrief.dart';
part 'searchepisodes.g.dart'; part 'searchepisodes.g.dart';
@JsonSerializable() @JsonSerializable()
@ -39,28 +37,19 @@ class OnlineEpisode {
final String audio; final String audio;
final String thumbnail; final String thumbnail;
OnlineEpisode({this.title, this.pubDate, this.length, this.audio, this.thumbnail}); OnlineEpisode(
{this.title, this.pubDate, this.length, this.audio, this.thumbnail});
factory OnlineEpisode.fromJson(Map<String, dynamic> json) => factory OnlineEpisode.fromJson(Map<String, dynamic> json) =>
_$OnlineEpisodeFromJson(json); _$OnlineEpisodeFromJson(json);
Map<String, dynamic> toJson() => _$OnlineEpisodeToJson(this); Map<String, dynamic> toJson() => _$OnlineEpisodeToJson(this);
EpisodeBrief get toEpisode { EpisodeBrief get toEpisode {
return EpisodeBrief( return EpisodeBrief(
title, title, audio, 0, pubDate, title, '', length ?? 0, 0, '', 0,
audio,
0,
pubDate,
title,
'',
length ?? 0,
0,
'',
0,
mediaId: audio, mediaId: audio,
skipSecondsEnd: 0, skipSecondsEnd: 0,
skipSecondsStart: 0, skipSecondsStart: 0,
chapterLink: '', chapterLink: '',
episodeImage: thumbnail episodeImage: thumbnail);
);
} }
} }