Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladimir Vaskov
tuneit
Commits
b6663d1d
Commit
b6663d1d
authored
Jan 13, 2025
by
Anton Palgunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: module parsing
parent
e16823cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
__init__.py
src/shop/__init__.py
+4
-4
No files found.
src/shop/__init__.py
View file @
b6663d1d
...
@@ -15,7 +15,7 @@ from gi.repository import Gtk, Adw, Gdk, GObject, GLib
...
@@ -15,7 +15,7 @@ from gi.repository import Gtk, Adw, Gdk, GObject, GLib
GITHUB_API_URL
=
"https://api.github.com/search/repositories"
GITHUB_API_URL
=
"https://api.github.com/search/repositories"
GITLAB_API_URL
=
"https://gitlab.com/api/v4/projects"
GITLAB_API_URL
=
"https://gitlab.com/api/v4/projects"
CACHE_DIR
=
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
".cache"
,
"tuneit
_
shop"
)
CACHE_DIR
=
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
".cache"
,
"tuneit
"
,
"
shop"
)
if
not
os
.
path
.
exists
(
CACHE_DIR
):
if
not
os
.
path
.
exists
(
CACHE_DIR
):
os
.
makedirs
(
CACHE_DIR
,
exist_ok
=
True
)
os
.
makedirs
(
CACHE_DIR
,
exist_ok
=
True
)
...
@@ -119,7 +119,7 @@ def retrieve_modules_full_list(force_refresh=False, initial_page=1, per_page=30)
...
@@ -119,7 +119,7 @@ def retrieve_modules_full_list(force_refresh=False, initial_page=1, per_page=30)
"description"
:
item
[
"description"
]
or
""
,
"description"
:
item
[
"description"
]
or
""
,
"html_url"
:
item
[
"html_url"
],
"html_url"
:
item
[
"html_url"
],
"star_url"
:
item
[
"html_url"
]
+
"/stargazers"
,
"star_url"
:
item
[
"html_url"
]
+
"/stargazers"
,
"module_yaml"
:
module_info
"module_yaml"
:
module_info
[
0
]
})
})
# GitLab
# GitLab
...
@@ -142,7 +142,7 @@ def retrieve_modules_full_list(force_refresh=False, initial_page=1, per_page=30)
...
@@ -142,7 +142,7 @@ def retrieve_modules_full_list(force_refresh=False, initial_page=1, per_page=30)
"description"
:
item
[
"description"
]
or
""
,
"description"
:
item
[
"description"
]
or
""
,
"html_url"
:
item
[
"web_url"
],
"html_url"
:
item
[
"web_url"
],
"star_url"
:
item
[
"web_url"
]
+
"/-/starrers"
,
"star_url"
:
item
[
"web_url"
]
+
"/-/starrers"
,
"module_yaml"
:
module_info
"module_yaml"
:
module_info
[
0
]
})
})
# Сохраняем в кеш
# Сохраняем в кеш
...
@@ -238,7 +238,7 @@ class ModuleCard(Gtk.Box):
...
@@ -238,7 +238,7 @@ class ModuleCard(Gtk.Box):
if
module_data
[
"module_yaml"
]:
if
module_data
[
"module_yaml"
]:
cover_url
=
module_data
[
"module_yaml"
]
.
get
(
"cover"
,
""
)
cover_url
=
module_data
[
"module_yaml"
]
.
get
(
"cover"
,
""
)
if
cover_url
:
if
cover_url
:
# TODO: Загрузка обложки
# TODO: Загрузка обложки
в кеш и отображение
try
:
try
:
texture
=
Gdk
.
Texture
.
new_for_uri
(
cover_url
)
texture
=
Gdk
.
Texture
.
new_for_uri
(
cover_url
)
cover_image
=
Gtk
.
Image
.
new_from_paintable
(
texture
)
cover_image
=
Gtk
.
Image
.
new_from_paintable
(
texture
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment