File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
www/nodejs-project/modules/streamer Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,19 @@ class StreamerTools extends Events {
65
65
await this . pingSource ( entry . source ) . catch ( console . error )
66
66
let type = false
67
67
const now = global . time ( )
68
+ const isMAG = url . indexOf ( '#mag-' ) != - 1 // MAG URLs should be revalidated
68
69
const cachingKey = this . infoCacheKey ( url ) , skipSample = entry . skipSample || entry . allowBlindTrust || ( entry . skipSample !== false && this . streamInfo . mi . isVideo ( url ) )
69
- if ( cachingKey && this . streamInfoCaching [ cachingKey ] && now < this . streamInfoCaching [ cachingKey ] . until ) {
70
+ if ( cachingKey && ! isMAG && this . streamInfoCaching [ cachingKey ] && now < this . streamInfoCaching [ cachingKey ] . until ) {
70
71
if ( skipSample || ( this . streamInfoCaching [ cachingKey ] . sample && this . streamInfoCaching [ cachingKey ] . sample . length ) ) {
71
- this . streamInfoCaching [ cachingKey ] . url = url // avoid reopening same URL
72
- return this . streamInfoCaching [ cachingKey ]
72
+ const result = Object . assign ( { } , this . streamInfoCaching [ cachingKey ] )
73
+ if ( result . url != url ) { // avoid opening cached URL from other stream
74
+ result . url = url
75
+ result . directURL = url
76
+ }
77
+ return result
73
78
}
74
79
}
75
- if ( url . indexOf ( '#mag-' ) != - 1 ) {
80
+ if ( isMAG ) {
76
81
if ( ! entry . source ) {
77
82
throw 'Source URL required'
78
83
}
You can’t perform that action at this time.
0 commit comments