Skip to content

Commit cf13fbc

Browse files
author
phanstudio
committed
audio working again
1 parent 6bad2b1 commit cf13fbc

File tree

9 files changed

+648
-189
lines changed

9 files changed

+648
-189
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Welcome to the Flet Book Reader App! This application is built using Flet, a Pyt
3131

3232
Follow these steps to set up the Flet Book Reader App locally:
3333

34+
- use python < 3.12
35+
3436
1. **Clone the Repository:**
3537
```bash
3638
git clone https://github.com/your-username/flet-reader.git

main.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,9 @@
11
import flet as ft
2-
import shutil
32
from Utility import *
4-
from user_controls import (BookProgressSheet)
5-
from pages import subpage2, loads
6-
import flet.canvas as cv
3+
from user_controls import BookProgressSheet
74
from view import routes
85

96

10-
def checking(troute, page):
11-
inf = page.client_storage.get(f'Book.{troute.id}')
12-
ld = [[],[]]
13-
if len(inf[1]) > 0:
14-
if int(troute.num) in inf[1]:
15-
for i in inf[1]:
16-
if int(troute.num) == i:
17-
pat = os.path.normpath(f'Books/{troute.id}/sub/{i}.srt')
18-
ld = loads(os.path.join(ROOTPATH, pat))
19-
return ld, inf
20-
21-
# def main(page: pG) -> None:
22-
# dpo = quick_note(List_Tile, page)
23-
# sub = subpage2(page, dpo)
24-
# dpol = sections_pg(List_Tile, page, sub.content) # note
25-
# sub.content.nox = dpol
26-
# # sub.content.audio1.src =
27-
# # whe src is added is when the song is loaded so and a try catch
28-
29-
# if troute.match('/lib/:id/:num'):
30-
# page.overlay.append(Column([dpo], alignment=MainAxisAlignment.END)) # animate
31-
# page.overlay.append(dpol)
32-
# update_current(page, troute.id, troute.num)
33-
# ld, inf = checking(troute, page)
34-
# sub.content.load(troute.id, troute.num, inf[3], ld,
35-
# src=f'{inf[0]}/parts/{int(troute.num)*5}.mp3')
36-
# sub.content.audio1.outside = None
37-
# page.overlay.append(sub.content.audio1)
38-
39-
# page.views.append(
40-
# View(
41-
# route=f'/lib/{troute.id}/{troute.num}',
42-
# controls=[sub,],
43-
# vertical_alignment= MainAxisAlignment.CENTER,
44-
# horizontal_alignment= CrossAxisAlignment.CENTER,
45-
# spacing= 26,
46-
# )
47-
# )
48-
49-
# from utility import LoadingView, defualt_theme, AlertControl, overlay
50-
517
def metadata(page: ft.Page):
528
page.title = "BookReader"
539
page.theme_mode = 'Light'

pages/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from .player import *
File renamed without changes.

user_controls/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
from user_controls.note import *
33
from user_controls.reading import *
44
from user_controls.navbar import *
5-
from .list_tile import *
5+
from .list_tile import *
6+
from .player import *

0 commit comments

Comments
 (0)