Android Wrong structure, but working on WIN10
#1
Hello,

I have the following addon coded that shows me some video streams. Problem is it works fine on my PC (Windows10) and my old Raspberry PI1, but on my Raspberry PI2, it tells me "wrong structure".

The zip folder is setup as its supposed to, I have tried naming the zip with "-1.2.3", nothing works.
Can anyone figure out what is wrong with this script?

I have to say this is NOT my addon, and I haven't got a lot of coding experience, hence why I am asking for help here.

Log file here:
http://paste.osmc.io/fetehofobe

and zipfile here:
http://www.filedropper.com/

addon.xml Wrote:<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.nameofaddon" version="6" name="nameofaddon" provider-name="nameofcoder">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="default.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">none</summary>
<summary lang="da">none</summary>
<platform>all</platform>
<language>en</language>
</extension>
</addon>

default.py Wrote:import sys, urllib2, xbmcaddon, xbmcgui, xbmcplugin, json, cookielib

class nameofaddon(object):
def listTVChannels(self):
username = settings.getSetting("username")
password = settings.getSetting("password")

cookiejar = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2071.71 Safari/527.36')]

login_url = "https://login.viaplay.dk/api/login/v1?deviceKey=androidv2-dk&returnurl=https%3A%2F%2Fcontent.viaplay.dk%2Fandroidv2-dk%3Fdtg%3Dfalse&username={0}&password={1}&persistent=false".format(username, password)
opener.open(login_url)

token_url = "https://play.viaplay.dk/api/stream/byguid?deviceId=dsFdsfds&deviceName=Galaxy&deviceType=Mobile&userAgent=Viaplay%2F4.3.1%20%28Android%205.0%29&deviceKey=androidv2-dk&guid=TV3DK"
r = opener.open(token_url)
token = json.loads(r.read())['_links']['viaplay:playlist']['href'].split("m3u8")[1]

channels = {
"DR1": "http://dr01-lh.akamaihd.net/i/dr01_0@147054/master.m3u8?b=100-2000",
"DR2": "http://dr02-lh.akamaihd.net/i/dr02_0@147055/master.m3u8?b=100-2000",
"DR3": "http://dr03-lh.akamaihd.net/i/dr03_0@147056/master.m3u8?b=100-1600",
"DR ULTRA" : "http://dr06-lh.akamaihd.net/i/dr06_0@147059/master.m3u8?b=100-1600",
"RAMASJANG": "http://dr05-lh.akamaihd.net/i/dr05_0@147058/master.m3u8?b=100-1600",
"DR K" : "http://dr04-lh.akamaihd.net/i/dr04_0@147057/master.m3u8?b=100-1600"
}

for name, url in channels.items():
xbmcplugin.addDirectoryItem(HANDLE, url + token, xbmcgui.ListItem(name))

xbmcplugin.endOfDirectory(HANDLE, True)

if __name__ == '__main__':
HANDLE = int(sys.argv[1])
settings = xbmcaddon.Addon(id='plugin.video.nameofaddon')
a = nameofaddon()
a.listTVChannels()
Reply
#2
you're not likely to receive any help without a Debug Log from your rPI2 and a link to the zipfile.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Alright, Log file here:
http://paste.osmc.io/fetehofobe

and zipfile here:
http://www.filedropper.com/
Reply
#4
Quote:18:54:28 T:1957142528 NOTICE: CCurlFile::Stat - Content length failed: No error(0) for ftp://USERNAME:[email protected]
18:54:28 T:1957142528 ERROR: GetDirectory - Error getting zip://ftp%3a%2f%2fweb20.gigahost.dk%3a21%2fwww%2fmandesvin.dk%2fraspPI%2fplugin.video.viahack.zip/

iirc you can't install addons from a remote source, you need to copy the zipfile to the device.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2015-08-15, 00:18)ronie Wrote:
Quote:18:54:28 T:1957142528 NOTICE: CCurlFile::Stat - Content length failed: No error(0) for ftp://USERNAME:[email protected]
18:54:28 T:1957142528 ERROR: GetDirectory - Error getting zip://ftp%3a%2f%2fweb20.gigahost.dk%3a21%2fwww%2fmandesvin.dk%2fraspPI%2fplugin.video.viahack.zip/

iirc you can't install addons from a remote source, you need to copy the zipfile to the device.

I have been installing other addons from remote sources, which has worked fine.
However I put it on the PI, and now it installed so thank you. Smile

I now have a problem with the stream not working, but I guess I'll make a new thread for that:
http://forum.kodi.tv/showthread.php?tid=...id=2080351

Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Wrong structure, but working on WIN100