retold-remote 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/html/index.html +2 -0
- package/package.json +20 -14
- package/source/Pict-Application-RetoldRemote.js +46 -5
- package/source/cli/RetoldRemote-CLI-Run.js +0 -0
- package/source/cli/RetoldRemote-Server-Setup.js +790 -8
- package/source/cli/commands/RetoldRemote-Command-Serve.js +34 -1
- package/source/providers/Pict-Provider-GalleryFilterSort.js +61 -9
- package/source/providers/Pict-Provider-GalleryNavigation.js +517 -18
- package/source/providers/Pict-Provider-RetoldRemote.js +11 -2
- package/source/providers/Pict-Provider-RetoldRemoteIcons.js +1 -0
- package/source/server/RetoldRemote-ArchiveService.js +830 -0
- package/source/server/RetoldRemote-AudioWaveformService.js +673 -0
- package/source/server/RetoldRemote-EbookService.js +242 -0
- package/source/server/RetoldRemote-MediaService.js +1 -1
- package/source/server/RetoldRemote-ToolDetector.js +31 -1
- package/source/server/RetoldRemote-VideoFrameService.js +486 -0
- package/source/views/PictView-Remote-AudioExplorer.js +1213 -0
- package/source/views/PictView-Remote-Gallery.js +141 -2
- package/source/views/PictView-Remote-Layout.js +18 -27
- package/source/views/PictView-Remote-MediaViewer.js +638 -39
- package/source/views/PictView-Remote-SettingsPanel.js +23 -0
- package/source/views/PictView-Remote-TopBar.js +121 -0
- package/source/views/PictView-Remote-VideoExplorer.js +1229 -0
- package/web-application/index.html +2 -0
- package/web-application/js/epub.min.js +1 -0
- package/web-application/retold-remote.js +7030 -1244
- package/web-application/retold-remote.js.map +1 -1
- package/web-application/retold-remote.min.js +13 -44
- package/web-application/retold-remote.min.js.map +1 -1
- package/web-application/retold-remote.compatible.js +0 -5764
- package/web-application/retold-remote.compatible.js.map +0 -1
- package/web-application/retold-remote.compatible.min.js +0 -120
- package/web-application/retold-remote.compatible.min.js.map +0 -1
package/html/index.html
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
<script src="js/pict.min.js"></script>
|
|
15
15
|
<!-- CodeJar (code editor engine for pict-section-code) -->
|
|
16
16
|
<script src="codejar.js"></script>
|
|
17
|
+
<!-- epub.js ebook renderer -->
|
|
18
|
+
<script src="js/epub.min.js"></script>
|
|
17
19
|
<!-- Retold Remote application bundle -->
|
|
18
20
|
<script src="retold-remote.min.js"></script>
|
|
19
21
|
<script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "retold-remote",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Retold Remote - NAS media browser with gallery views and keyboard navigation",
|
|
5
5
|
"main": "source/Pict-RetoldRemote-Bundle.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,24 +25,26 @@
|
|
|
25
25
|
"author": "steven velozo <steven@velozo.com>",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"fable": "^3.1.
|
|
30
|
-
"fable-serviceproviderbase": "^3.0.
|
|
31
|
-
"orator": "^6.0.
|
|
32
|
-
"orator-serviceserver-restify": "^2.0.
|
|
33
|
-
"pict": "^1.0.
|
|
34
|
-
"pict-application": "^1.0.
|
|
35
|
-
"pict-provider": "^1.0.
|
|
36
|
-
"pict-
|
|
37
|
-
"pict-section-
|
|
38
|
-
"pict-
|
|
39
|
-
"pict-
|
|
28
|
+
"epubjs": "^0.3.93",
|
|
29
|
+
"fable": "^3.1.63",
|
|
30
|
+
"fable-serviceproviderbase": "^3.0.19",
|
|
31
|
+
"orator": "^6.0.3",
|
|
32
|
+
"orator-serviceserver-restify": "^2.0.9",
|
|
33
|
+
"pict": "^1.0.355",
|
|
34
|
+
"pict-application": "^1.0.33",
|
|
35
|
+
"pict-provider": "^1.0.12",
|
|
36
|
+
"pict-section-code": "^1.0.3",
|
|
37
|
+
"pict-section-filebrowser": "^0.0.2",
|
|
38
|
+
"pict-service-commandlineutility": "^1.0.19",
|
|
39
|
+
"pict-view": "^1.0.67",
|
|
40
|
+
"retold-content-system": "^1.0.2",
|
|
41
|
+
"yauzl": "^3.2.0"
|
|
40
42
|
},
|
|
41
43
|
"optionalDependencies": {
|
|
42
44
|
"sharp": "^0.33.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"quackage": "^1.0.
|
|
47
|
+
"quackage": "^1.0.59"
|
|
46
48
|
},
|
|
47
49
|
"copyFilesSettings": {
|
|
48
50
|
"whenFileExists": "overwrite"
|
|
@@ -63,6 +65,10 @@
|
|
|
63
65
|
{
|
|
64
66
|
"from": "./node_modules/pict/dist/pict.min.js.map",
|
|
65
67
|
"to": "./web-application/js/"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"from": "./node_modules/epubjs/dist/epub.min.js",
|
|
71
|
+
"to": "./web-application/js/"
|
|
66
72
|
}
|
|
67
73
|
]
|
|
68
74
|
}
|
|
@@ -18,6 +18,8 @@ const libViewSettingsPanel = require('./views/PictView-Remote-SettingsPanel.js')
|
|
|
18
18
|
const libViewGallery = require('./views/PictView-Remote-Gallery.js');
|
|
19
19
|
const libViewMediaViewer = require('./views/PictView-Remote-MediaViewer.js');
|
|
20
20
|
const libViewImageViewer = require('./views/PictView-Remote-ImageViewer.js');
|
|
21
|
+
const libViewVideoExplorer = require('./views/PictView-Remote-VideoExplorer.js');
|
|
22
|
+
const libViewAudioExplorer = require('./views/PictView-Remote-AudioExplorer.js');
|
|
21
23
|
|
|
22
24
|
// Application configuration
|
|
23
25
|
const _DefaultConfiguration = require('./Pict-Application-RetoldRemote-Configuration.json');
|
|
@@ -47,6 +49,8 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
47
49
|
this.pict.addView('RetoldRemote-MediaViewer', libViewMediaViewer.default_configuration, libViewMediaViewer);
|
|
48
50
|
this.pict.addView('RetoldRemote-ImageViewer', libViewImageViewer.default_configuration, libViewImageViewer);
|
|
49
51
|
this.pict.addView('RetoldRemote-SettingsPanel', libViewSettingsPanel.default_configuration, libViewSettingsPanel);
|
|
52
|
+
this.pict.addView('RetoldRemote-VideoExplorer', libViewVideoExplorer.default_configuration, libViewVideoExplorer);
|
|
53
|
+
this.pict.addView('RetoldRemote-AudioExplorer', libViewAudioExplorer.default_configuration, libViewAudioExplorer);
|
|
50
54
|
|
|
51
55
|
// Add new providers
|
|
52
56
|
this.pict.addProvider('RetoldRemote-Provider', libProviderRetoldRemote.default_configuration, libProviderRetoldRemote);
|
|
@@ -76,16 +80,20 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
76
80
|
GalleryCursorIndex: 0, // Currently highlighted item
|
|
77
81
|
GalleryFilter: 'all', // 'all', 'images', 'video', 'audio', 'documents'
|
|
78
82
|
SearchQuery: '',
|
|
83
|
+
SearchCaseSensitive: false,
|
|
84
|
+
SearchRegex: false,
|
|
79
85
|
ServerCapabilities: {}, // From /api/media/capabilities
|
|
80
86
|
FolderSummary: null, // From /api/media/folder-summary
|
|
81
87
|
CurrentViewerFile: '', // File being viewed
|
|
82
88
|
CurrentViewerMediaType: '', // Media type of viewed file
|
|
83
|
-
HashedFilenames:
|
|
89
|
+
HashedFilenames: true, // From /api/remote/settings
|
|
84
90
|
ShowHiddenFiles: false,
|
|
85
91
|
DistractionFreeShowNav: true,
|
|
86
92
|
ImageFitMode: 'auto',
|
|
87
93
|
SidebarCollapsed: false,
|
|
88
94
|
SidebarWidth: 250,
|
|
95
|
+
AutoplayVideo: false,
|
|
96
|
+
AutoplayAudio: false,
|
|
89
97
|
|
|
90
98
|
// Filter state
|
|
91
99
|
FilterState:
|
|
@@ -105,6 +113,7 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
105
113
|
SortDirection: 'asc', // 'asc', 'desc'
|
|
106
114
|
|
|
107
115
|
// Filter panel UI
|
|
116
|
+
FilterBarVisible: false,
|
|
108
117
|
FilterPanelOpen: false,
|
|
109
118
|
|
|
110
119
|
// Saved filter presets
|
|
@@ -169,6 +178,13 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
169
178
|
{
|
|
170
179
|
tmpSelf.navigateToFile(pFileEntry.Path);
|
|
171
180
|
}
|
|
181
|
+
else if (pFileEntry && (pFileEntry.Type === 'folder' || pFileEntry.Type === 'archive'))
|
|
182
|
+
{
|
|
183
|
+
// Single-click on a folder or archive navigates into it
|
|
184
|
+
let tmpCurrentLocation = (tmpSelf.pict.AppData.PictFileBrowser && tmpSelf.pict.AppData.PictFileBrowser.CurrentLocation) || '';
|
|
185
|
+
let tmpNewPath = tmpCurrentLocation ? (tmpCurrentLocation + '/' + pFileEntry.Name) : pFileEntry.Name;
|
|
186
|
+
tmpSelf.loadFileList(tmpNewPath);
|
|
187
|
+
}
|
|
172
188
|
};
|
|
173
189
|
}
|
|
174
190
|
|
|
@@ -465,9 +481,10 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
465
481
|
let tmpBrowseFragId = (tmpBrowseFragProvider && tmpCurrentPath) ? tmpBrowseFragProvider.getFragmentIdentifier(tmpCurrentPath) : tmpCurrentPath;
|
|
466
482
|
window.location.hash = tmpBrowseFragId ? '#/browse/' + tmpBrowseFragId : '#/browse/';
|
|
467
483
|
|
|
468
|
-
// Fetch folder summary for topbar info
|
|
484
|
+
// Fetch folder summary for topbar info (skip for archive paths — they are not filesystem directories)
|
|
469
485
|
let tmpMediaProvider = tmpSelf.pict.providers['RetoldRemote-Provider'];
|
|
470
|
-
|
|
486
|
+
let tmpIsArchivePath = /\.(zip|7z|rar|tar|tgz|cbz|cbr|tar\.gz|tar\.bz2|tar\.xz)(\/|$)/i.test(tmpCurrentPath);
|
|
487
|
+
if (tmpMediaProvider && !tmpIsArchivePath)
|
|
471
488
|
{
|
|
472
489
|
tmpMediaProvider.fetchFolderSummary(tmpCurrentPath,
|
|
473
490
|
(pError, pSummary) =>
|
|
@@ -508,7 +525,7 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
508
525
|
*/
|
|
509
526
|
resolveHash()
|
|
510
527
|
{
|
|
511
|
-
let tmpHash = (window.location.hash || '').replace(/^#\/?/, '');
|
|
528
|
+
let tmpHash = decodeURIComponent((window.location.hash || '').replace(/^#\/?/, ''));
|
|
512
529
|
|
|
513
530
|
if (!tmpHash)
|
|
514
531
|
{
|
|
@@ -540,6 +557,26 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
540
557
|
}
|
|
541
558
|
this.navigateToFile(tmpFilePath);
|
|
542
559
|
}
|
|
560
|
+
else if (tmpParts[0] === 'explore' && tmpParts.length >= 2)
|
|
561
|
+
{
|
|
562
|
+
let tmpRawPath = tmpParts.slice(1).join('/');
|
|
563
|
+
let tmpFilePath = tmpFragProvider ? tmpFragProvider.resolveFragmentIdentifier(tmpRawPath) : tmpRawPath;
|
|
564
|
+
let tmpVEX = this.pict.views['RetoldRemote-VideoExplorer'];
|
|
565
|
+
if (tmpVEX)
|
|
566
|
+
{
|
|
567
|
+
tmpVEX.showExplorer(tmpFilePath);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
else if (tmpParts[0] === 'explore-audio' && tmpParts.length >= 2)
|
|
571
|
+
{
|
|
572
|
+
let tmpRawPath = tmpParts.slice(1).join('/');
|
|
573
|
+
let tmpFilePath = tmpFragProvider ? tmpFragProvider.resolveFragmentIdentifier(tmpRawPath) : tmpRawPath;
|
|
574
|
+
let tmpAEX = this.pict.views['RetoldRemote-AudioExplorer'];
|
|
575
|
+
if (tmpAEX)
|
|
576
|
+
{
|
|
577
|
+
tmpAEX.showExplorer(tmpFilePath);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
543
580
|
else if (tmpParts[0] === 'edit' && tmpParts.length >= 2)
|
|
544
581
|
{
|
|
545
582
|
let tmpRawPath = tmpParts.slice(1).join('/');
|
|
@@ -570,7 +607,9 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
570
607
|
SortField: tmpRemote.SortField,
|
|
571
608
|
SortDirection: tmpRemote.SortDirection,
|
|
572
609
|
FilterPresets: tmpRemote.FilterPresets,
|
|
573
|
-
FilterPanelOpen: tmpRemote.FilterPanelOpen
|
|
610
|
+
FilterPanelOpen: tmpRemote.FilterPanelOpen,
|
|
611
|
+
AutoplayVideo: tmpRemote.AutoplayVideo,
|
|
612
|
+
AutoplayAudio: tmpRemote.AutoplayAudio
|
|
574
613
|
};
|
|
575
614
|
localStorage.setItem('retold-remote-settings', JSON.stringify(tmpSettings));
|
|
576
615
|
}
|
|
@@ -610,6 +649,8 @@ class RetoldRemoteApplication extends libContentEditorApplication
|
|
|
610
649
|
if (tmpSettings.SortDirection) tmpRemote.SortDirection = tmpSettings.SortDirection;
|
|
611
650
|
if (Array.isArray(tmpSettings.FilterPresets)) tmpRemote.FilterPresets = tmpSettings.FilterPresets;
|
|
612
651
|
if (typeof (tmpSettings.FilterPanelOpen) === 'boolean') tmpRemote.FilterPanelOpen = tmpSettings.FilterPanelOpen;
|
|
652
|
+
if (typeof (tmpSettings.AutoplayVideo) === 'boolean') tmpRemote.AutoplayVideo = tmpSettings.AutoplayVideo;
|
|
653
|
+
if (typeof (tmpSettings.AutoplayAudio) === 'boolean') tmpRemote.AutoplayAudio = tmpSettings.AutoplayAudio;
|
|
613
654
|
}
|
|
614
655
|
}
|
|
615
656
|
catch (pError)
|
|
File without changes
|