Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog



## v3.0.3

### [Fix]

- Change pickle path to addon directory



## v3.0.2

### [Fix]

- Temporary muzic file is now special://temp/deezer-temp.mp3



## v3.0.1

### [Fix]

- Fixed streaming 128kbps when no MD5 for legacy


## v3.0.0

### [Breaking changes]

- Added auth from https://connect.deezer.com/oauth/user_auth.php
- Added API from https://www.deezer.com/ajax/gw-light.php for getting track tokens
- Added getting streams from https://media.deezer.com/v1/get_url
- Added streams decryption
- Now working with free tiers

## v2.0.5

### [Fix]
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DeezerKodi

This is an unofficial Deezer addon for Kodi.
It works **only for premium account** (Deezer API doesn't allow streaming for free accounts).
It works with all kind of deezer accounts.
Streaming is limited to 128kb/s for free accounts, but can play up to flac for premium's.
This addon works for personal and family accounts (profiles are usable).
It supports access to your playlists. Searching for tracks, albums and artists is also implemented.
Let me know if there is a particular feature you want to see implemented.
Tracks are played in 128kb resolution as that's the max available bitrate for TVs from Deezer.

# Installation

Expand Down Expand Up @@ -50,3 +50,5 @@ new [issue](https://github.com/Valentin271/DeezerKodi/issues).
This addon is forked from [kubatek94](https://github.com/kubatek94)'
s [DeezerKodi repo](https://github.com/kubatek94/DeezerKodi).
Only the streaming API, icon and fanart have been reused.

Auth and decryption are adapted from [orpheusdl-deezer](https://github.com/TheKVT/orpheusdl-deezer).
18 changes: 9 additions & 9 deletions addons.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<addons><addon id="plugin.audio.deezer" name="Deezer" version="2.0.5" provider-name="Valentin271">
<addons><addon id="plugin.audio.deezer" name="Deezer" version="3.0.3" provider-name="Davy39">

<requires>
<import addon="xbmc.python" version="3.0.0" />
Expand All @@ -10,28 +10,28 @@
<provides>audio</provides>
</extension>

<extension point="xbmc.addon.repository" name="Valentin271's Kodi repo">
<extension point="xbmc.addon.repository" name="Davy39's Kodi repo">
<dir>
<info>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml.md5</checksum>
<info>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml.md5</checksum>
<hashes>md5</hashes>
</dir>
</extension>

<extension point="xbmc.addon.metadata">
<summary lang="en">This addon allows you to listen to music from Deezer.</summary>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums. A premium account is REQUIRED.</description>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums.</description>
<disclaimer lang="en">This addon was not provided by Deezer.</disclaimer>
<news>
- Fixed "authenticate user failed" when streaming
- Fixed login and streaming (2024)
</news>

<platform>all</platform>
<language>en</language>
<license>GPL-3.0</license>
<forum>https://github.com/Valentin271/DeezerKodi/issues</forum>
<website>https://github.com/Valentin271/DeezerKodi</website>
<source>https://github.com/Valentin271/DeezerKodi/tree/master/src</source>
<forum>https://github.com/Davy39/DeezerKodi/issues</forum>
<website>https://github.com/Davy39/DeezerKodi</website>
<source>https://github.com/Davy39/DeezerKodi/tree/master/src</source>
<email />
<assets>
<icon>resources/icon.png</icon>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f97fa007c33dd7b5de4c6335222dc01c addons.xml
efc6a4a4587c89b4a63b5e3f5b182f77 addons.xml
18 changes: 9 additions & 9 deletions plugin.audio.deezer/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.deezer" name="Deezer" version="2.0.5" provider-name="Valentin271">
<addon id="plugin.audio.deezer" name="Deezer" version="3.0.3" provider-name="Davy39">

<requires>
<import addon="xbmc.python" version="3.0.0"/>
Expand All @@ -10,28 +10,28 @@
<provides>audio</provides>
</extension>

<extension point="xbmc.addon.repository" name="Valentin271's Kodi repo">
<extension point="xbmc.addon.repository" name="Davy39's Kodi repo">
<dir>
<info>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml.md5</checksum>
<info>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml.md5</checksum>
<hashes>md5</hashes>
</dir>
</extension>

<extension point="xbmc.addon.metadata">
<summary lang="en">This addon allows you to listen to music from Deezer.</summary>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums. A premium account is REQUIRED.</description>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums.</description>
<disclaimer lang="en">This addon was not provided by Deezer.</disclaimer>
<news>
- Fixed "authenticate user failed" when streaming
- Fixed login and streaming (2024)
</news>

<platform>all</platform> <!-- Not tested -->
<language>en</language>
<license>GPL-3.0</license>
<forum>https://github.com/Valentin271/DeezerKodi/issues</forum>
<website>https://github.com/Valentin271/DeezerKodi</website>
<source>https://github.com/Valentin271/DeezerKodi/tree/master/src</source>
<forum>https://github.com/Davy39/DeezerKodi/issues</forum>
<website>https://github.com/Davy39/DeezerKodi</website>
<source>https://github.com/Davy39/DeezerKodi/tree/master/src</source>
<email></email>
<assets>
<icon>resources/icon.png</icon>
Expand Down
1 change: 0 additions & 1 deletion plugin.audio.deezer/plugin.audio.deezer-2.0.5.zip.md5

This file was deleted.

Binary file not shown.
1 change: 1 addition & 0 deletions plugin.audio.deezer/plugin.audio.deezer-3.0.3.zip.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a97b349ba15d694eb062eec53aded4fd *plugin.audio.deezer-3.0.3.zip
18 changes: 9 additions & 9 deletions src/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.audio.deezer" name="Deezer" version="2.0.5" provider-name="Valentin271">
<addon id="plugin.audio.deezer" name="Deezer" version="3.0.3" provider-name="Davy39">

<requires>
<import addon="xbmc.python" version="3.0.0"/>
Expand All @@ -10,28 +10,28 @@
<provides>audio</provides>
</extension>

<extension point="xbmc.addon.repository" name="Valentin271's Kodi repo">
<extension point="xbmc.addon.repository" name="Davy39's Kodi repo">
<dir>
<info>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Valentin271/DeezerKodi/master/addons.xml.md5</checksum>
<info>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Davy39/DeezerKodi/master/addons.xml.md5</checksum>
<hashes>md5</hashes>
</dir>
</extension>

<extension point="xbmc.addon.metadata">
<summary lang="en">This addon allows you to listen to music from Deezer.</summary>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums. A premium account is REQUIRED.</description>
<description lang="en">This addon allows you to stream music from Deezer. You can browse your playlists and loved tracks, search for tracks, artists and albums.</description>
<disclaimer lang="en">This addon was not provided by Deezer.</disclaimer>
<news>
- Fixed "authenticate user failed" when streaming
- Fixed login and streaming (2024)
</news>

<platform>all</platform> <!-- Not tested -->
<language>en</language>
<license>GPL-3.0</license>
<forum>https://github.com/Valentin271/DeezerKodi/issues</forum>
<website>https://github.com/Valentin271/DeezerKodi</website>
<source>https://github.com/Valentin271/DeezerKodi/tree/master/src</source>
<forum>https://github.com/Davy39/DeezerKodi/issues</forum>
<website>https://github.com/Davy39/DeezerKodi</website>
<source>https://github.com/Davy39/DeezerKodi/tree/master/src</source>
<email></email>
<assets>
<icon>resources/icon.png</icon>
Expand Down
16 changes: 10 additions & 6 deletions src/app/actions/tracks_actions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import xbmcgui
import xbmcplugin

import xbmcvfs
from app.actions.base_actions import BaseActions
from app.http import Api
from lib.helpers.logger import Logger
Expand All @@ -17,20 +17,24 @@ def play(cls, identifiant):
:param identifiant: ID of the track to stream
:return: track's stream url
"""
# Get stream url
url = Api.instance().request_streaming(identifiant)

if url.startswith('http'):
Logger.debug("Playing track " + identifiant)
item = xbmcgui.ListItem(path=url)
# Create a path to download stream
path = xbmcvfs.translatePath(f'special://temp/deezer-temp.mp3')
# Download and decrypt stream
Api.instance().dl_track(identifiant, url, path)
# Create an item to give to kodi's player
item = xbmcgui.ListItem(path=path)
# Send the item to Kodi's player
xbmcplugin.setResolvedUrl(cls.app.args().addon_handle, True, listitem=item)
else:
Logger.warn("Unplayable track " + identifiant)
Logger.warn("Unable to get url of track " + identifiant)
xbmcgui.Dialog().notification(
"Unplayable track",
"Track " + identifiant + " cannot be played.",
xbmcgui.NOTIFICATION_WARNING,
sound=False
)
xbmcplugin.setResolvedUrl(cls.app.args().addon_handle, False, xbmcgui.ListItem())

return []
Loading