(2014-12-11, 10:38)janbar Wrote: The REDIRECTION was to collect preview or artwork using WS API. Else always addon use host mentionned in the recording row. So if the backend said use this host [your slave] to play this recording then addon do it. You could change the host handling the recording by updating your backend database:
Code:
update recorded set hostname = 'name of my backend' where chanid=1001 and starttime='2013-12-10 21:30:00';
Also you could have to update storagegroup, basename etc... depending if you have same access path from slave and master.
Hi,
I cannot agree with you. Few facts:
- Master backend (which IP is set in addon configuration) has support to provide streaming of recorded tv show even if that recording was done by another backend. This feature is called "master backend override". (see
doc)
- In database, each recording has information, which backend recorded it. But this is not the only one backend which can provide file playback!
- Before you made support for redirection, addon was contacting only master backend. Playback of recordings was working, because I have set "master backend override" to true. (I have somewhere old package with addon, I will try to reproduce it again, if needed)
- After you made support for redirection, addon is contacting original backend, which recorded tv show. So you are not giving chance to master backend to play recording (if it has master backend override set). Addon effectively cancels this feature.
- Hacking DB after each recording to provide same function as is already build in mythtv backend is not acceptable.
Is it possible to try add following feature?
1) Addon will contact master backend (ip from addon config) asking for file to play (ignoring backend name from db which originally recorded this file).
2) If master backend can't provide file (can't locate file in any storage group or master backend override is not set) it will response with error or redirection to slave backend.
3) If addon receives error ("file not found", not redirection) from master backend, it should try to contact slave backend based on hostname in database.
If you can provide me some quick patch file with this feature, I can test it on my configuration and give you feedback if this approach works as I expect. After that it can be included in addon. (trying to find out what and where to change in addon sources by my self will take me weeks, so your help is valuable)
Thank you!