Skip to content

Commit

Permalink
merge solved
Browse files Browse the repository at this point in the history
  • Loading branch information
lusum committed Mar 14, 2021
2 parents 8dea8ca + 296f343 commit a6d97c3
Show file tree
Hide file tree
Showing 13 changed files with 610 additions and 537 deletions.
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ To avoid random crashes in kodi don't do any operation in the last five seconds
due to a kodi bug, playing next song generates a busy dialog ( impossible to avoid )
and operating on kodi generates another busy dialog.
The combination of two busy dialogs working crashes kodi (https://github.com/xbmc/xbmc/issues/16756)

When you update the 2.0 version from an old version, expecially on raspberry pi, the plugin could not work.
This behaviour is due to the kodi addon cache. To correct this one time problem, it is necessary to reboot the
mediacenter or, if the problem continues, uninstall and reinstall the plugin.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.audio.ampache" version="1.2.2" name="Ampache" provider-name="lusum">
<addon id="plugin.audio.ampache" version="2.0.0" name="Ampache" provider-name="lusum">
<requires>
<import addon="script.module.future" version="0.17.1"/>
</requires>
Expand Down
24 changes: 24 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,27 @@ msgstr ""
msgctxt "#30204"
msgid "Permission error. If you are using Nextcloud don't check api_key box"
msgstr ""

msgctxt "#30220"
msgid "Video"
msgstr ""

msgctxt "#30221"
msgid "Videos"
msgstr ""

msgctxt "#30222"
msgid "Search Videos..."
msgstr ""

msgctxt "#30225"
msgid "Podcast"
msgstr ""

msgctxt "#30226"
msgid "Podcasts"
msgstr ""

msgctxt "#30227"
msgid "Search Podcasts..."
msgstr ""
62 changes: 34 additions & 28 deletions resources/language/resource.language.it_it/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: XBMC Addons\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2021-01-06 11:30+0100\n"
"PO-Revision-Date: 2021-02-18 21:42+0100\n"
"Last-Translator: \n"
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/"
"language/en/)\n"
Expand Down Expand Up @@ -106,19 +106,19 @@ msgstr "Tutto"

msgctxt "#30111"
msgid "Tag"
msgstr ""
msgstr "Genere"

msgctxt "#30112"
msgid "Artist tag"
msgstr "Tag artista"
msgstr "Genere artista"

msgctxt "#30113"
msgid "Album tag"
msgstr "Tag album"
msgstr "Genere album"

msgctxt "#30114"
msgid "Song tag"
msgstr "Tag canzone"
msgstr "Genere canzone"

msgctxt "#30115"
msgid "Artists"
Expand All @@ -138,7 +138,7 @@ msgstr ""

msgctxt "#30119"
msgid "Tags"
msgstr ""
msgstr "Generi"

# code
msgctxt "#30120"
Expand Down Expand Up @@ -236,15 +236,15 @@ msgstr "Mostra tutti gli album di questo artista"

msgctxt "#30142"
msgid "Artist tags..."
msgstr "Tag Artisti..."
msgstr "Generi Artisti..."

msgctxt "#30143"
msgid "Album tags..."
msgstr "Tag Album..."
msgstr "Generi Album..."

msgctxt "#30144"
msgid "Song tags..."
msgstr "Tag Canzoni..."
msgstr "Generi Canzoni..."

msgctxt "#30145"
msgid "Recently Added..."
Expand Down Expand Up @@ -312,7 +312,7 @@ msgstr "Canzoni Dimenticate..."

msgctxt "#30161"
msgid "Newest Artists..."
msgstr "Nuovi artisti.."
msgstr "Nuovi artisti..."

msgctxt "#30162"
msgid "Newest Albums..."
Expand Down Expand Up @@ -420,15 +420,15 @@ msgstr "Plugin Ampache"

msgctxt "#30190"
msgid "Recently Played Artists..."
msgstr "Artisti suonati recentemente.."
msgstr "Artisti suonati recentemente..."

msgctxt "#30191"
msgid "Recently Played Albums..."
msgstr "Album suonati recentemente.."
msgstr "Album suonati recentemente..."

msgctxt "#30192"
msgid "Recently Played Songs..."
msgstr "Canzoni suonati recentemente..."
msgstr "Canzoni suonate recentemente..."

msgctxt "#30193"
msgid "Recently Played..."
Expand Down Expand Up @@ -462,22 +462,28 @@ msgctxt "#30204"
msgid "Permission error. If you are using Nextcloud don't check api_key box"
msgstr "Permessi errati. Se state usando Nextcloud non utilizzare l'api_key"

#~ msgctxt "#30190"
#~ msgid "Recent Artists..."
#~ msgstr "Artisti recenti.."
msgctxt "#30220"
msgid "Video"
msgstr ""

msgctxt "#30221"
msgid "Videos"
msgstr "Video"

#~ msgctxt "#30191"
#~ msgid "Recent Albums..."
#~ msgstr "Album recenti.."
# code
msgctxt "#30222"
msgid "Search Videos..."
msgstr "Ricerca video..."

#~ msgctxt "#30192"
#~ msgid "Recent Songs..."
#~ msgstr "Canzoni recenti..."
msgctxt "#30225"
msgid "Podcast"
msgstr ""

#~ msgctxt "#30193"
#~ msgid "Recent..."
#~ msgstr "Recenti..."
msgctxt "#30226"
msgid "Podcasts"
msgstr ""

#~ msgctxt "#30170"
#~ msgid "Enter the Name"
#~ msgstr "Inserisci il nome del server"
# code
msgctxt "#30227"
msgid "Search Podcasts..."
msgstr "Ricerca podcast..."
15 changes: 7 additions & 8 deletions resources/lib/ampache_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ConnectionError(Exception):
pass

def __init__(self):
self._ampache = xbmcaddon.Addon()
self._ampache = xbmcaddon.Addon("plugin.audio.ampache")
jsStorServer = json_storage.JsonStorage("servers.json")
serverStorage = jsStorServer.getData()
self._connectionData = serverStorage["servers"][serverStorage["current_server"]]
Expand Down Expand Up @@ -52,13 +52,18 @@ def fillConnectionSettings(self,tree,nTime):
self._ampache.setSetting("albums", tree.findtext("albums"))
self._ampache.setSetting("songs", tree.findtext("songs"))
self._ampache.setSetting("playlists", tree.findtext("playlists"))
videos = tree.findtext("videos")
if videos:
self._ampache.setSetting("videos", videos)
podcasts = tree.findtext("podcasts")
if podcasts:
self._ampache.setSetting("podcasts", podcasts)
self._ampache.setSetting("session_expire", tree.findtext("session_expire"))
self._ampache.setSetting("add", tree.findtext("add"))
self._ampache.setSetting("token", token)
self._ampache.setSetting("token-exp", str(nTime+24000))

def getCodeMessError(self,tree):
code = None
errormess = None
errornode = tree.find("error")
if errornode is not None:
Expand Down Expand Up @@ -215,12 +220,6 @@ def ampache_http_request(self,action):
return tree

def build_ampache_url(self,action):
if ut.check_tokenexp():
xbmc.log("refreshing token...", xbmc.LOGDEBUG )
try:
self.AMPACHECONNECT()
except:
return
token = self._ampache.getSetting("token")
thisURL = self._connectionData["url"] + self.getBaseUrl() + '?action=' + action
thisURL += '&auth=' + token
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/ampache_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ def onNotification(self, sender, method, data):
except:
xbmc.log("AmpacheMonitor::no playing file " , xbmc.LOGDEBUG)
return
xbmc.executebuiltin('RunPlugin(plugin://plugin.audio.ampache/?mode=47)')
xbmc.executebuiltin('RunPlugin(plugin://plugin.audio.ampache/?mode=205)')


Loading

0 comments on commit a6d97c3

Please sign in to comment.