Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
031d157b
Commit
031d157b
authored
1 year ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
refactor: new domain metadata generation
parent
62d210de
No related branches found
No related tags found
1 merge request
!35
ORM-less scheduling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aura_engine/resources.py
+10
-10
10 additions, 10 deletions
src/aura_engine/resources.py
with
10 additions
and
10 deletions
src/aura_engine/resources.py
+
10
−
10
View file @
031d157b
...
@@ -271,11 +271,11 @@ class ResourceUtil(Enum):
...
@@ -271,11 +271,11 @@ class ResourceUtil(Enum):
content_class
=
ResourceUtil
.
get_content_class
(
content_type
)
content_class
=
ResourceUtil
.
get_content_class
(
content_type
)
annotations
=
{
annotations
=
{
"
show_name
"
:
str
(
item
.
playlist
.
timeslot
.
show
_
name
),
"
show_name
"
:
str
(
item
.
playlist
.
timeslot
.
show
.
name
),
"
show_id
"
:
int
(
item
.
playlist
.
timeslot
.
show
_
id
),
"
show_id
"
:
int
(
item
.
playlist
.
timeslot
.
show
.
id
),
"
timeslot_id
"
:
int
(
item
.
playlist
.
timeslot
.
timeslot_
id
),
"
timeslot_id
"
:
int
(
item
.
playlist
.
timeslot
.
id
),
"
playlist_id
"
:
int
(
item
.
playlist
.
playlist_
id
),
"
playlist_id
"
:
int
(
item
.
playlist
.
id
),
"
playlist_entry
"
:
str
(
float
(
item
.
entry_num
)),
"
playlist_entry
"
:
str
(
float
(
item
.
get_position
()
)),
"
track_type
"
:
int
(
content_class
.
numeric
),
"
track_type
"
:
int
(
content_class
.
numeric
),
"
track_start
"
:
""
,
"
track_start
"
:
""
,
"
track_duration
"
:
-
1
,
"
track_duration
"
:
-
1
,
...
@@ -286,12 +286,12 @@ class ResourceUtil(Enum):
...
@@ -286,12 +286,12 @@ class ResourceUtil(Enum):
if
assign_track_start
:
if
assign_track_start
:
# Convert to current Liquidsoap date/time format
# Convert to current Liquidsoap date/time format
annotations
[
"
track_start
"
]
=
item
.
item
_start
.
strftime
(
"
%Y/%m/%d %H:%M:%S
"
)
annotations
[
"
track_start
"
]
=
item
.
get
_start
()
.
strftime
(
"
%Y/%m/%d %H:%M:%S
"
)
if
item
.
duration
and
item
.
duration
>
0
:
if
item
.
duration
and
item
.
duration
>
0
:
annotations
[
"
track_duration
"
]
=
item
.
duration
annotations
[
"
track_duration
"
]
=
item
.
duration
if
item
.
meta
_
data
:
if
item
.
metadata
:
annotations
[
"
track_title
"
]
=
str
(
item
.
meta
_
data
.
title
)
annotations
[
"
track_title
"
]
=
str
(
item
.
metadata
.
title
)
annotations
[
"
track_album
"
]
=
str
(
item
.
meta
_
data
.
album
)
annotations
[
"
track_album
"
]
=
str
(
item
.
metadata
.
album
)
annotations
[
"
track_artist
"
]
=
str
(
item
.
meta
_
data
.
artist
)
annotations
[
"
track_artist
"
]
=
str
(
item
.
metadata
.
artist
)
return
annotations
return
annotations
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment