Loading configuration files.
This commit is contained in:
parent
8ae222297a
commit
b3d8adec7e
@ -16,6 +16,17 @@ Class {
|
|||||||
#category : #VideoWeb
|
#category : #VideoWeb
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Invidious class >> configFile [
|
||||||
|
| configFolder |
|
||||||
|
configFolder := (FileLocator userData / 'Mutabit' / 'VideoWeb') ensureCreateDirectory.
|
||||||
|
^ configFolder / 'config.ston'
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Invidious class >> configFolder [
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Invidious class >> default: anObject [
|
Invidious class >> default: anObject [
|
||||||
default := anObject
|
default := anObject
|
||||||
@ -40,6 +51,11 @@ Invidious class >> instancesWithAPIEnabled [
|
|||||||
^ self instances select: [ :instance | instance api = true ]
|
^ self instances select: [ :instance | instance api = true ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Invidious class >> loadConfiguration [
|
||||||
|
^ self default: (STON fromString: self configFile contents)
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Invidious class >> rawInstances [
|
Invidious class >> rawInstances [
|
||||||
^ STON
|
^ STON
|
||||||
|
Loading…
Reference in New Issue
Block a user