Even stricter lint
This commit is contained in:
parent
4be5521afe
commit
455102f56f
|
@ -17,7 +17,7 @@ module.exports = {
|
|||
// ignoreComments: true,
|
||||
// ignoreUrls: true,
|
||||
// ignoreStrings: true,
|
||||
ignoreTemplateLiterals: true,
|
||||
// ignoreTemplateLiterals: true,
|
||||
},
|
||||
],
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ export default {
|
|||
|
||||
GET_PLEX_DEVICE_NAME_HEADER: (state, getters) => getters.GET_PLEX_DEVICE_NAME,
|
||||
GET_PLEX_PLATFORM_HEADER: (state, getters) => getters.GET_PLEX_DEVICE_NAME,
|
||||
GET_PLEX_DEVICE_SCREEN_RESOLUTION_HEADER: () => `${window.screen.availWidth}x${window.screen.availHeight},${window.screen.width}x${window.screen.height}`,
|
||||
GET_PLEX_DEVICE_SCREEN_RESOLUTION_HEADER: () => `${window.screen.availWidth}x${
|
||||
window.screen.availHeight},${window.screen.width}x${window.screen.height}`,
|
||||
|
||||
GET_PLEX_INITIAL_AUTH_PARAMS: (state, getters, rootState, rootGetters) => ({
|
||||
'X-Plex-Product': getters.GET_PLEX_PRODUCT_HEADER,
|
||||
|
|
|
@ -226,7 +226,9 @@ export default {
|
|||
getters.GET_ACTIVE_SERVER_ID,
|
||||
).name;
|
||||
await dispatch('DISPLAY_NOTIFICATION',
|
||||
`Now Playing: ${contentTitleUtils.getCombinedTitle(getters.GET_ACTIVE_MEDIA_METADATA)} from ${serverName}`,
|
||||
`Now Playing: ${contentTitleUtils.getCombinedTitle(
|
||||
getters.GET_ACTIVE_MEDIA_METADATA,
|
||||
)} from ${serverName}`,
|
||||
{ root: true });
|
||||
}
|
||||
|
||||
|
|
|
@ -316,15 +316,15 @@ export default {
|
|||
return totalSize;
|
||||
},
|
||||
|
||||
CREATE_PLAY_QUEUE: async ({ dispatch }, { machineIdentifier, ratingKey, signal }) => {
|
||||
CREATE_PLAY_QUEUE: async ({ dispatch }, { machineIdentifier: id, ratingKey, signal }) => {
|
||||
const data = await dispatch('FETCH_PLEX_SERVER', {
|
||||
machineIdentifier,
|
||||
machineIdentifier: id,
|
||||
method: 'POST',
|
||||
path: '/playQueues',
|
||||
params: {
|
||||
type: 'video',
|
||||
continuous: 1,
|
||||
uri: `server://${machineIdentifier}/com.plexapp.plugins.library/library/metadata/${ratingKey}`,
|
||||
uri: `server://${id}/com.plexapp.plugins.library/library/metadata/${ratingKey}`,
|
||||
repeat: 0,
|
||||
own: 1,
|
||||
includeChapters: 1,
|
||||
|
|
|
@ -48,15 +48,19 @@ export default {
|
|||
: null),
|
||||
|
||||
GET_SRC_URL: (state, getters) => makeUrl(
|
||||
`${getters.GET_PLEX_SERVER_URL}/video/:/transcode/universal/start.${protocolExtension[getters.GET_STREAMING_PROTOCOL]}`,
|
||||
`${getters.GET_PLEX_SERVER_URL}/video/:/transcode/universal/start.${
|
||||
protocolExtension[getters.GET_STREAMING_PROTOCOL]}`,
|
||||
getters.GET_DECISION_AND_START_PARAMS,
|
||||
),
|
||||
|
||||
GET_SUBTITLE_BASE_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL}/video/:/transcode/universal/subtitles`,
|
||||
GET_SUBTITLE_BASE_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL
|
||||
}/video/:/transcode/universal/subtitles`,
|
||||
|
||||
GET_DECISION_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL}/video/:/transcode/universal/decision`,
|
||||
GET_DECISION_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL
|
||||
}/video/:/transcode/universal/decision`,
|
||||
|
||||
GET_PART_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL}/library/parts/${getters.GET_PART_ID}`,
|
||||
GET_PART_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL
|
||||
}/library/parts/${getters.GET_PART_ID}`,
|
||||
|
||||
GET_TIMELINE_URL: (state, getters) => `${getters.GET_PLEX_SERVER_URL}/:/timeline`,
|
||||
|
||||
|
@ -143,9 +147,13 @@ export default {
|
|||
'plex/GET_PLEX_BASE_PARAMS'](getters.GET_PLEX_SERVER_ACCESS_TOKEN),
|
||||
|
||||
GET_PLEX_PROFILE_EXTRAS: (state, getters, rootState, rootGetters) => {
|
||||
const base = `append-transcode-target-codec(type=videoProfile&context=streaming&audioCodec=aac&protocol=${getters.GET_STREAMING_PROTOCOL})`;
|
||||
const base = 'append-transcode-target-codec('
|
||||
+ `type=videoProfile&context=streaming&audioCodec=aac&protocol=${
|
||||
getters.GET_STREAMING_PROTOCOL})`;
|
||||
return rootGetters['settings/GET_SLPLAYERQUALITY']
|
||||
? `${base}+add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.bitrate&value=${rootGetters['settings/GET_SLPLAYERQUALITY']}&replace=true)`
|
||||
? `${base
|
||||
}+add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.bitrate&value=${
|
||||
rootGetters['settings/GET_SLPLAYERQUALITY']}&replace=true)`
|
||||
: base;
|
||||
},
|
||||
|
||||
|
|
|
@ -523,7 +523,8 @@ export default {
|
|||
}
|
||||
// TODO: fix
|
||||
} else {
|
||||
const message = `Failed to find a compatible copy of ${getters.GET_HOST_USER.media.title}. If you have access to the content try manually playing it.`;
|
||||
const message = `Failed to find a compatible copy of ${getters.GET_HOST_USER.media.title
|
||||
}. If you have access to the content try manually playing it.`;
|
||||
console.warn(message);
|
||||
await dispatch('DISPLAY_NOTIFICATION', message, { root: true });
|
||||
}
|
||||
|
|
|
@ -48,14 +48,16 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
getCombinedTitle: (metadata) => {
|
||||
switch (metadata.type) {
|
||||
getCombinedTitle: ({
|
||||
type, grandparentTitle, title, parentIndex, index,
|
||||
}) => {
|
||||
switch (type) {
|
||||
case 'episode': {
|
||||
return `${metadata.grandparentTitle} - ${metadata.title} S${metadata.parentIndex}-E${metadata.index}`;
|
||||
return `${grandparentTitle} - ${title} S${parentIndex}-E${index}`;
|
||||
}
|
||||
|
||||
default: {
|
||||
return metadata.title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue