kmahon37 / plex-dvr-waker

Plex DVR Waker is a simple command-line tool for waking the computer before the next scheduled recording.
MIT License
8 stars 0 forks source link

[BUG] 'No upcoming scheduled recordings' when using xmltv based EPG #8

Closed thrnz closed 4 years ago

thrnz commented 4 years ago

Describe the bug plex-dvr-waker reports 'no upcomming scheduled recordings' when Plex gets its listings from an xmltv file.

To Reproduce

Expected behavior plex-dvr-waker to function the same as when using a Plex supplied EPG.

Desktop (please complete the following information):

Additional context It looks like plex-dvr-waker searches for 'tv.plex.providers.epg.cloud.db' when looking for the EPG database. However, when using an xmltv based EPG, Plex appears to use a 'tv.plex.providers.epg.xmltv.db' filename instead.

I've managed to work around it by making appropriately named symlinks (simply replacing xmltv with cloud) of the .db .db-shm, and .db-wal files so plex-dvr-waker can still work. I'm not sure if this workaround will effect 'monitor' or not, or whether the xmltv db might have a slightly different structure ('list' doesn't appear to be showing the schedule titles, however start/finish times are listed correctly), however 'sync' appears to be working fine and creating the wake-up task as expected.

I can provide a copy of some xmltv db files if you want to have a poke around.

Thanks for taking the time to make this btw. It does one job and does it well.

kmahon37 commented 4 years ago

@thrnz You are correct that Plex DVR Waker only looks at the "cloud" file(s), but only because I didn't know anything else existed. If you can provide a copy of an "xmltv" db file, that may help (I'm hoping it's the same format as the "cloud" file). I might also have to try setting up my DVR with an xmltv file when I get some time.

thrnz commented 4 years ago

Here's a copy of my epg db files. Hopefully there's nothing account sensitive in there: xmltvdb.zip

kmahon37 commented 4 years ago

Thanks for the file. As far as I know, and after a quick glance, I don't think there is anything sensitive in it (mostly just show metadata like names, descriptions, times, channel, etc.). The database structure appears to be the same as the "cloud" file, so that should hopefully make it easier to fix.

kmahon37 commented 4 years ago

@thrnz I think I may have fixed it, but it's hard to tell for sure since I can't get my Plex to use xmltv for some reason (maybe because I already have a dvr setup?). Can you test out this prerelease version and see if it works for you without the symlinks?

thrnz commented 4 years ago

I had a quick play and it seems to be working fine without the symlinks. I'll keep a close eye on it over the next week or so and will let you know if I see anything strange.

Nice work.

kmahon37 commented 4 years ago

Fixed in 1.1.3