Jump to content

Plugin: Export VODS from .m3u - split m3u livetv, tvshows, movies (Going BETA!!)


Recommended Posts

mickle026
Posted
48 minutes ago, jaspalgill said:

Hi, did you test this only with Movies or with TV Shows as well?

It's removing the prefix from TV Shows for me fine but it is isn't placing the season folders into a single TV Show folder like it does for everything else. It's not an issue as Emby handles them fine, just makes the folder layout messy.

Check your custom strings for removal text box

If you downloaded the file I posted it contains S01E01 and Season etc, they will get removed, then the Season Extractor cannot extract it from the string.
Modify that file to what you need.  Take the Season, Episode , S01E01 out of it.

,Season,S01E01,Episode,Part 1,Part 2,Pt 3,Prequel,Sequel,Final 

 

gillmacca01
Posted

Slightly different error in log now, but I am not seeing the 'post script trigger path' error

04.Apr.2025 - 13:03:32 Total .strm files processed: 0
04.Apr.2025 - 13:04:34 Exception occurred: System.FormatException: The input string '1996-2017' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s)
   at VODtoSTRMscheduledTask.STRMTOVOD.CheckEmbyLibraryAsync(String showTitle, String tvgType, String sanitizedName, String groupTitle, String YearString, String currentLog, FileLogging log, ILibraryManager libraryManager)
   at VODtoSTRMscheduledTask.STRMTOVOD.ProcessContentAsync(String[] lines, Int32 index, String trimmedLine, String url, Metadata metadata, List`1 contentsList, List`1 liveTVList, List`1 moviesList, List`1 tvShowsList, List`1 unknownM3UItemList, String outputDirectory, String currentlog, FileLogging log, PluginConfiguration config)
   at VODtoSTRMscheduledTask.STRMTOVOD.scanM3UFileAsync(String[] lines, String outputDirectory, String currentlog)
04.Apr.2025 - 13:04:34 Saved '/share/CACHEDEV1_DATA/Downloads/Andrew/M3UFiles/LiveTV/LiveTV.m3u'
gillmacca01
Posted

Also LiveTV output folder is still showing content that is in my ignore list. example: CBS Network

image.png.e5be633930ffd04c52db5700539ec10f.png

 

image.thumb.png.9e601c696705e60f94a447524597091b.png

mickle026
Posted
43 minutes ago, gillmacca01 said:
52 minutes ago, gillmacca01 said:

The input string '1996-2017' was not in a correct format.

bah humbug!

Same error, different format, should now be handled and split to take the first year.

 

VODtoSTRMscheduledTask.dll

mickle026
Posted
2 hours ago, gillmacca01 said:

Also LiveTV output folder is still showing content that is in my ignore list. example: CBS Network

image.png.e5be633930ffd04c52db5700539ec10f.png

 

image.thumb.png.9e601c696705e60f94a447524597091b.png

I can see it getting through in the logs

 

04.Apr.2025 - 15:59:03 Debugging: Sanitize InputString: 'US| CBS NETWORK'
04.Apr.2025 - 15:59:03 Debugging: Sanitize OutputString: 'US CBS NETWORK'
04.Apr.2025 - 15:59:03 Debugging: Sanitize InputString: 'US| CBS 4 DOTHAN AL (WTVY)'
04.Apr.2025 - 15:59:03 Debugging: Sanitize OutputString: 'US CBS 4 DOTHAN AL (WTVY)'
04.Apr.2025 - 15:59:03 Removed Country code: Input: 'US CBS 4 DOTHAN AL (WTVY)', Output: 'CBS 4 DOTHAN AL (WTVY)'
04.Apr.2025 - 15:59:03 Debugging: Called from=ExtractMetadataAsync:metadata.MovieName
04.Apr.2025 - 15:59:03 Removed Country code: Input: 'US CBS NETWORK', Output: 'CBS NETWORK'
04.Apr.2025 - 15:59:03 Debugging: Called from=ExtractMetadataAsync:metadata.GroupTitle
04.Apr.2025 - 15:59:03 tvgId: loc.CBS (WTVY) Dothan, AL
04.Apr.2025 - 15:59:03 tvgName: US| CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 groupTitle: CBS NETWORK
04.Apr.2025 - 15:59:03 channelName: CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 logoUrl: http://**********/CBS-4-EL-PASO-TX-KDBC.png
04.Apr.2025 - 15:59:03 Debugging: Pre-Include/Ignore metadata.ChannelName=
04.Apr.2025 - 15:59:03 Debugging: Pre-Include/Ignore metadata.MovieName=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Checking [Include] Contains
04.Apr.2025 - 15:59:03 Checking [Include] StartsWith
04.Apr.2025 - 15:59:03 **FILTER** Keeping [groupTitle] [6120]: US CBS NETWORK :Filtered by: 'US '
04.Apr.2025 - 15:59:03 Checking [Include] StartsWith, Include: True
04.Apr.2025 - 15:59:03 Debugging: Keep=True.
04.Apr.2025 - 15:59:03 Checking [Ignore] Contains
04.Apr.2025 - 15:59:03 Checking [Ignore] StartsWith
04.Apr.2025 - 15:59:03 Debugging: Ignore=False.
04.Apr.2025 - 15:59:03 Include / Ignore checking passed succesfully.
04.Apr.2025 - 15:59:03 Ingnore/Include Total execution time: 2 ms
04.Apr.2025 - 15:59:03 Debugging: [ProcessContentAsync] sanitizedMovieName=CBS 4 DOTHAN AL (WTVY), unsantised Name=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, Before Season Removal, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, IsitAnEdgeCaseTVShow?, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, after moviePattern regex, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, after volumePattern regex, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, after seasonEpisodePattern regex, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, after parentheses with year ranges regex, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: Inside GetShowTitle, after Season Removal, Input=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: [ProcessContentAsync]  Pre build Path, ShowTitle=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging: [ProcessContentAsync]  Pre build Path, GroupTitle=CBS NETWORK
04.Apr.2025 - 15:59:03 Debugging - Checking for URL strings..
04.Apr.2025 - 15:59:03 Type: Live TV - Detected a Stream Url: '173123'
04.Apr.2025 - 15:59:03 Debugging: tvgType after AdjustContent=Live TV.
04.Apr.2025 - 15:59:03 Debugging: filename1=CBS 4 DOTHAN AL (WTVY).strm
04.Apr.2025 - 15:59:03 Debugging: GroupTitle1=CBS NETWORK
04.Apr.2025 - 15:59:03 Debugging: AddContentAsync Inputs: outputDirectory=D:\VODS2, tvgType=Live TV, groupTitle=CBS NETWORK, showTitle=CBS 4 DOTHAN AL (WTVY), season=NULL, fileName=CBS 4 DOTHAN AL (WTVY).strm, fileContents=http://**********/CBS-4-EL-PASO-TX-KDBC.png, year=unknown_year, genres=
04.Apr.2025 - 15:59:03 Debugging: [IsitAnEdgeCaseMovie] Detection Result: (False),(CBS 4 DOTHAN AL (WTVY))
04.Apr.2025 - 15:59:03 sanitized groupTitle [ Path.Combine() folderName]: CBS NETWORK
04.Apr.2025 - 15:59:03 Constructed Folder Name [2]: D:\VODS2\Live TV\CBS NETWORK\CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Constructed Folder Name [2]: groupTitle=CBS NETWORK
04.Apr.2025 - 15:59:03 Constructed Folder Name [2]: showTitle=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 15:59:03 Debugging AddToContentListAsync: folderName=D:\VODS2\Live TV\CBS NETWORK\CBS 4 DOTHAN AL (WTVY), fileName=CBS 4 DOTHAN AL (WTVY).strm, fileContents=http://**********/173123
04.Apr.2025 - 15:59:03 Item [12238] Adding to Folder: D:\VODS2\Live TV\CBS NETWORK\CBS 4 DOTHAN AL (WTVY)

I will see if I can fathom out why

 

gillmacca01
Posted

I've just tried running it twice and both times Emby crashed with out of memory message in the logs

mickle026
Posted
4 hours ago, gillmacca01 said:

Also LiveTV output folder is still showing content that is in my ignore list. example: CBS Network

image.png.e5be633930ffd04c52db5700539ec10f.png

 

image.thumb.png.9e601c696705e60f94a447524597091b.png

Did you try putting CBS NETWORK into "Ignore Contains"?

You are filtering "starts with" but they don't start with CBS NETWORK, they start with "US"

Screenshot_4-4-2025_17547_localhost.thumb.jpeg.93acddecd02ea198f2a1185dd3498969.jpeg

04.Apr.2025 - 17:50:43 Debugging: Sanitize InputString: 'US| CBS NETWORK'
04.Apr.2025 - 17:50:43 Debugging: Sanitize OutputString: 'US CBS NETWORK'
04.Apr.2025 - 17:50:43 Debugging: Sanitize InputString: 'US| CBS 3 PHILADELPHIA PA (KYW)'
04.Apr.2025 - 17:50:43 Debugging: Sanitize OutputString: 'US CBS 3 PHILADELPHIA PA (KYW)'
04.Apr.2025 - 17:50:43 Removed Country code: Input: 'US CBS 3 PHILADELPHIA PA (KYW)', Output: 'CBS 3 PHILADELPHIA PA (KYW)'
04.Apr.2025 - 17:50:43 Debugging: Called from=ExtractMetadataAsync:metadata.MovieName
04.Apr.2025 - 17:50:43 Removed Country code: Input: 'US CBS NETWORK', Output: 'CBS NETWORK'
04.Apr.2025 - 17:50:43 Debugging: Called from=ExtractMetadataAsync:metadata.GroupTitle
04.Apr.2025 - 17:50:43 tvgId: loc.CBS (KYW) Philadelphia, PA
04.Apr.2025 - 17:50:43 tvgName: US| CBS 3 PHILADELPHIA PA (KYW)
04.Apr.2025 - 17:50:43 groupTitle: CBS NETWORK
04.Apr.2025 - 17:50:43 channelName: CBS 3 PHILADELPHIA PA (KYW)
04.Apr.2025 - 17:50:43 logoUrl: http://**********/CBS-3-NORFOLK-VA-WTKR.png
04.Apr.2025 - 17:50:43 Debugging: Pre-Include/Ignore metadata.ChannelName=
04.Apr.2025 - 17:50:43 Debugging: Pre-Include/Ignore metadata.MovieName=CBS 3 PHILADELPHIA PA (KYW)
04.Apr.2025 - 17:50:43 Checking [Include] Contains - result: False
04.Apr.2025 - 17:50:43 **FILTER** Keeping [groupTitle] [162]: US CBS NETWORK :Filtered by: 'US '
04.Apr.2025 - 17:50:43 Checking [Include] StartsWith - result: True
04.Apr.2025 - 17:50:43 Debugging: Keep=True.
04.Apr.2025 - 17:50:43 **FILTER** Ignoring [groupTitle] [162]: US CBS NETWORK :Filtered by: 'CBS NETWORK'
04.Apr.2025 - 17:50:43 Checking [Ignore] Contains - result: True
04.Apr.2025 - 17:50:43 ****Item Ignored*** (Item in Ignores).

 Posted this DLL as some debugging lines have been added / updated

VODtoSTRMscheduledTask.dll

mickle026
Posted

ahh, I see where this has been deduced! 

After the Group Title has been altered it would be "CBS NETWORK", so logically if you are following the flow in the logs that's what you would think is correct when infact the includes and ignores are checking the "ORIGINAL" Group Title string.

I will think about adding checking it in both the original & the modified Group Titles, then "CBS NETWORK" would capture in either.
 

mickle026
Posted (edited)

Streamlined a bit of code and add some debug lines to the ignores to show strings being checked

04.Apr.2025 - 19:02:23 Debugging: Pre-Include/Ignore metadata.ChannelName=
04.Apr.2025 - 19:02:23 Debugging: Pre-Include/Ignore metadata.MovieName=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 19:02:23 Checking [Include] Contains - result: False
04.Apr.2025 - 19:02:23 Debugging: Current groupTitle: US CBS NETWORK,
04.Apr.2025 - 19:02:23 Debugging:  Current movieName: US CBS 4 DOTHAN AL (WTVY)

04.Apr.2025 - 19:02:23 **FILTER** Keeping [groupTitle] [2]: US CBS NETWORK :Filtered by: 'US '
04.Apr.2025 - 19:02:23 Checking [Include] StartsWith - result: True
04.Apr.2025 - 19:02:23 Debugging: Keep=True.
04.Apr.2025 - 19:02:23 Debugging: Current groupTitle: US CBS NETWORK,
04.Apr.2025 - 19:02:23 Debugging: Current movieName: US CBS 4 DOTHAN AL (WTVY)

04.Apr.2025 - 19:02:23 **FILTER** Ignoring [groupTitle] [2]: US CBS NETWORK :Filtered by: 'CBS NETWORK'
04.Apr.2025 - 19:02:23 Checking [Ignore] Contains - result: True
04.Apr.2025 - 19:02:23 ****Item Ignored*** (Item in Ignores).

VODtoSTRMscheduledTask.dll

Edited by mickle026
Posted

@mickle026Any ideas if you can optimize this for ARM64? It worked initially after a few changes you made around 3/20. Now it will run for about a day and crashes before it can write anything.

mickle026
Posted
22 minutes ago, BigIrn said:

@mickle026Any ideas if you can optimize this for ARM64? It worked initially after a few changes you made around 3/20. Now it will run for about a day and crashes before it can write anything.

do you have logs from it, showing where it crashed?

gillmacca01
Posted

Can't get it to download the m3u. Log says attempting but never goes further. I can manually download. Using version 144

mickle026
Posted (edited)
10 minutes ago, gillmacca01 said:

Can't get it to download the m3u. Log says attempting but never goes further. I can manually download. Using version 144

I have not changed a thing regarding that...

Edit: Tested your provider link you sent me and I have no issue, check you have no spaces before or after the link
 

04.Apr.2025 - 21:10:16 -----------------------------------------------------------------------
04.Apr.2025 - 21:10:16 Input File 1: http://**********/get.php?username=************&password=************&type=m3u_plus&output=ts
04.Apr.2025 - 21:10:16 Loading M3U file.
04.Apr.2025 - 21:10:16 Attempting to download file: http://**********/get.php?username=************&password=************&type=m3u_plus&output=ts
04.Apr.2025 - 21:10:46 Download Progress: 10%
04.Apr.2025 - 21:10:59 Download Progress: 20%
04.Apr.2025 - 21:11:15 Download Progress: 30%
04.Apr.2025 - 21:11:29 Download Progress: 40%
04.Apr.2025 - 21:11:41 Download Progress: 50%
04.Apr.2025 - 21:11:55 Download Progress: 60%
04.Apr.2025 - 21:12:09 Download Progress: 70%
04.Apr.2025 - 21:12:23 Download Progress: 80%
04.Apr.2025 - 21:12:37 Download Progress: 90%
04.Apr.2025 - 21:12:50 Download Progress: 100%
04.Apr.2025 - 21:12:51 Downloading & Loading m3u File Total execution time: 155242 ms
04.Apr.2025 - 21:12:52 No Input File 2
04.Apr.2025 - 21:12:52 No Input File 3
04.Apr.2025 - 21:12:52 Total Input Files: 1
04.Apr.2025 - 21:12:52 Total m3u Items: 591228

 

Edited by mickle026
mickle026
Posted
5 hours ago, mickle026 said:

Streamlined a bit of code and add some debug lines to the ignores to show strings being checked

04.Apr.2025 - 19:02:23 Debugging: Pre-Include/Ignore metadata.ChannelName=
04.Apr.2025 - 19:02:23 Debugging: Pre-Include/Ignore metadata.MovieName=CBS 4 DOTHAN AL (WTVY)
04.Apr.2025 - 19:02:23 Checking [Include] Contains - result: False
04.Apr.2025 - 19:02:23 Debugging: Current groupTitle: US CBS NETWORK,
04.Apr.2025 - 19:02:23 Debugging:  Current movieName: US CBS 4 DOTHAN AL (WTVY)

04.Apr.2025 - 19:02:23 **FILTER** Keeping [groupTitle] [2]: US CBS NETWORK :Filtered by: 'US '
04.Apr.2025 - 19:02:23 Checking [Include] StartsWith - result: True
04.Apr.2025 - 19:02:23 Debugging: Keep=True.
04.Apr.2025 - 19:02:23 Debugging: Current groupTitle: US CBS NETWORK,
04.Apr.2025 - 19:02:23 Debugging: Current movieName: US CBS 4 DOTHAN AL (WTVY)

04.Apr.2025 - 19:02:23 **FILTER** Ignoring [groupTitle] [2]: US CBS NETWORK :Filtered by: 'CBS NETWORK'
04.Apr.2025 - 19:02:23 Checking [Ignore] Contains - result: True
04.Apr.2025 - 19:02:23 ****Item Ignored*** (Item in Ignores).

VODtoSTRMscheduledTask.dll 843.5 kB · 2 downloads

Looks like i might have made an error when streamlining the code and referenced the wrong keywords in one of the streamlined areas, 
this DLL corrects that

 

VODtoSTRMscheduledTask.dll

 

 

Posted

Why is this "true"?

 

Screen Shot 2025-04-04 at 9.39.11 PM.png

Posted

Ok I'm kicking off 145 on the M4.

I'll go ahead and start posting my log just to see if anyone catches anything early on so I don't sit around staring at a progress bar.

There is an error in system tray. Other than that I don't see any immediate errors.

embyserver(2).txt

gillmacca01
Posted
5 hours ago, mickle026 said:

I have not changed a thing regarding that...

Edit: Tested your provider link you sent me and I have no issue, check you have no spaces before or after the link
 

04.Apr.2025 - 21:10:16 -----------------------------------------------------------------------
04.Apr.2025 - 21:10:16 Input File 1: http://**********/get.php?username=************&password=************&type=m3u_plus&output=ts
04.Apr.2025 - 21:10:16 Loading M3U file.
04.Apr.2025 - 21:10:16 Attempting to download file: http://**********/get.php?username=************&password=************&type=m3u_plus&output=ts
04.Apr.2025 - 21:10:46 Download Progress: 10%
04.Apr.2025 - 21:10:59 Download Progress: 20%
04.Apr.2025 - 21:11:15 Download Progress: 30%
04.Apr.2025 - 21:11:29 Download Progress: 40%
04.Apr.2025 - 21:11:41 Download Progress: 50%
04.Apr.2025 - 21:11:55 Download Progress: 60%
04.Apr.2025 - 21:12:09 Download Progress: 70%
04.Apr.2025 - 21:12:23 Download Progress: 80%
04.Apr.2025 - 21:12:37 Download Progress: 90%
04.Apr.2025 - 21:12:50 Download Progress: 100%
04.Apr.2025 - 21:12:51 Downloading & Loading m3u File Total execution time: 155242 ms
04.Apr.2025 - 21:12:52 No Input File 2
04.Apr.2025 - 21:12:52 No Input File 3
04.Apr.2025 - 21:12:52 Total Input Files: 1
04.Apr.2025 - 21:12:52 Total m3u Items: 591228

 

Tried deleting and readding, same issue 

gillmacca01
Posted
3 minutes ago, gillmacca01 said:

Tried deleting and readding, same issue 

My live tv guide using the same link has just updated successfully 

mickle026
Posted
8 hours ago, BigIrn said:

Why is this "true"?

 

Screen Shot 2025-04-04 at 9.39.11 PM.png

from an older build, delete it and click save settings.

8 hours ago, gillmacca01 said:

My live tv guide using the same link has just updated successfully 

Your link is working here, I cannot reproduce this?

05.Apr.2025 - 11:29:12 Task Started at: 05/04/2025 11:29:12
05.Apr.2025 - 11:29:12 -----------------------------------------------------------------------
05.Apr.2025 - 11:29:12 Create Movie Stream Files From M3U Scheduled Task Triggered.
05.Apr.2025 - 11:29:12 -----------------------------------------------------------------------
05.Apr.2025 - 11:29:12 Input File 1: http://****************/get.php?username=***********&password=***********&type=m3u_plus&output=ts
05.Apr.2025 - 11:29:12 Loading M3U file.
05.Apr.2025 - 11:29:12 Attempting to download file: http://****************/get.php?username=***********&password=***********&type=m3u_plus&output=ts
05.Apr.2025 - 11:29:54 Download Progress: 10%
05.Apr.2025 - 11:30:06 Download Progress: 20%

 

 

gillmacca01
Posted

Well unless I can figure out why live tv can use the link, but the plugin can't, I guess this is the end for me on this plugin, because I have no idea where to look. Thanks for trying to help me along the way

fbrassin
Posted

I tried build 1.0.0.145 process ended without problem.

I have all the logs. Do you need them?

I just found that movies and series scanned and written before i enabled download poster hasn't poster file, while new scanned has got that file.

Isn't it possible to download missing poster even if strm files are already there?

mickle026
Posted
1 hour ago, gillmacca01 said:

Well unless I can figure out why live tv can use the link, but the plugin can't, I guess this is the end for me on this plugin, because I have no idea where to look. Thanks for trying to help me along the way

Can you use Firefox to view and run this plugin?

Copy the f12 console output of the network tab, and send that to me in a pm?

That will have the headers and handshake information from your machine, I can compare that to mine.  The background chatter between your machine and the server.

It sounds like something may have changed, I don't particularly want to say at your end but something is different to my end.

If the headers are different I can add them in the source code to get handled.

I am asking this because, when it didn't work last time I had to mimic a web browser to get your link to work.  It still works here which is weird, but that's all I can think of at the moment, maybe your machine is asking for a different header or a different TLS handshake version.

mickle026
Posted
3 hours ago, fbrassin said:

I tried build 1.0.0.145 process ended without problem.

I have all the logs. Do you need them?

I just found that movies and series scanned and written before i enabled download poster hasn't poster file, while new scanned has got that file.

Isn't it possible to download missing poster even if strm files are already there?

In the current setup the answer would be no, because they way the directories are updated, but I can look at changing the code so that it could be an option.

  • Like 1
mickle026
Posted

@gillmacca01

Added headers for gzip & deflate as they are now used by the nginx server from the link you provided, and increased the timeout as a few times in my tests it took a quite long time to start to download.  It now has a huge 6 mins before it'll timeout.

I don't actually know what the issue was your end or if this will resolve it, but because it works here it has to be something like timeout surely?? 

 

VODtoSTRMscheduledTask.dll

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...