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

Release 1.18.0 #1418

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Binary file added assets/img/flag/cnr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/img/flag/he.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion lib/l10n/intl_ar.arb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
"@duaaElEftarText": {
"description": "اللهم اني لگ صمت وعلى رزقك افطرت واليك انبت وعليگ توكلت ذهب الظما وابتلت العروق وثبت الاجر انشاء الله"
},
"secondaryScreenExplanation": "غرفة الصلاة الثانوية )غرفة النساء أو طابق آخر على سبيل المثال(، ستظهر هذه الشاشة البث المباشر للجمعة إذا تم تفعيله على حساب MAWAQIT",
"secondaryScreenExplanation": "غرفة الصلاة الثانوية (غرفة النساء أو طابق آخر على سبيل المثال)، ستظهر هذه الشاشة البث المباشر للجمعة إذا تم تفعيله على حساب MAWAQIT",
"mainScreenExplanation": "غرفة المسجد الرئيسية، هذه الشاشة لن تظهر البث المباشر للجمعة",
"normalModeExplanation": "ستظهر الشاشة العادية مع أوقات الصلاة والإعلانات.",
"announcementOnlyModeExplanation": "ستظهر الإعلانات طوال الوقت",
Expand Down Expand Up @@ -365,6 +365,21 @@
"installingUpdate": "جارٍ تنزيل التحديث...",
"updateCompletedSuccessfully": "تم التحديث بنجاح",
"updateFailed": "فشل التحديث",
"save": "حفظ",
"enterRtspUrl": "أدخل رابط RTSP أو YouTube Live",
"addRtspUrl": "أضف رابط بث كاميرا RTSP الخاص بك أدناه",
"enableRtspCamera": "تفعيل بث الكاميرا",
"rtspCameraSettings": "إعدادات الكاميرا",
"invalidRtspUrl": "رابط RTSP غير صالح. يرجى التحقق من الرابط والمحاولة مرة أخرى.",
"validRtspUrl": "تم التحقق من رابط RTSP وحفظه بنجاح.",
"rtspCameraSettingTitle": "اتصال الكاميرا المباشر",
"rtspCameraSettingDesc": "اتصل بالكاميرا المحلية واعرض بث صلاة الجمعة على شاشة التلفاز.",
"rtspCameraSettingScreenDesc": "إذا أدخلت رابطًا هنا، ستتحول شاشتك تلقائيًا إلى وضع بث الفيديو عند وصول وقت الجمعة.",
"validatingStream": "جارٍ التحقق من البث...",
"checkInternetLiveCamera": "يجب عليك الاتصال بالإنترنت لإعداد الكاميرا ",
"somethingWentWrong": "حدث خطأ ما! يرجى المحاولة مرة أخرى",
"somethingWrong": "حدث خطأ ما",
"tryAgainLater": "يرجى المحاولة لاحقًا",
"checkInternetUpdate": "يجب عليك الاتصال بالإنترنت للتحقق من وجود تحديثات جديدة",
"appUpdateAvailable": "تطبيقك يعمل بالإصدار {currentVersion}. تحديث جديد (الإصدار {updatedVersion}) متوفر مع أحدث الميزات والتحسينات.",
"@appUpdateAvailable": {
Expand Down
369 changes: 369 additions & 0 deletions lib/l10n/intl_cnr.arb

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,22 @@
"installingUpdate": "Installing update...",
"updateCompletedSuccessfully": "Update completed successfully",
"updateFailed": "Update failed",
"save":"Save",
"enterRtspUrl":"Enter RTSP or Youtube Live URL",
"addRtspUrl":"Add your camera stream URL below",
"enableRtspCamera":"Enable Camera Streaming",
"rtspCameraSettings":"Camera Settings",
"invalidRtspUrl":"Invalid URL. Please check the URL and try again.",
"validRtspUrl":"URL validated and saved successfully.",
"rtspCameraSettingTitle":"Live camera connection",
"rtspCameraSettingDesc":"Connect to your local camera and display jumua prayer stream on the TV screen.",
"rtspCameraSettingScreenDesc":"If you enter a URL here, your screen will automatically switch to video streaming when Jumua time arrives",
"validatingStream":"Validating Stream...",
"checkInternetLiveCamera": "You must connect to internet to setup the live camera",
"somethingWentWrong": "Something went wrong! please try again",
"somethingWrong": "Something went wrong",
"tryAgainLater": "Please try again later",
"hintTextRtspUrl": "rtsp://... or https://youtube.com/live/...",
"checkInternetUpdate": "You must connect to internet to check for new updates",
"appUpdateAvailable": "Your app is running version {currentVersion}. A new update (version {updatedVersion}) is available with the latest features and improvements.",
"@appUpdateAvailable": {
Expand All @@ -380,5 +396,4 @@
}
}
}

}
87 changes: 52 additions & 35 deletions lib/l10n/intl_fr.arb

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ import 'package:mawaqit/src/pages/SplashScreen.dart';
import 'package:mawaqit/src/services/audio_manager.dart';
import 'package:mawaqit/src/services/FeatureManager.dart';
import 'package:mawaqit/src/services/mosque_manager.dart';
import 'package:mawaqit/src/services/settings_manager.dart';
import 'package:mawaqit/src/services/theme_manager.dart';
import 'package:mawaqit/src/services/user_preferences_manager.dart';
import 'package:media_kit/media_kit.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:sizer/sizer.dart';
import 'package:timezone/data/latest.dart' as tz;
import 'package:mawaqit/src/routes/route_generator.dart';
import 'package:montenegrin_localization/montenegrin_localization.dart';

