180 lines
5.4 KiB
Python
180 lines
5.4 KiB
Python
from django.urls import path
|
|
from scrobbles import views
|
|
from tasks.webhooks import EmacsWebhookView, TodoistWebhookView
|
|
|
|
app_name = "scrobbles"
|
|
|
|
urlpatterns = [
|
|
path("calendar/", views.ScrobbleCalendarView.as_view(), name="calendar"),
|
|
path("search/", views.ScrobbleSearchView.as_view(), name="search"),
|
|
path("status/", views.ScrobbleStatusView.as_view(), name="status"),
|
|
path(
|
|
"widget/top-artists/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopArtistsWidget.as_view(),
|
|
name="embeddable-top-artists",
|
|
),
|
|
path(
|
|
"widget/top-board-games/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopBoardGamesWidget.as_view(),
|
|
name="embeddable-top-board-games",
|
|
),
|
|
path(
|
|
"widget/top-books/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopBooksWidget.as_view(),
|
|
name="embeddable-top-books",
|
|
),
|
|
path(
|
|
"widget/top-trails/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopTrailsWidget.as_view(),
|
|
name="embeddable-top-trails",
|
|
),
|
|
path(
|
|
"widget/top-foods/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopFoodsWidget.as_view(),
|
|
name="embeddable-top-foods",
|
|
),
|
|
path(
|
|
"widget/top-tasks/<str:period>/<int:user_id>/",
|
|
views.EmbeddableTopTasksWidget.as_view(),
|
|
name="embeddable-top-tasks",
|
|
),
|
|
path(
|
|
"manual/lookup/",
|
|
views.ManualScrobbleView.as_view(),
|
|
name="lookup-manual-scrobble",
|
|
),
|
|
path(
|
|
"long-play-finish/<slug:uuid>/",
|
|
views.scrobble_longplay_finish,
|
|
name="longplay-finish",
|
|
),
|
|
path(
|
|
"upload/audioscrobbler/",
|
|
views.AudioScrobblerImportCreateView.as_view(),
|
|
name="audioscrobbler-file-upload",
|
|
),
|
|
path(
|
|
"upload/koreader/",
|
|
views.KoReaderImportCreateView.as_view(),
|
|
name="koreader-file-upload",
|
|
),
|
|
path(
|
|
"upload/scale/",
|
|
views.ScaleCSVImportCreateView.as_view(),
|
|
name="scale-csv-upload",
|
|
),
|
|
path(
|
|
"upload/trail-gpx/",
|
|
views.TrailGPXImportCreateView.as_view(),
|
|
name="trail-gpx-upload",
|
|
),
|
|
path(
|
|
"lastfm-import/",
|
|
views.lastfm_import,
|
|
name="lastfm-import",
|
|
),
|
|
path(
|
|
"webhook/web-scrobbler/",
|
|
views.WebScrobblerWebhookView.as_view(),
|
|
name="web-scrobbler-webhook",
|
|
),
|
|
path(
|
|
"webhook/gps/",
|
|
views.GPSWebhookView.as_view(),
|
|
name="gps-webhook",
|
|
),
|
|
path(
|
|
"webhook/jellyfin/",
|
|
views.JellyfinWebhookView.as_view(),
|
|
name="jellyfin-webhook",
|
|
),
|
|
path(
|
|
"webhook/mopidy/",
|
|
views.MopidyWebhookView.as_view(),
|
|
name="mopidy-webhook",
|
|
),
|
|
path("webhook/todoist/", TodoistWebhookView.as_view(), name="todoist-webhook"),
|
|
path("webhook/emacs/", EmacsWebhookView.as_view(), name="emacs_webhook"),
|
|
path("export/", views.export, name="export"),
|
|
path(
|
|
"imports/",
|
|
views.ScrobbleImportListView.as_view(),
|
|
name="import-detail",
|
|
),
|
|
path("export/", views.export, name="export"),
|
|
path(
|
|
"imports/",
|
|
views.ScrobbleImportListView.as_view(),
|
|
name="import-detail",
|
|
),
|
|
path(
|
|
"imports/tsv/<slug:slug>/",
|
|
views.ScrobbleTSVImportDetailView.as_view(),
|
|
name="tsv-import-detail",
|
|
),
|
|
path(
|
|
"imports/lastfm/<slug:slug>/",
|
|
views.ScrobbleLastFMImportDetailView.as_view(),
|
|
name="lastfm-import-detail",
|
|
),
|
|
path(
|
|
"imports/koreader/<slug:slug>/",
|
|
views.ScrobbleKoReaderImportDetailView.as_view(),
|
|
name="koreader-import-detail",
|
|
),
|
|
path(
|
|
"imports/retroarch/<slug:slug>/",
|
|
views.ScrobbleRetroarchImportDetailView.as_view(),
|
|
name="retroarch-import-detail",
|
|
),
|
|
path(
|
|
"imports/bgstats/<slug:slug>/",
|
|
views.ScrobbleBGStatsImportDetailView.as_view(),
|
|
name="bgstats-import-detail",
|
|
),
|
|
path(
|
|
"imports/scale/<slug:slug>/",
|
|
views.ScrobbleScaleCSVImportDetailView.as_view(),
|
|
name="scale-csv-import-detail",
|
|
),
|
|
path(
|
|
"imports/trail-gpx/<slug:slug>/",
|
|
views.ScrobbleTrailGPXImportDetailView.as_view(),
|
|
name="trail-gpx-import-detail",
|
|
),
|
|
path(
|
|
"imports/ebird-csv/<slug:slug>/",
|
|
views.ScrobbleBirdingCSVImportDetailView.as_view(),
|
|
name="ebird-csv-import-detail",
|
|
),
|
|
path(
|
|
"long-plays/",
|
|
views.ScrobbleLongPlaysView.as_view(),
|
|
name="long-plays",
|
|
),
|
|
path("scrobbles/", views.ScrobbleListView.as_view(), name="scrobble-list"),
|
|
path(
|
|
"scrobbles/<slug:uuid>/",
|
|
views.ScrobbleDetailView.as_view(),
|
|
name="detail",
|
|
),
|
|
path(
|
|
"scrobbles/<slug:uuid>/add-to-mopidy-queue/",
|
|
views.add_to_mopidy_queue,
|
|
name="add-to-mopidy-queue",
|
|
),
|
|
path(
|
|
"scrobbles/<slug:uuid>/add-to-mopidy-monthly-playlist/",
|
|
views.add_to_mopidy_monthly_playlist,
|
|
name="add-to-mopidy-monthly-playlist",
|
|
),
|
|
path("scrobbles/<slug:uuid>/start/", views.scrobble_start, name="start"),
|
|
path("scrobbles/<slug:uuid>/finish/", views.scrobble_finish, name="finish"),
|
|
path("scrobbles/<slug:uuid>/cancel/", views.scrobble_cancel, name="cancel"),
|
|
path(
|
|
"favorite/<str:media_type>/<int:object_id>/toggle/",
|
|
views.toggle_favorite,
|
|
name="toggle-favorite",
|
|
),
|
|
]
|