Giter Site home page Giter Site logo

m3u-parser's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Vulnerabilities

Renovate has not found any CVEs on osv.dev.

Detected dependencies

github-actions
.github/workflows/Main.yaml
  • actions/checkout v4
  • actions/setup-java v4
  • codecov/codecov-action v3
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v4
gradle
settings.gradle.kts
build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.9.24
gradle/libs.versions.toml
  • org.assertj:assertj-core 3.25.3
  • org.junit.jupiter:junit-jupiter-api 5.10.2
  • org.junit.jupiter:junit-jupiter-engine 5.10.2
  • org.junit.platform:junit-platform-launcher 1.10.2
  • io.github.oshai:kotlin-logging 6.0.9
  • org.slf4j:slf4j-api 2.0.13
  • org.slf4j:slf4j-simple 2.0.13
  • io.gitlab.arturbosch.detekt 1.23.6
  • org.jetbrains.dokka 1.9.20
  • com.diffplug.spotless 6.25.0
  • org.sonarqube 4.4.1.3373
  • com.github.ben-manes.versions 0.51.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.6

  • Check this box to trigger a request for Renovate to run again on this repository

Suggestion: Add logo to M3uEntry model

Hi!

First, thank you for resolving the issue #42 ๐Ÿ˜Š . I have a suggestion that I don't know if it could be implemented, which is to add the logo (and optionally, the group) to the M3uEntry model.

The logo is usually defined in the tvg-logo tag of the line (and group in group-title)
2022-01-06_19-16

Thank you very much for your effort!

Improve charset handling

Loading m3u playlists from a file requires the file's content to be decoded using a Charset. Currently the user can specify a Charset for decoding, otherwise the parser defaults to UTF-8.

Instead of expecting the user to choose a Charset, the parser should default to the local system's default non-Unicode encoding for .m3u files and UTF-8 for .m3u8 files.

As always, we can't expect all .m3u files to follow the "convention" of using the local system's encoding, so we should detect signals of having used the wrong Charset and then fall back to UTF-8 anyway.

Users should still be able to completely override this "auto detection".

Error "Retrieving groups by name is not supported on this platform"

Hi!

I'm using this library for future new function in my project FeedTV, and when I parse the M3U file, I get an exception with the error "Retrieving groups by name is not supported on this platform".

2022-01-06 00:53:17.341 7411-7411/org.juanro.feedtv E/AndroidRuntime: FATAL EXCEPTION: main Process: org.juanro.feedtv, PID: 7411 java.lang.UnsupportedOperationException: Retrieving groups by name is not supported on this platform. at kotlin.internal.PlatformImplementations.getMatchResultNamedGroup(PlatformImplementations.kt:42) at kotlin.text.MatcherMatchResult$groups$1.get(Regex.kt:372) at kotlin.text.jdk8.RegexExtensionsJDK8Kt.get(RegexExtensions.kt:34) at net.bjoernpetersen.m3u.M3uParser.parseExtended(M3uParser.kt:166) at net.bjoernpetersen.m3u.M3uParser.parse(M3uParser.kt:137) at net.bjoernpetersen.m3u.M3uParser.parse(M3uParser.kt:54) at net.bjoernpetersen.m3u.M3uParser.parse$default(M3uParser.kt:52) at net.bjoernpetersen.m3u.M3uParser.parse(Unknown Source:2) at org.juanro.feedtv.M3UParser$1.onResponse(M3UParser.java:150) at org.juanro.feedtv.M3UParser$1.onResponse(M3UParser.java:125) at org.juanro.feedtv.Http.InputStreamVolleyRequest.deliverResponse(InputStreamVolleyRequest.java:57) at org.juanro.feedtv.Http.InputStreamVolleyRequest.deliverResponse(InputStreamVolleyRequest.java:29) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:102) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

It seems to be because of using name groups in Regex (seconds and title)

private const val EXTENDED_INFO = """${COMMENT_START}EXTINF:(?<$SECONDS>[-]?\d+).*,(?<$TITLE>.+)"""

I'm using this version:
implementation "com.github.bjoernpetersen:m3u-parser:1.1.0"

Introduce parseHead

It would be great to parse also header information (metadata) if available.
E.g.
#EXTM3U url-tvg="http://toplevel.domain/epg/epgfull.xml.gz"

Maybe I will be able to create a PR for this.

Cannot get it to import properly

Discussed in #49

Originally posted by jleohr February 8, 2022
My students and I are a little new to Android Studio and Kotlin as a language. They are attempting to create an app that will play sound files when buttons are clicked. Everything we've read points to using M3U files and your project is the only thing we can find that might work for us. However, when we attempt to open the downloaded Git repository there is not an interface for the Android device. We decided we needed to import it into our existing project but when we do it results in errors that we have Unresolved reference: libs. Any suggestions of what we might be doing wrong?

Add more return types support

Hi, nice parser.
I have used it as my android app's default m3u parser.
But I think adding some other return types like Flow, Sequence etc is necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.