final logger = Logger();

Expand All @@ -51,6 +52,7 @@ Future<void> main() async {
Hive.registerAdapter(SurahModelAdapter());
Hive.registerAdapter(ReciterModelAdapter());
Hive.registerAdapter(MoshafModelAdapter());
MediaKit.ensureInitialized();
runApp(
riverpod.ProviderScope(
child: MyApp(),
Expand All @@ -72,7 +74,6 @@ class MyApp extends riverpod.ConsumerWidget {
ChangeNotifierProvider(create: (context) => ThemeNotifier()),
ChangeNotifierProvider(create: (context) => AppLanguage()),
ChangeNotifierProvider(create: (context) => MosqueManager()),
ChangeNotifierProvider(create: (context) => SettingsManager()),
ChangeNotifierProvider(create: (context) => AudioManager()),
ChangeNotifierProvider(create: (context) => FeatureManager(context)),
ChangeNotifierProvider(create: (context) => UserPreferencesManager(), lazy: false),
Expand Down Expand Up @@ -109,6 +110,9 @@ class MyApp extends riverpod.ConsumerWidget {
AnalyticsWrapper.observer(),
],
localizationsDelegates: [
MontenegrinMaterialLocalizations.delegate,
MontenegrinWidgetsLocalizations.delegate,
MontenegrinCupertinoLocalizations.delegate,
S.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
Expand Down
1 change: 1 addition & 0 deletions lib/src/const/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,6 @@ class Config {
"yo": {"name": "Yoruba", "nativeName": "Yorùbá"},
"za": {"name": "Zhuang, Chuang", "nativeName": "Saɯ cueŋƅ, Saw cuengh"},
"zu": {"name": "Zulu", "nativeName": "Zulu"},
"cnr": {"name": "Montenegrin", "nativeName": "Crnogorski"}
};
}
21 changes: 21 additions & 0 deletions lib/src/const/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,28 @@ abstract class SystemFeaturesConstant {
static const String kEthernet = 'android.hardware.ethernet';
}

abstract class MawaqitBackendSettingsConstant {
static const String kSettingsTitle = "Mawaqit";
static const String kSettingsShare =
"Download Mawaqit\r\nAndroid:\r\nhttps:\/\/play.google.com\/store\/apps\/details?id=com.mawaqit.admin\r\niOS:\r\nhttps:\/\/apps.apple.com\/fr\/app\/mawaqit-prayer-times-mosque\/id1460522683\r\n";
static const String kSettingsAndroidUserAgent =
"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/95.0.4638.69 Safari\/537.36";
static const String kSettingsIosUserAgent =
"Mozilla\/5.0 (iPhone; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) CriOS\/90.0.4430.78 Mobile\/15E148 Safari\/604.1";
}

abstract class ManualUpdateConstant {
static const String githubApiBaseUrl = 'https://api.github.com/repos/mawaqit/android-tv-app/releases';
static const String githubAcceptHeader = 'application/vnd.github.v3+json';
}

abstract class RtspCameraStreamConstant {
static const maxRetries = 3;
static const retryDelay = Duration(seconds: 2);
static const prefKeyEnabled = 'rtsp_enabled';
static const prefKeyUrl = 'rtsp_url';
static const String youtubeUrlPattern =
r'http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?‌​[\w\?‌​=]*)?';

static final RegExp youtubeUrlRegex = RegExp(youtubeUrlPattern);
}
40 changes: 40 additions & 0 deletions lib/src/domain/error/rtsp_expceptions.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
abstract class RTSPCameraException implements Exception {
final String message;
final String errorCode;

RTSPCameraException(this.message, this.errorCode);

@override
String toString() => 'Error ($errorCode): $message';
}

class RTSPInitializationException extends RTSPCameraException {
RTSPInitializationException(String message)
: super('Error during RTSP initialization: $message', 'RTSP_INITIALIZATION_ERROR');
}

class RTSPToggleException extends RTSPCameraException {
RTSPToggleException(String message) : super('Error toggling RTSP camera: $message', 'RTSP_TOGGLE_ERROR');
}

class InvalidRTSPURLException extends RTSPCameraException {
InvalidRTSPURLException(String message) : super('Invalid RTSP URL: $message', 'INVALID_RTSP_URL_ERROR');
}

class URLNotProvidedRTSPURLException extends RTSPCameraException {
URLNotProvidedRTSPURLException(String message)
: super('URL not provided: $message', 'URL_NOT_PROVIDED_RTSP_URL_ERROR');
}

class YouTubeVideoIdExtractionException extends RTSPCameraException {
YouTubeVideoIdExtractionException(String message)
: super('Error extracting YouTube video ID: $message', 'YOUTUBE_VIDEO_ID_EXTRACTION_ERROR');
}

class RTSPStreamUpdateException extends RTSPCameraException {
RTSPStreamUpdateException(String message) : super('Error updating RTSP stream: $message', 'RTSP_STREAM_UPDATE_ERROR');
}

class RTSPUnknownException extends RTSPCameraException {
RTSPUnknownException(String message) : super('Unknown RTSP error: $message', 'RTSP_UNKNOWN_ERROR');
}
Loading