fetzerch / xbmc-pvr-addons

XBMC PVR add-ons
GNU General Public License v3.0
19 stars 17 forks source link

Wrong recording started #78

Closed stefangust closed 11 years ago

stefangust commented 11 years ago

I have a XBMC frontend running latest nigtly build (2013-01-06) and a Mythbuntu 12.04 (0.25) MythTV backend.

Yesterday I had a timed recording for a movie but I manged to restart the backend during the recording. The backend resumed the recording aftet the restart resulting in the recording beeing split into two different files.

On the XBMC the two recordings now show but regardless of that file I play I only get the first part of the recording to play.

I assume XBMC PVR construct the media filename using the wrong information.

From the backend:

mysql> select * from recorded where chanid = 1034; +--------+---------------------+---------------------+----------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+----------+------------+---------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+-------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+ | chanid | starttime | endtime | title | subtitle | description | season | episode | category | hostname | bookmark | editing | cutlist | autoexpire | commflagged | recgroup | recordid | seriesid | programid | inetref | lastmodified | filesize | stars | previouslyshown | originalairdate | preserve | findid | deletepending | transcoder | timestretch | recpriority | basename | progstart | progend | playgroup | profile | duplicate | transcoded | watched | storagegroup | bookmarkupdate | +--------+---------------------+---------------------+----------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+----------+------------+---------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+-------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+ | 1034 | 2013-01-06 19:05:00 | 2013-01-06 19:13:30 | Den heliga familjen Addams | | Amerikansk skräckkomedi från 1993. Det passionerade paret Gomez och Morticia Addams får tillökning i familjen. Den mustaschprydde lille Pubert. Till huset anländer nannyn Debbie och Fester blir huvudlöst förälskad i henne. Till familjens stora glädje är hans känslor besvarade. Wednesday är däremot skeptisk och fattar snart misstankar. | 0 | 0 | movies | tvserver | 0 | 0 | 0 | 1 | 0 | Default | 41 | 71446851 | MV71446851 | | 2013-01-06 21:03:57 | 135291756 | 0 | 0 | 0000-00-00 | 0 | 0 | 0 | 0 | 1 | 0 | 1034_20130106190500.mpg | 2013-01-06 19:05:00 | 2013-01-06 21:00:00 | Default | Default | 0 | 0 | 1 | Default | 2013-01-06 21:03:57 | | 1034 | 2013-01-06 19:15:00 | 2013-01-06 21:00:00 | Den heliga familjen Addams | | Amerikansk skräckkomedi från 1993. Det passionerade paret Gomez och Morticia Addams får tillökning i familjen. Den mustaschprydde lille Pubert. Till huset anländer nannyn Debbie och Fester blir huvudlöst förälskad i henne. Till familjens stora glädje är hans känslor besvarade. Wednesday är däremot skeptisk och fattar snart misstankar. | 0 | 0 | movies | tvserver | 1 | 0 | 0 | 1 | 1 | Default | 41 | 71446851 | MV71446851 | | 2013-01-07 10:16:45 | 1860982484 | 0 | 0 | 0000-00-00 | 0 | 0 | 0 | 0 | 1 | 0 | 1034_20130106191500.mpg | 2013-01-06 19:05:00 | 2013-01-06 21:00:00 | Default | Default | 0 | 0 | 1 | Default | 2013-01-07 10:16:45 | +--------+---------------------+---------------------+----------------------------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------+----------+---------+---------+------------+-------------+----------+----------+----------+------------+---------+---------------------+------------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+-------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+---------------------+ 2 rows in set (0.00 sec)

fetzerch commented 11 years ago

This is known already and was introduced by a db change in XBMC. XBMC uses directory, title, channel and starttime to identify a recording in its database. And the recording view uses the database info to play the recording.

If the backend restarts the second part of the recording has exactly the same information than the first part and xbmc can't distinguish them.

jbr439 commented 11 years ago

Would it be possible to have a bash-level work-around for this problem?

Something like concatenating the 2nd recording file onto the 1st recording file, and then running one or more myth and/or mysql commands to force mythtv to update with the reworked, larger recording file?

Since there doesn't seem to be an actual fix readily available, a work-around would be a good thing to have.

fetzerch commented 11 years ago

You need to:

pjconroy commented 11 years ago

My workaround is to use upnp to play the split recordings.

fetzerch commented 11 years ago

Fixed in the development branch for Gotham (branch master, will be part of v1.8.13) https://github.com/fetzerch/xbmc-pvr-addons/commit/ae77ff96ed659b53869b9018a56a7805716a3e7e