Thanks to visit codestin.com
Credit goes to github.com

Skip to content

api.utils: hours_minutes_seconds update, twitch automate time offset#1804

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
back-to:times
Jun 25, 2018
Merged

api.utils: hours_minutes_seconds update, twitch automate time offset#1804
gravyboat merged 1 commit into
streamlink:masterfrom
back-to:times

Conversation

@back-to

@back-to back-to commented Jun 15, 2018

Copy link
Copy Markdown
Collaborator

hours_minutes_seconds:

allow more timestamps

  • hours:minutes:seconds to seconds
  • 11h22m33s to seconds
  • 11h to seconds
  • 20h15m to seconds
  • seconds to seconds

twitch:

  • automate hls-start-offset for urls with timestamps
  • update for the old vod url's, which I don't think exist anymore

youtube:

  • tested on youtube, but did not add it because there are to many http streams

I put it into api/utils.py but could also move it somewhere else.


will break #1792 as it uses the same file

@beardypig

Copy link
Copy Markdown
Member

Looks good to me. I restarted the Travis job, it failed due to network errors on their side.

@codecov

codecov Bot commented Jun 15, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1804 into master will increase coverage by 0.07%.
The diff coverage is 63.33%.

@@            Coverage Diff             @@
##           master    #1804      +/-   ##
==========================================
+ Coverage   50.15%   50.22%   +0.07%     
==========================================
  Files         235      236       +1     
  Lines       13978    13988      +10     
==========================================
+ Hits         7011     7026      +15     
+ Misses       6967     6962       -5

@beardypig

Copy link
Copy Markdown
Member

Maybe this is better in streamlink.utils?

@back-to

back-to commented Jun 22, 2018

Copy link
Copy Markdown
Collaborator Author

should it be in a newfile
such as src/streamlink/utils/times.py
or
in src/streamlink/utils/__init__.py ?

@beardypig

Copy link
Copy Markdown
Member

I was debating that with myself too... I'm not sure, maybe nicer to have a separate file :) Which do you prefer?

@back-to

back-to commented Jun 22, 2018

Copy link
Copy Markdown
Collaborator Author

I would go with a separate file times.py,
the __init__ file is already too packed.

@beardypig

Copy link
Copy Markdown
Member

Agreed.

**hours_minutes_seconds**: allow more timestamps
- hours:minutes:seconds to seconds
- 11h22m33s to seconds
- 11h to seconds
- 20h15m to seconds
- seconds to seconds

**twitch**:
- automate hls-start-offset for urls with timestamps
- update for the old vod url's, which I don't think exist anymore

**youtube**:
- tested on youtube, but did not add it because there are to many http
streams
@back-to

back-to commented Jun 22, 2018

Copy link
Copy Markdown
Collaborator Author

moved it into a new file :octocat:

@beardypig beardypig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have separated the tests a bit so you get a bit more info if they fail, but it makes little difference.

@beardypig

Copy link
Copy Markdown
Member

@gravyboat this is good to go.

@gravyboat

Copy link
Copy Markdown
Member

Looks good, thanks @back-to!

@gravyboat gravyboat merged commit 3e021c5 into streamlink:master Jun 25, 2018
@back-to back-to deleted the times branch June 25, 2018 10:14
mkbloke pushed a commit to mkbloke/streamlink that referenced this pull request Aug 18, 2020
api.utils: hours_minutes_seconds update, twitch automate time offset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants