Closed AndreyPavlenko closed 8 years ago
Why closed? It seems still actual, as well as multiple EPG sources
It’s a 4 year old issue closed by the opener a few months later.
Please try iptvmerge if you need this functionality.
Thanks for reply. About iptvmerge, I know it, but the need of separate addon for this seems questionable to me, since Kodi actually already has required functionality internally. What I mean: I tried manually concatenate multiple xmltv files (of course a few changes needed to make it valid xml in the end), and Kodi perfectly parsed the resulted output. So it seems logical if Iptvsimple addon would just allow adding multiple EPGs..
It’s actually quite a complex problem. Handling caching, validity checks, conflicts etc. The addon itself has no ability to write xml. It only reads it which is why I recommend iptvmerge which is the use case it solves for.
I understand it can be a complex problem in a whole, but Kodi handles XML concatenation perfectly for me (it seems just overrides programs with latest data), so maybe it's worth to expose that basic in-built functionality in Iptvsimple also, if possible.
Yes, it’s the addon that parses the result and that piece will work. But adding multiple XMLTVs brings complexity in many ways, even for configuring in the GUI.
Have a look at this issue: https://github.com/kodi-pvr/pvr.iptvsimple/issues/307
If support get’s added to iptvmerge for referenced M3U’s it may be a better solution overall.
@phunkyfish sorry I didn't catch what complexities you mean
It's unusefull to merge multiple playlists, too many channels are unmanageable especially when are thousands on Android devices. Also merge multiple EPG is unusefull because the possibility to has conflicts on the same event of the same channel is hi. In Italy we have an EPG provider (epg-guide) that produce dedicate EPG for a playlists and is the best way to have a smaller EPG file and the best EPG, but it's only for Italy.
@Evandro1975 that conflicts are no problem for kodi since it handles them in a basic way which is appropriate for the most cases. See above
Only the conflicts you found don’t cause an issue so far. There will be many others and those users need to be supported too.
I’m not saying this can’t be done it’s that to do it right in a maintainable way will be a lot of effort. I’m not sure that effort is time well spent where there are many tools, iptvmerge, webgrab++ etc. specifically designed for this purpose.
Well, what I'm asking for is not doing something extra in a "right way". Just support what is already exists "as is".
PS: For the extended functionality, we could use additional addons..
Can you define “as is”?
Anything beyond supporting one M3U file and one XMLTV file I would consider extended functionality.
it means just do the dumb XMLs concatenation as I wrote earlier. The result of that concatenation would be handled by Kodi "as is".
PS: or just feed the XMLs to Kodi sequentially. I'm not aware of the implementation details..
For you it may work. But for others it won’t, and that support overhead is not something I have the time to take on. In the future, it’s possible that a feature could be added to accomplish what you want but for right now you can use iptvmerge or webgrab++. Both can be automated so there is no intervention on your part.
Hope it will be added and require no extra time in support. Since in this form it is supposed to support only in-build Kodi abilities to parse that "combined" XML, it is no much hassle if it won't work for someone. All of that might be corresponded to Kodi but not to addon itself.
All that functionality is the addon and not kodi.
Kodi definitely has some in-built functionality I meant, since it handles concatenated XML properly. At least for some cases.
PS: or you mean it's in iptvsimple addon and not in kodi actually? That is what I'm not aware..
Even then, it seems more logical to have UI interface to that functionality iptvsimple already have, in the addon itself.
It’s in IPTV simple not kodi. There is no ability in the addon to read multiple xml files currently. Yes, if you fashion you own combined XML file and validate it yourself it can read that file but it only supports a single file.
Please use a tool that is designed to aggregate XMLTV data to perform this function. This pvr addon is not the right place to add this functionality.
Please use a tool that is designed to aggregate XMLTV data
I'm not sure iptvmerge is a proper addon either. It creates combined XML output which is not actually what I want. What I want is to read them one by one directly to Kodi's database, in a way how it's done in iptvsimple addon. That is why I think this addon is a more proper place to add it.
So how I can see it there is two possibility to implement it in a "proper" way:
iptvsimple
addoniptvmerge
, but in this case it needs ability to inject EPG to Kodi directly to be addedPS: not sure if it possible since that EPG database maybe a personal iptvsimple data. Don't know. In that case, only one way remains :)
The data can only be added to the PVR database by the iptv simple pvr addon.
If iptvmerge aggregates the data into a single file and iptvsimple simple adds it how does this not accomplish what you want?
You have stated it must only be via a new addon or the current one but a working solution presented to you is not acceptable.
You need to explain why the presented solution does not work for your use case.
@bam80 how do you like to solve situation when 2 different m3u playlistes contains same channel which url you want to prefer? one streams may have different quality other one better connection and so on you have to create whole interface just to properly manage channels, similar for epg what if you have two different epg entries for same channel but one contains more data and second one has better cover image ...
You need to explain why the presented solution does not work for your use case.
It is acceptable and it also works, I tried it too.
It's just not very well suited to me since I generate my XMLs in external (not Kodi) script which has no access to iptvmerge
functionality (and vice versa). So for my case it is better to handle the XMLs merging in my side also (but it was really tricky since there is no appropriate programs in LibreELEC for that).
But only if iptvsimple
could handle multiple XMLs it would fulfill my needs entirely..
@Sorien please see above, the way iptvsimple handles it currently suits for me
It is acceptable and it also works, I tried it too. It's just not very well suited to me since I generate my XMLs in external (not Kodi) script which has no access to
iptvmerge
functionality (and vice versa). So for my case it is better to handle the XMLs merging in my side also (but it was really tricky since there is no appropriate programs in LibreELEC for that). But only ifiptvsimple
could handle multiple XMLs it would fulfill my needs entirely..
I don’t see how iptvsimple could handle this correctly but iptvmerge could not, both are kodi based solutions and you couldn’t access either addons functionality externally from your script.
So the answer to my question of why this functionality needs to be in iptvsimple still needs explaining.
iptvmerge is a separate addon and just another chunk with it's own overhead, etc. I don't actually need it's functionality. Maybe if I had it's supported remote EPG sources then it would be useful. What is actually needed is UI interface to existing iptvsimple abilities which is hidden right now.
So I can live with it but still think it's unreasonable drawback of iptvsimple.
Maybe just explain current behavior iptvsimple
has when it feeded with concatenated XML (it would be useful anyway), that would be supported behavior with multiple XMLs. Other than that will go to external facilities, so no extra support burden.
There are no existing abilities in the addon for multiple files nor is there any hidden UI.
If you would like to understand the part if the addon that reads the file the function that loads the XMLTV is here: https://github.com/kodi-pvr/pvr.iptvsimple/blob/1df685ca521b8ddb7e93c3261bc106c8ebdc1529/src/iptvsimple/Epg.cpp#L61
PVR addons are binary addons so are written in c++ and not python.
Thanks. I was talking about ability to handle data from multiple files, which can't be used now without concatenation the files beforehand, so its "hidden". I meant the behavior of that ability should probably be documented for users, because it's not obvious it can be used such way.
The data can only be added to the PVR database by the iptv simple pvr addon.
By the way, why is that? Is it some Kodi restriction? I think the ability to add data to the database for others addons would be useful.
Thanks. I was talking about ability to handle data from multiple files, which can't be used now without concatenation the files beforehand, so its "hidden". I meant the behavior of that ability should probably be documented for users, because it's not obvious it can be used such way.
Sorry this makes zero sense. Just because you were able to join some files together it does not mean the addon has the ability to handle multiple files. It can still only handle a single valid XML file. Full stop.
The data can only be added to the PVR database by the iptv simple pvr addon.
By the way, why is that? Is it some Kodi restriction? I think the ability to add data to the database for others addons would be useful.
It is the contract between the PVR addons and Kodi. They manage the data sent to kodi and maintain it. There is no way for an addon to access data already in kodi, nor should there be. This will never change.
I suppose EPG database format is common for all PVR addons. If so, it would be useful for some addons to supply the EPG to others. E.g, iptvmerge
could provide EPG to any PVR addon and not only to iptvsimple or other one that can handle XMLTV.
This will never be possible. It would break the contract between the PVR addon and kodi.
Is it documented somewhere? I don't understand logic behind that since it seems useful feature. And every PVR addon now which wants just to import XMLTV would have to re-implement it itself..
The code is the documentation. The readme file on the repo explains everything a user should need to know.
It’s true that every PVR addon that wants to import XMLTV would need to implement it. If someone has the time to implement that functionality in a library for PVR that would be an option but it would still only ever work for a PVR addon, and only for that PVR addons data.
Well, I see we are in no way came to any consensus here, but thank you anyway for a long conversation :) I just wish to the project all the best.
The data can only be added to the PVR database by the iptv simple pvr addon.
Just saw sEPGScraper
field in channels table. What is it for? Does it mean the EPG data can still be added to the database by another addon?
I don’t know.
I have this feature implemented on top of an old version of this addon - https://github.com/AndreyPavlenko/xbmc-addon-iptvsimple/commit/45841de468645c7aa796ab76016699f2317259c4 , but it's quite difficult for me to merge it into this addon.
Can we have this feature implemented in this addon?