adjust lecture pickure to new script class
This commit is contained in:
parent
7cbb6ea389
commit
896c90a822
1 changed files with 5 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
from courses import Courses
|
from courses import Courses
|
||||||
from rofi import rofi
|
from rofi import rofi
|
||||||
from utils import generate_short_title, MAX_LEN
|
from utils import generate_short_title
|
||||||
|
from config import MAX_LEN
|
||||||
|
|
||||||
lectures = Courses().current.lectures
|
script = Courses().current.script
|
||||||
|
lectures = script.lectures
|
||||||
|
|
||||||
sorted_lectures = sorted(lectures, key=lambda l: -l.number)
|
sorted_lectures = sorted(lectures, key=lambda l: -l.number)
|
||||||
|
|
||||||
|
@ -28,5 +30,5 @@ key, index, selected = rofi('Select lecture', options, [
|
||||||
if key == 0:
|
if key == 0:
|
||||||
sorted_lectures[index].edit()
|
sorted_lectures[index].edit()
|
||||||
elif key == 1:
|
elif key == 1:
|
||||||
new_lecture = lectures.new_lecture()
|
new_lecture = script.new_lecture()
|
||||||
new_lecture.edit()
|
new_lecture.edit()
|
||||||
|
|
Loading…
Reference in a new issue