public static SQLiteManager getInstance()
 {
     if (instance == null)
     {
         instance = new SQLiteManager();
     }
     return(instance);
 }
        public downloaded()
        {
            InitializeComponent();
            manager = SQLiteManager.getInstance();


            listview.ItemsSource = manager.GetData(SQLiteManager.dataType.downloadedAnime);
            ytdl = YtdlMethods.getInstance();
        }
        public lastwatched()
        {
            manager = SQLiteManager.getInstance();
            InitializeComponent();
            var veriler = manager.GetData();



            listview.ItemsSource = veriler;
            ytdl = YtdlMethods.getInstance();
        }
Exemple #4
0
        public DetailsPage(Anime anim)
        {
            InitializeComponent();
            DataContext = anim;
            RequestManager api = RequestManager.getInstance();

            anime         = api.getDetails(anim);
            ytdl          = YtdlMethods.getInstance();
            sqlitemanager = SQLiteManager.getInstance();
            Bolumler page = new Bolumler(anime, changeFrame);

            frame.Navigate(page);
        }
Exemple #5
0
        public VideoPlayer(Anime anim)
        {
            InitializeComponent();
            anime   = anim;
            manager = SQLiteManager.getInstance();

            Player.MediaPlayerInitialized += (obj, e) =>
            {
                string watchurl;
                watchurl = !string.IsNullOrEmpty(anime.episode.downloadLocation) ? anime.episode.downloadLocation : anime.episode.watchurl;

                player.EnableYouTubeDl();
                //TODO CONFİG DOSYASINI AYARLAR
                if (watchurl.Contains("sibnet"))
                {
                    player.API.SetPropertyString("ytdl-raw-options", "config-location=\".\\lib\\sibnet.conf\"");
                }



                player.Load(watchurl);
                player.MediaError  += onError;
                player.MediaLoaded += (o, s) =>
                {
                    float progress = anime.episode.progress;

                    if (progress != 0.0f)
                    {
                        Dispatcher.Invoke(() =>
                        {
                            player.Position = TimeSpan.FromMilliseconds(progress * player.Duration.TotalMilliseconds / 100);
                        });
                    }
                };
                player.Resume();
            };
        }
Exemple #6
0
 public YtdlMethods()
 {
     manager = SQLiteManager.getInstance();
 }