Yesterday, 05:52 AM
(This post was last modified: 10 hours ago by xaque. Edited 4 times in total.)
(Yesterday, 04:43 AM)Hanna Yusuf Wrote: Yes you are right if the file extension is not there you can't upload the file anyway ... I assumed all m3u files have the extension but that is something I work on, a good solution would be to check the file heading of the file.
Considering ffmpeg, I am not immediately scanning all the links, I found an effective but maybe less accurate solution.
You have to manually check every movie before upload using the get media info button then it either returns the resolution and duration or "Error" which indicates that the link doesn't work. If you get multiple (I am implementing a counter for the providers in the admin panel at the moment) you can assume that the provider has stopped working, then you can remove it from the admin panel.
Thank you a lot for suggesting guessit, I have been looking for such a project!
I will definitely look into using it.
If you are interested, I am wondering if you think we could integrate our projects together in case you have a better implementation for the processing, and we can implement guessit to help identify new series and movies.
I am also planning on implementing auto library scan when new media is moved using the JellyfinAPI
So here is my project for reference, I have 3 branches, the main one is simply the parser script which creates a strm library of Movie and TV shows that can be directly ingested by jellyfin. It does allow you to pass a apikey and your jellyfin url as variables through a .env file to run a library scan.
https://github.com/Xaque8787/m3uparser
The other two branches kind of take things a step further and the compose file I provide is a stack that includes the jellyfin server, but I've added a bunch of re-branding to change the jellyfin logo and stuff, it even ships with a re branded apk of the jellyfin android tv client that gets exposed on a webserver. The only difference between these two branches is one directly uses jellyfins live tv capabilities to add tuner and xmltv data and the other uses Threadfin (m3u proxy) which is then added to the jellyfin server.
https://github.com/Xaque8787/m3uparser/tree/ezpztv
https://github.com/Xaque8787/m3uparser/t..._threadfin
Any of these branches have the ability to supply multiple m3u files at once, and in addition to creating the strm libraries will produce a single livetv.m3u which contains any livetv streams from any of the supplied m3u files. This file is what is used when adding a tuner to either jellyfin or theadfin.
There is a fourth branch but that is currently just being used for another project I have in the works.
I've been fortunate enough to have people supply me with various m3u files to see how providers format them, and I haven't came across any that use file extensions in the movie/series name or in the stream url. I've used the information I've obtained to allow users to pass environment variables that can: exclude streams that contain certain terms (like language tags DE, RU or genres), remove certain terms found in titles (x265, FHD, etc), replace terms (replacing any instance of 1/2 with ½ or \ with a -) and the ability to scrub out other un wanted strings.
My current implementation for deciding what is what is to use the group-tile values and run them through a series of regex, which kind of goes like this.
If S00E00 (or other common variations like 00x00) are found mark it as tv series.
If tv show but also includes a date like 12 9 2025 then mark that as live tv show. (Things like late night talk shows ie The Daily Show, Jimmy Kimmel Live, etc)
If not series or tv show then look for year date format (1995, 2003, etc) and consider this to be a movie.
If not series, live tv, movie and has a -1 as the duration in the EXTINF line then consider this live tv.
If not any of the above then consider this "unsorted" which often contains poorly named titles or things like Ufc 303 Dude vs SomeGuy.
This has kind of been fine tuned to where I rarely get any unsorted titles if any, and when used in conjunction with the filters provided by environment variables, has a very high success rate of parsing very large m3u files. And it's pretty dang fast too.
With all that being said I would like to mention I am in no way any kind of programmer, I actually work in a kitchen, and this has been a side project of mine and I've had to teach myself as I go. I will say I've come a long way since this first began though, and wouldn't at all mind collaborating on something. I'd say the perfect solution would be a jellyfin plugin that can take any number of m3u inputs and be pointed to a Movie and TV library. But perhaps that is for a discussion to be had in another time/place.
Lastly I'd like to say I've only glanced at your code, haven't actually spun up the image/container, and my weeks currently a bit busy, but when I get some free time this weekend I hope to get it running and check it out, then perhaps I'd have more of an idea on a collaboration, in whatever shape that may be, but I'd like you to know I'm super interested in being able to collab with someone in some capacity. The wheels are spinning, and your project has already got me thinking ton!