Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72fded4097 | |||
| d5eea53a01 | |||
| a49eb31276 |
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "vrobbler"
|
name = "vrobbler"
|
||||||
version = "0.4.2"
|
version = "0.4.3"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Colin Powell <colin@unbl.ink>"]
|
authors = ["Colin Powell <colin@unbl.ink>"]
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,7 @@ class Video(ScrobblableMixin):
|
|||||||
"video_type": Video.VideoType.MOVIE,
|
"video_type": Video.VideoType.MOVIE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
series = None
|
||||||
if data_dict.get("ItemType", "") == "Episode":
|
if data_dict.get("ItemType", "") == "Episode":
|
||||||
series_name = data_dict.get("SeriesName", "")
|
series_name = data_dict.get("SeriesName", "")
|
||||||
series, series_created = Series.objects.get_or_create(
|
series, series_created = Series.objects.get_or_create(
|
||||||
@ -101,13 +102,15 @@ class Video(ScrobblableMixin):
|
|||||||
"tagline": data_dict.get("Tagline", None),
|
"tagline": data_dict.get("Tagline", None),
|
||||||
"run_time_ticks": data_dict.get("RunTimeTicks", 0) // 10000,
|
"run_time_ticks": data_dict.get("RunTimeTicks", 0) // 10000,
|
||||||
"run_time": convert_to_seconds(data_dict.get("RunTime", "")),
|
"run_time": convert_to_seconds(data_dict.get("RunTime", "")),
|
||||||
"tv_series_id": series.id,
|
|
||||||
"tvdb_id": data_dict.get("Provider_tvdb", None),
|
"tvdb_id": data_dict.get("Provider_tvdb", None),
|
||||||
"tvrage_id": data_dict.get("Provider_tvrage", None),
|
"tvrage_id": data_dict.get("Provider_tvrage", None),
|
||||||
"episode_number": data_dict.get("EpisodeNumber", ""),
|
"episode_number": data_dict.get("EpisodeNumber", ""),
|
||||||
"season_number": data_dict.get("SeasonNumber", ""),
|
"season_number": data_dict.get("SeasonNumber", ""),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if series:
|
||||||
|
video_extra_dict["tv_series_id"] = series.id
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
logger.debug(f"Created new video: {video}")
|
logger.debug(f"Created new video: {video}")
|
||||||
for key, value in video_extra_dict.items():
|
for key, value in video_extra_dict.items():
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
|
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" aria-current="page" href="#">
|
<a class="nav-link active" aria-current="page" href="/">
|
||||||
<span data-feather="music"></span>
|
<span data-feather="music"></span>
|
||||||
Dashboard
|
Dashboard
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content" id="myTabContent">
|
<div class="tab-content" id="myTabContent">
|
||||||
<div class="tab-pane fade show" id="artists-week" role="tabpanel" aria-labelledby="artists-week-tab">
|
<div class="tab-pane fade show active" id="artists-week" role="tabpanel" aria-labelledby="artists-week-tab">
|
||||||
<h2>Top artists this week</h2>
|
<h2>Top artists this week</h2>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-sm">
|
<table class="table table-striped table-sm">
|
||||||
@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="tracks-week" role="tabpanel" aria-labelledby="tracks-week-tab">
|
<div class="tab-pane fade show" id="tracks-week" role="tabpanel" aria-labelledby="tracks-week-tab">
|
||||||
<h2>Top tracks this week</h2>
|
<h2>Top tracks this week</h2>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-sm">
|
<table class="table table-striped table-sm">
|
||||||
@ -92,6 +92,9 @@
|
|||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-watched" type="button" role="tab" aria-controls="profile" aria-selected="false">Latest Watched</button>
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-watched" type="button" role="tab" aria-controls="profile" aria-selected="false">Latest Watched</button>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#latest-podcasted" type="button" role="tab" aria-controls="profile" aria-selected="false">Latest Podcasted</button>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content" id="myTabContent2">
|
<div class="tab-content" id="myTabContent2">
|
||||||
@ -128,7 +131,6 @@
|
|||||||
<th scope="col">Time</th>
|
<th scope="col">Time</th>
|
||||||
<th scope="col">Title</th>
|
<th scope="col">Title</th>
|
||||||
<th scope="col">Series</th>
|
<th scope="col">Series</th>
|
||||||
<th scope="col">Source</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -137,7 +139,30 @@
|
|||||||
<td>{{scrobble.timestamp|naturaltime}}</td>
|
<td>{{scrobble.timestamp|naturaltime}}</td>
|
||||||
<td>{% if scrobble.video.tv_series %}E{{scrobble.video.season_number}}S{{scrobble.video.season_number}} -{% endif %} {{scrobble.video.title}}</td>
|
<td>{% if scrobble.video.tv_series %}E{{scrobble.video.season_number}}S{{scrobble.video.season_number}} -{% endif %} {{scrobble.video.title}}</td>
|
||||||
<td>{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}</td>
|
<td>{% if scrobble.video.tv_series %}{{scrobble.video.tv_series}}{% endif %}</td>
|
||||||
<td>{{scrobble.source}}</td>
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane fade show" id="latest-podcasted" role="tabpanel" aria-labelledby="latest-podcasted-tab">
|
||||||
|
<h2>Latest Podcasted</h2>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Date</th>
|
||||||
|
<th scope="col">Title</th>
|
||||||
|
<th scope="col">Podcast</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for scrobble in podcast_scrobble_list %}
|
||||||
|
<tr>
|
||||||
|
<td>{{scrobble.timestamp|naturaltime}}</td>
|
||||||
|
<td>{{scrobble.podcast_episode.title}}</td>
|
||||||
|
<td>{{scrobble.podcast_episode.podcast}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -1,12 +1,28 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<main class="col-md-4 ms-sm-auto col-lg-10 px-md-4">
|
||||||
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||||
|
<h1 class="h2">Movies</h1>
|
||||||
|
<div class="btn-toolbar mb-2 mb-md-0">
|
||||||
|
<div class="btn-group me-2">
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
|
||||||
|
<span data-feather="calendar"></span>
|
||||||
|
This week
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2>Movies</h2>
|
<div class="container">
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for movie in object_list %}
|
{% for movie in object_list %}
|
||||||
<li>{{movie}}</li>
|
<li>{{movie}}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
22
vrobbler/templates/videos/series_list.html
Normal file
22
vrobbler/templates/videos/series_list.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<main class="col-md-4 ms-sm-auto col-lg-10 px-md-4">
|
||||||
|
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||||
|
<h1 class="h2">Series</h1>
|
||||||
|
<div class="btn-toolbar mb-2 mb-md-0">
|
||||||
|
<div class="btn-group me-2">
|
||||||
|
<button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<ul>
|
||||||
|
{% for movie in object_list %}
|
||||||
|
<li>{{movie}}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user