mirror of
https://github.com/stashapp/stash.git
synced 2026-06-11 07:41:08 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76648fee66 | ||
|
|
6d07ecf751 | ||
|
|
5283eb8ce3 | ||
|
|
32c48443b5 |
@@ -144,9 +144,9 @@ INSERT INTO `performer_urls`
|
||||
FROM `performers`
|
||||
WHERE `performers`.`instagram` IS NOT NULL AND `performers`.`instagram` != '';
|
||||
|
||||
DROP INDEX `performers_name_disambiguation_unique`;
|
||||
DROP INDEX `performers_name_unique`;
|
||||
DROP TABLE `performers`;
|
||||
DROP INDEX IF EXISTS `performers_name_disambiguation_unique`;
|
||||
DROP INDEX IF EXISTS `performers_name_unique`;
|
||||
DROP TABLE IF EXISTS `performers`;
|
||||
ALTER TABLE `performers_new` rename to `performers`;
|
||||
|
||||
CREATE UNIQUE INDEX `performers_name_disambiguation_unique` on `performers` (`name`, `disambiguation`) WHERE `disambiguation` IS NOT NULL;
|
||||
|
||||
@@ -229,13 +229,13 @@ export function useListSelect<T extends { id: string }>(items: T[]) {
|
||||
function singleSelect(id: string, selected: boolean) {
|
||||
setLastClickedId(id);
|
||||
|
||||
// prevent duplicates
|
||||
if (selected && selectedIds.has(id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
setItemsSelected((prevSelected) => {
|
||||
if (selected) {
|
||||
// prevent duplicates
|
||||
if (prevSelected.some((v) => v.id === id)) {
|
||||
return prevSelected;
|
||||
}
|
||||
|
||||
const item = items.find((i) => i.id === id);
|
||||
if (item) {
|
||||
return [...prevSelected, item];
|
||||
|
||||
@@ -243,7 +243,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
const [fullscreen, setFullscreen] = useState(false);
|
||||
const [showScrubber, setShowScrubber] = useState(false);
|
||||
|
||||
const initialTimestamp = useRef(-1);
|
||||
const started = useRef(false);
|
||||
const auto = useRef(false);
|
||||
const interactiveReady = useRef(false);
|
||||
@@ -457,20 +456,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
if (this.currentTime() >= 0.1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (initialTimestamp.current !== -1) {
|
||||
this.currentTime(initialTimestamp.current);
|
||||
initialTimestamp.current = -1;
|
||||
}
|
||||
}
|
||||
|
||||
function timeupdate(this: VideoJsPlayer) {
|
||||
// fired when seeking
|
||||
// check if we haven't started playing yet
|
||||
// if so, start playing
|
||||
if (!started.current) {
|
||||
this.play();
|
||||
}
|
||||
}
|
||||
|
||||
function playing(this: VideoJsPlayer) {
|
||||
@@ -493,14 +478,12 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
player.on("playing", playing);
|
||||
player.on("loadstart", loadstart);
|
||||
player.on("fullscreenchange", fullscreenchange);
|
||||
player.on("timeupdate", timeupdate);
|
||||
|
||||
return () => {
|
||||
player.off("canplay", canplay);
|
||||
player.off("playing", playing);
|
||||
player.off("loadstart", loadstart);
|
||||
player.off("fullscreenchange", fullscreenchange);
|
||||
player.off("timeupdate", timeupdate);
|
||||
};
|
||||
}, [getPlayer]);
|
||||
|
||||
@@ -675,7 +658,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
startPosition = resumeTime;
|
||||
}
|
||||
|
||||
initialTimestamp.current = startPosition;
|
||||
setTime(startPosition);
|
||||
|
||||
player.load();
|
||||
@@ -683,6 +665,10 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
|
||||
player.ready(() => {
|
||||
player.vttThumbnails().src(scene.paths.vtt ?? null);
|
||||
|
||||
if (startPosition) {
|
||||
player.currentTime(startPosition);
|
||||
}
|
||||
});
|
||||
|
||||
started.current = false;
|
||||
@@ -811,7 +797,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
|
||||
if (started.current) {
|
||||
getPlayer()?.currentTime(seconds);
|
||||
} else {
|
||||
initialTimestamp.current = seconds;
|
||||
setTime(seconds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,8 +196,12 @@ class SourceSelectorPlugin extends videojs.getPlugin("plugin") {
|
||||
console.log(`Trying next source in playlist: '${newSource.label}'`);
|
||||
this.menu.setSelectedSource(newSource);
|
||||
|
||||
const currentTime = player.currentTime();
|
||||
player.src(newSource);
|
||||
player.load();
|
||||
player.one("canplay", () => {
|
||||
player.currentTime(currentTime);
|
||||
});
|
||||
player.play();
|
||||
} else {
|
||||
console.log("No more sources in playlist");
|
||||
|
||||
@@ -154,6 +154,7 @@ export const GridCard: React.FC<ICardProps> = (props: ICardProps) => {
|
||||
if (props.selecting) {
|
||||
props.onSelectedChanged(!props.selected, shiftKey);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* Added option to rescan all files in the Scan task. ([#5254](https://github.com/stashapp/stash/pull/5254))
|
||||
|
||||
### 🎨 Improvements
|
||||
* **[0.27.2]** Scene player now shows the starting position when resume time is set. ([#5379](https://github.com/stashapp/stash/pull/5379))
|
||||
* **[0.27.1]** Live transcode requests are now debounced to spawn fewer `ffmpeg` instances while scrubbing. ([#5340](https://github.com/stashapp/stash/pull/5340))
|
||||
* **[0.27.1]** Blobs location may now be set using environment variable `STASH_BLOBS`. ([#5345](https://github.com/stashapp/stash/pull/5345))
|
||||
* Added button to view sub-studio/sub-tag content on Studio/Tag details pages. ([#5080](https://github.com/stashapp/stash/pull/5080))
|
||||
@@ -31,6 +32,11 @@
|
||||
* Scene Player now allows interacting with the controls before playing video, and errors no longer prevent interacting with the Scene Player. ([#5145](https://github.com/stashapp/stash/pull/5145))
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* **[0.27.2]** Fixed items being selected twice when selecting items in the Grid list. ([#5377](https://github.com/stashapp/stash/pull/5377))
|
||||
* **[0.27.2]** Fixed 62 migration error for some users. ([#5363](https://github.com/stashapp/stash/pull/5363))
|
||||
* **[0.27.2]** Fixed scenes incorrectly autoplaying on queue selection. ([#5379](https://github.com/stashapp/stash/pull/5379))
|
||||
* **[0.27.2]** Videos no longer begin playing when seeking before video has started. ([#5379](https://github.com/stashapp/stash/pull/5379))
|
||||
* **[0.27.2]** Videos will now resume from the correct time when switching sources due to error. ([#5379](https://github.com/stashapp/stash/pull/5379))
|
||||
* **[0.27.1]** Fixed UI infinite loop when sorting by random without a seed in the URL. ([#5319](https://github.com/stashapp/stash/pull/5319))
|
||||
* **[0.27.1]** Fixed dropdowns not displaying correctly in the merge dialogs. ([#5299](https://github.com/stashapp/stash/pull/5299))
|
||||
* **[0.27.1]** For single URLs, link icon now shows the dropdown menu instead of navigating to the URL. ([#5310](https://github.com/stashapp/stash/pull/5310))
|
||||
|
||||
Reference in New Issue
Block a user