[Setup] Added build.yaml and check.yaml (#1)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-09-21 11:59:28 +02:00 committed by GitHub
parent 226686eb18
commit 7b3e733b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
112 changed files with 3926 additions and 3784 deletions

View file

@ -85,7 +85,7 @@ class DashboardNotifier extends StateNotifier<HomeModel> {
final nextResponse = await api.showsNextUpGet(
limit: 16,
nextUpDateCutoff: DateTime.now()
.subtract(ref.read(clientSettingsProvider.select((value) => value.nextUpDateCutoff ?? Duration(days: 28)))),
.subtract(ref.read(clientSettingsProvider.select((value) => value.nextUpDateCutoff ?? const Duration(days: 28)))),
fields: [
ItemFields.parentid,
ItemFields.mediastreams,

View file

@ -33,7 +33,7 @@ final librarySearchProvider =
});
class LibrarySearchNotifier extends StateNotifier<LibrarySearchModel> {
LibrarySearchNotifier(this.ref) : super(LibrarySearchModel());
LibrarySearchNotifier(this.ref) : super(const LibrarySearchModel());
final Ref ref;
@ -379,7 +379,7 @@ class LibrarySearchNotifier extends StateNotifier<LibrarySearchModel> {
}
}
selectAll(bool select) => state = state.copyWith(selectedPosters: select ? state.posters : []);
LibrarySearchModel selectAll(bool select) => state = state.copyWith(selectedPosters: select ? state.posters : []);
Future<void> setSelectedAsFavorite(bool bool) async {
final Map<String, UserData> updateInfo = {};

View file

@ -23,7 +23,7 @@ class SessionInfo extends _$SessionInfo {
void _startTimer() {
_fetchData();
_timer = Timer.periodic(Duration(seconds: 2), (timer) async {
_timer = Timer.periodic(const Duration(seconds: 2), (timer) async {
await _fetchData();
});
}

View file

@ -130,7 +130,7 @@ class BookViewerSettingsNotifier extends StateNotifier<BookViewerSettingsModel>
}
}
setSavedBrightness() {
void setSavedBrightness() {
if (state.screenBrightness != null) {
ScreenBrightness().setScreenBrightness(state.screenBrightness!);
}

View file

@ -17,5 +17,5 @@ class HomeSettingsNotifier extends StateNotifier<HomeSettingsModel> {
ref.read(sharedUtilityProvider).homeSettings = value;
}
update(HomeSettingsModel Function(HomeSettingsModel currentState) value) => state = value(state);
HomeSettingsModel update(HomeSettingsModel Function(HomeSettingsModel currentState) value) => state = value(state);
}

View file

@ -27,14 +27,14 @@ class SubtitleSettingsNotifier extends StateNotifier<SubtitleSettingsModel> {
void setOutlineColor(Color e) => state = state.copyWith(outlineColor: e);
setOutlineThickness(double value) => state = state.copyWith(outlineSize: value);
SubtitleSettingsModel setOutlineThickness(double value) => state = state.copyWith(outlineSize: value);
void resetSettings({SubtitleSettingsModel? value}) => state = value ?? const SubtitleSettingsModel();
void setFontWeight(FontWeight? value) => state = state.copyWith(fontWeight: value);
setBackGroundOpacity(double value) =>
SubtitleSettingsModel setBackGroundOpacity(double value) =>
state = state.copyWith(backGroundColor: state.backGroundColor.withOpacity(value));
setShadowIntensity(double value) => state = state.copyWith(shadow: value);
SubtitleSettingsModel setShadowIntensity(double value) => state = state.copyWith(shadow: value);
}

View file

@ -36,7 +36,7 @@ class VideoPlayerSettingsProviderNotifier extends StateNotifier<VideoPlayerSetti
}
}
setSavedBrightness() {
void setSavedBrightness() {
if (state.screenBrightness != null) {
ScreenBrightness().setScreenBrightness(state.screenBrightness!);
}

View file

@ -8,9 +8,9 @@ FileDownloader backgroundDownloader(BackgroundDownloaderRef ref) {
return FileDownloader()
..trackTasks()
..configureNotification(
running: TaskNotification('Downloading', 'file: {filename}'),
complete: TaskNotification('Download finished', 'file: {filename}'),
paused: TaskNotification('Download paused', 'file: {filename}'),
running: const TaskNotification('Downloading', 'file: {filename}'),
complete: const TaskNotification('Download finished', 'file: {filename}'),
paused: const TaskNotification('Download paused', 'file: {filename}'),
progressBar: true,
);
}

View file

@ -375,7 +375,7 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
Future<DownloadStream?> syncVideoFile(SyncedItem syncItem, bool skipDownload) async {
final playbackResponse = await api.itemsItemIdPlaybackInfoPost(
itemId: syncItem.id,
body: PlaybackInfoDto(
body: const PlaybackInfoDto(
enableDirectPlay: true,
enableDirectStream: true,
enableTranscoding: false,

View file

@ -74,7 +74,7 @@ class VideoPlayerNotifier extends StateNotifier<MediaControlsWrapper> {
final lastPosition = ref.read(mediaPlaybackProvider.select((value) => value.lastPosition));
final diff = (position.inMilliseconds - lastPosition.inMilliseconds).abs();
if (diff > Duration(seconds: 1, milliseconds: 500).inMilliseconds) {
if (diff > const Duration(seconds: 1, milliseconds: 500).inMilliseconds) {
mediaState.update((value) => value.copyWith(
position: event,
playing: player.state.playing,