File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ////////////////////////// pn delete move to playback
2- const columnsPlaybackReporting = [
3- "rowid" ,
4- "DateCreated" ,
5- "UserId" ,
6- "ItemId" ,
7- "ItemType" ,
8- "ItemName" ,
9- "PlaybackMethod" ,
10- "ClientName" ,
11- "DeviceName" ,
12- "PlayDuration" ,
13- ] ;
1+ ////////////////////////// pn delete move to playback
2+ const columnsPlaybackReporting = [
3+ "rowid" ,
4+ "DateCreated" ,
5+ "UserId" ,
6+ "ItemId" ,
7+ "ItemType" ,
8+ "ItemName" ,
9+ "PlaybackMethod" ,
10+ "ClientName" ,
11+ "DeviceName" ,
12+ "PlayDuration" ,
13+ ] ;
1414
15+ const mappingPlaybackReporting = ( item ) => {
16+ let duration = item [ 9 ] ;
1517
16- const mappingPlaybackReporting = ( item ) => ( {
17- rowid :item [ 0 ] ,
18- DateCreated :item [ 1 ] ,
19- UserId :item [ 2 ] ,
20- ItemId :item [ 3 ] ,
21- ItemType :item [ 4 ] ,
22- ItemName :item [ 5 ] ,
23- PlaybackMethod :item [ 6 ] ,
24- ClientName :item [ 7 ] ,
25- DeviceName :item [ 8 ] ,
26- PlayDuration :item [ 9 ] ,
27- } ) ;
18+ if ( duration === null || duration === undefined || duration < 0 ) {
19+ duration = 0 ;
20+ }
2821
29- module . exports = {
30- columnsPlaybackReporting,
31- mappingPlaybackReporting,
32- } ;
22+ return {
23+ rowid : item [ 0 ] ,
24+ DateCreated : item [ 1 ] ,
25+ UserId : item [ 2 ] ,
26+ ItemId : item [ 3 ] ,
27+ ItemType : item [ 4 ] ,
28+ ItemName : item [ 5 ] ,
29+ PlaybackMethod : item [ 6 ] ,
30+ ClientName : item [ 7 ] ,
31+ DeviceName : item [ 8 ] ,
32+ PlayDuration : duration ,
33+ } ;
34+ } ;
35+
36+ module . exports = {
37+ columnsPlaybackReporting,
38+ mappingPlaybackReporting,
39+ } ;
You can’t perform that action at this time.
0 commit comments