File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
renderer/extensions/vueNodes/widgets/utils Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import type { ResultItemType } from '@/schemas/apiSchema'
22import { api } from '@/scripts/api'
3+ import { app } from '@/scripts/app'
34
45/**
56 * Format time in MM:SS format
@@ -23,10 +24,6 @@ export function getAudioUrlFromPath(
2324 return api . apiURL ( getResourceURL ( subfolder , filename , type ) )
2425}
2526
26- function getRandParam ( ) {
27- return '&rand=' + Math . random ( )
28- }
29-
3027export function getResourceURL (
3128 subfolder : string ,
3229 filename : string ,
@@ -36,7 +33,7 @@ export function getResourceURL(
3633 'filename=' + encodeURIComponent ( filename ) ,
3734 'type=' + type ,
3835 'subfolder=' + subfolder ,
39- getRandParam ( ) . substring ( 1 )
36+ app . getRandParam ( ) . substring ( 1 )
4037 ] . join ( '&' )
4138
4239 return `/view?${ params } `
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616} from '@/lib/litegraph/src/litegraph'
1717import type { Vector2 } from '@/lib/litegraph/src/litegraph'
1818import type { IBaseWidget } from '@/lib/litegraph/src/types/widgets'
19+ import { isCloud } from '@/platform/distribution/types'
1920import { useSettingStore } from '@/platform/settings/settingStore'
2021import { useToastStore } from '@/platform/updates/common/toastStore'
2122import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
@@ -336,6 +337,7 @@ export class ComfyApp {
336337 }
337338
338339 getRandParam ( ) {
340+ if ( isCloud ) return ''
339341 return '&rand=' + Math . random ( )
340342 }
341343
You can’t perform that action at this time.
0 commit comments