trix7777 / m2strm

Creates STRM-files from M3U8-file.
GNU General Public License v3.0
20 stars 1 forks source link

Faulty downloaded M3U8 causes empty OutDirectory #7

Closed perryodk closed 1 year ago

perryodk commented 2 years ago

When I used m2strm, to update the existing .strm files in the OutDirectory, my provider experienced an issue with their service. This caused the existing good "original.m3u8" to be deleted and replaced or overwritten by an downloaded faulty M3U8 file containing only the text "There was an problem connecting to the MySQL database". As this error text is in no means a valid M3U8 file and I had parameter PurgeFilesEnabled set to True this deleted all .strm files and directories in the OutDirectory.

I can think of a few possible solutions:

  1. Copy the existing good M3U8 file to a backup M3U8 file (and possibely keep these backup M3U8 files for a configurable amount of days or files) and/or
  2. Check if the downloaded M3U8 file has a valid playlist/file structure before proceeding with deleting .strm files as defined by PurgeFilesEnabled set to True.

Thanks for your help and making this program!

trix7777 commented 2 years ago

Option 2 would be my solution of preference given those two options. But I would probably instead of checking for a "valid m3u8" search for "MySQL" in the m3u8, and if found, reject it. I my self use the PurgeFilesEnabled option and have never had that problem with my provider, strangely enough.

trix7777 commented 1 year ago

Fixed in v3.0.2.6