-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added syncing page layout (adaptive)
- chore: added .pyi files for better IDE working - added realization for easy cover update in SongCard for future
- Loading branch information
Showing
30 changed files
with
606 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def _(_msg: str, /) -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from gi.repository import Adw, Gtk | ||
|
||
class BoxDialog(Adw.Dialog): | ||
"""Dialog with lines of `Adw.ActionRow(s)` with provided content | ||
Parameters | ||
---------- | ||
label : str | ||
Label of the dialog | ||
lines_content : tuple | ||
titles and subtitles of `Adw.ActionRow(s)`. Like `(("1st Title", "1st subtitle"), ("2nd title", "2nd subtitle"), ...)` | ||
GTK Objects | ||
---------- | ||
:: | ||
diaglog_title_label : Gtk.Label -> Label of the dialog | ||
props_list : Gtk.ListBox -> ListBox with `Adw.ActionRow(s)` with provided data | ||
""" | ||
|
||
dialog_title_label: Gtk.Label | ||
props_list: Gtk.ListBox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from typing import Union | ||
|
||
from gi.repository import Gtk | ||
|
||
from chronograph.utils.file_mutagen_id3 import FileID3 | ||
from chronograph.utils.file_mutagen_vorbis import FileVorbis # type: ignore | ||
|
||
class SongCard(Gtk.Box): | ||
"""Card with Title, Artist and Cover of provided file | ||
Parameters | ||
---------- | ||
file : Union[FileID3, FileVorbis] | ||
File of `.ogg`, `.flac`, `.mp3` and `.wav` formats | ||
GTK Objects | ||
---------- | ||
:: | ||
buttons_revealer: Gtk.Revealer -> Revealer for Play and Edit buttons | ||
play_button: Gtk.Button -> Play button | ||
metadata_editor_button: Gtk.Button -> Metadata editor button | ||
cover_button: Gtk.Button -> Clickable cover of song | ||
cover: Gtk.Image -> Cover image of song | ||
title_label: Gtk.Label -> Title of song | ||
artist_label: Gtk.Label -> Artist of song | ||
""" | ||
|
||
buttons_revealer: Gtk.Revealer | ||
play_button: Gtk.Button | ||
metadata_editor_button: Gtk.Button | ||
info_button: Gtk.Button | ||
cover_button: Gtk.Button | ||
cover_img: Gtk.Image | ||
title_label: Gtk.Label | ||
artist_label: Gtk.Label | ||
|
||
_file: Union[FileID3, FileVorbis] | ||
|
||
def toggle_buttons(self, *_args) -> None: ... | ||
def invalidate_update(self, property: str) -> None: ... | ||
def invalidate_cover(self) -> None: ... | ||
def bind_props(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from typing import Union | ||
|
||
from gi.repository import Gdk | ||
|
||
class BaseFile: | ||
"""A base class for mutagen filetypes classes | ||
Parameters | ||
---------- | ||
path : str | ||
A path to file for loading | ||
Props | ||
-------- | ||
:: | ||
title : str -> Title of song | ||
artist : str -> Artist of song | ||
album : str -> Album of song | ||
cover : Gdk.Texture | str -> Cover of song | ||
""" | ||
|
||
_title: str | ||
_artist: str | ||
_album: str | ||
_cover: Union[bytes, str] | ||
_mutagen_file: dict | ||
|
||
_path: str | ||
|
||
def load_from_file(self, path: str) -> None: ... | ||
def get_cover_texture(self) -> Union[Gdk.Texture, str]: ... | ||
def load_str_data(self) -> None: ... | ||
def load_cover(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from .file import BaseFile | ||
|
||
class FileID3(BaseFile): | ||
"""A ID3 compatible file class. Inherited from `BaseFile` | ||
Parameters | ||
-------- | ||
path : str | ||
A path to file for loading | ||
""" | ||
|
||
def load_cover(self) -> None: ... | ||
def load_str_data(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from .file import BaseFile | ||
|
||
class FileVorbis(BaseFile): | ||
"""A Vorbis (ogg, flac) compatible file class. Inherited from `BaseFile` | ||
Parameters | ||
-------- | ||
path : str | ||
A path to file for loading | ||
""" | ||
|
||
def load_cover(self) -> None: ... | ||
def load_str_data(self, tags: list = ["title", "artist", "album"]) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from typing import Union | ||
|
||
from chronograph.utils.file_mutagen_id3 import FileID3 | ||
from chronograph.utils.file_mutagen_vorbis import FileVorbis | ||
|
||
def dir_parser(path: str, *_args) -> None: ... | ||
def songcard_idle(file: Union[FileID3, FileVorbis]) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from gi.repository import Gio, Gtk # type: ignore | ||
|
||
def select_dir(*_args) -> None: ... | ||
def on_selected_dir(file_dialog: Gtk.FileDialog, result: Gio.Task) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.