Loading changelog.d/scrobble-url.adddeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line Adds the capability to add a URL to a scrobble (optional field) lib/pleroma/web/api_spec/operations/pleroma_scrobble_operation.ex +1 −5 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ defp create_request do album: %Schema{type: :string, description: "The album of the media playing"}, artist: %Schema{type: :string, description: "The artist of the media playing"}, length: %Schema{type: :integer, description: "The length of the media playing"}, url: %Schema{type: :string, description: "A URL referencing the media playing"}, visibility: %Schema{ allOf: [VisibilityScope], default: "public", Loading @@ -68,8 +67,7 @@ defp create_request do "title" => "Some Title", "artist" => "Some Artist", "album" => "Some Album", "length" => 180_000, "url" => "https://www.last.fm/music/Some+Artist/_/Some+Title" "length" => 180_000 } } end Loading @@ -83,7 +81,6 @@ defp scrobble do title: %Schema{type: :string, description: "The title of the media playing"}, album: %Schema{type: :string, description: "The album of the media playing"}, artist: %Schema{type: :string, description: "The artist of the media playing"}, url: %Schema{type: :string, description: "A URL referencing the media playing"}, length: %Schema{ type: :integer, description: "The length of the media playing", Loading @@ -98,7 +95,6 @@ defp scrobble do "artist" => "Some Artist", "album" => "Some Album", "length" => 180_000, "url" => "https://www.last.fm/music/Some+Artist/_/Some+Title", "created_at" => "2019-09-28T12:40:45.000Z" } } Loading lib/pleroma/web/common_api/activity_draft.ex +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ def listen(user, params) do defp listen_object(draft) do object = draft.params |> Map.take([:album, :artist, :title, :length, :url]) |> Map.take([:album, :artist, :title, :length]) |> Map.new(fn {key, value} -> {to_string(key), value} end) |> Map.put("type", "Audio") |> Map.put("to", draft.to) Loading lib/pleroma/web/pleroma_api/views/scrobble_view.ex +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ def render("show.json", %{activity: %Activity{data: %{"type" => "Listen"}} = act title: object.data["title"] |> HTML.strip_tags(), artist: object.data["artist"] |> HTML.strip_tags(), album: object.data["album"] |> HTML.strip_tags(), url: object.data["url"], length: object.data["length"] } end Loading Loading
changelog.d/scrobble-url.adddeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line Adds the capability to add a URL to a scrobble (optional field)
lib/pleroma/web/api_spec/operations/pleroma_scrobble_operation.ex +1 −5 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ defp create_request do album: %Schema{type: :string, description: "The album of the media playing"}, artist: %Schema{type: :string, description: "The artist of the media playing"}, length: %Schema{type: :integer, description: "The length of the media playing"}, url: %Schema{type: :string, description: "A URL referencing the media playing"}, visibility: %Schema{ allOf: [VisibilityScope], default: "public", Loading @@ -68,8 +67,7 @@ defp create_request do "title" => "Some Title", "artist" => "Some Artist", "album" => "Some Album", "length" => 180_000, "url" => "https://www.last.fm/music/Some+Artist/_/Some+Title" "length" => 180_000 } } end Loading @@ -83,7 +81,6 @@ defp scrobble do title: %Schema{type: :string, description: "The title of the media playing"}, album: %Schema{type: :string, description: "The album of the media playing"}, artist: %Schema{type: :string, description: "The artist of the media playing"}, url: %Schema{type: :string, description: "A URL referencing the media playing"}, length: %Schema{ type: :integer, description: "The length of the media playing", Loading @@ -98,7 +95,6 @@ defp scrobble do "artist" => "Some Artist", "album" => "Some Album", "length" => 180_000, "url" => "https://www.last.fm/music/Some+Artist/_/Some+Title", "created_at" => "2019-09-28T12:40:45.000Z" } } Loading
lib/pleroma/web/common_api/activity_draft.ex +1 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ def listen(user, params) do defp listen_object(draft) do object = draft.params |> Map.take([:album, :artist, :title, :length, :url]) |> Map.take([:album, :artist, :title, :length]) |> Map.new(fn {key, value} -> {to_string(key), value} end) |> Map.put("type", "Audio") |> Map.put("to", draft.to) Loading
lib/pleroma/web/pleroma_api/views/scrobble_view.ex +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ def render("show.json", %{activity: %Activity{data: %{"type" => "Listen"}} = act title: object.data["title"] |> HTML.strip_tags(), artist: object.data["artist"] |> HTML.strip_tags(), album: object.data["album"] |> HTML.strip_tags(), url: object.data["url"], length: object.data["length"] } end Loading