omaralbeik / m3ukit Goto Github PK
View Code? Open in Web Editor NEWModern framework for parsing m3u files
License: MIT License
Modern framework for parsing m3u files
License: MIT License
It would be nice to have how to know what cause the parsing to fail, so I can have a way to inform the user what is wrong
When parsing a M3U file if it contains any extra markers such as "#EXTGRP" the last URL used is then wrong
For example a file like this
#EXTM3U
#EXTINF:-1 tvg-id="TV1" tvg-name="TV1" tvg-logo="" group-title="TV Group 1",TV 1
#EXTGRP:TV GROUP 1
https://URL1.com
#EXTINF:-1 tvg-id="TV2" tvg-name="TV2" tvg-logo="" group-title="TV Group 2",TV 2
#EXTGRP:TV GROUP 2
https://URL2.com
You end up with the following metadataLine and url:
- "#EXTINF:-1 tvg-id=\"TV1\" tvg-name=\"TV1\" tvg-logo=\"\" group-title=\"TV Group 1\",TV 1"
▿ #EXTGRP:TV%20GROUP%201
- _url: #EXTGRP:TV%20GROUP%201 #0
- super: NSObject
- "#EXTINF:-1 tvg-id=\"TV2\" tvg-name=\"TV2\" tvg-logo=\"\" group-title=\"TV Group 2\",TV 2"
▿ https://URL1.com
- _url: https://URL1.com #0
- super: NSObject
http://bit.ly/022qseed breaks the parser, It contains a special character at the beginning which makes the code in file "PlaylistParser" to fail with error "ParsingError.invalidSource".
Would be possible to treat this case in the parser? Something like
guard rawString.<remove-illegal-chars>.starts(with: filePrefix) else {
throw ParsingError.invalidSource
}
Could we add a few options where we could get total counters. What I mean is can we get a total count of how many Categories are in each playlist, totals for each kind (movie, series, live, etc) there are, and so on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.