YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

Would like to be able to mark or indicate movie as a 'new' or unwatched movie and have a menu created for them #29

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 29 created by Omertron on 2008-06-04T12:23:31.000Z:

What is the expected output? What do you see instead?

On main ( index.html) i'd like to have a 'new release ' or 'unwatched' menu item. It would contain all the movies that i have indicated 'somehow' that i would like to include in this menu.

What version of the product are you using? On what operating system? 1.07 Please provide any additional information below. A couple thoughts on how to 'mark' a movie as 'new'...

  1. create a 'Unwatched' subdir that is scanned by program. user places shortcuts to real movie in there which are scanned .. if shortcut found, add to the 'Unwatched' menu. This would allow you to keep actual movies in whatever directories you want and easily add/remove from menu by creating deleting shortcuts. ( i use this technique with myihome server right now)
  2. plain txt file with movie names listed inside. name of text file indicates menu name. # 1 above would be easier to maintain i think.

This could be extended to allow creation of whatever menu item you would like .. 'wife' 'kids' 'favorites' etc

Omertron commented 9 years ago

Comment #51 originally posted by Omertron on 2010-05-25T22:30:19.000Z:

My coding is poor so I'll just sound this out.

How about a txt file that has the name of all the unwatched movies in it. Yamj will look at this file to create the front end "unwatched" menu. This file can be updated manually and/or by running a script.

THe script will first add any new movie names to the txt file that have been added to your media folder since it was last run. First time this might default to 30 days?? The script could look in the yamj.cmd to find the directories where the movies are stored. It will then show all the movies in the list and ask which ones have been watched (maybe a tickbox list?). Any movies that are then unticked will be removed from the list (Default will be ticked). This should leave a list of unwatched movies.

So this list will then contain movie names potentially that were already there, and/or manually added, and/or added by the script.

The script could then run the yamj command. The frontend will be built as normal but with the aid of the new unwatched txt file.

Omertron commented 9 years ago

Comment #52 originally posted by Omertron on 2010-10-15T20:30:54.000Z:

News??? I would support the idea of the special file inside folder. Similar to .mjbignore feature. You could add a .mjbwatched file to a folder: if the file is empty than all the video files in the folder get the "watched" flag. Otherwise you could specify the file names inside the .mjbwatched file (good for TV series or multi-part video). On the html side you could simply add a "watched icon" to the miniature and/or build special "watched" / "unwatched" filter categories.

Definitely I miss this feature... my jukebox is almost perfect lacking only this fundamental feature... please !!!! We have 83 people starring this issue... it's a must have for many of us !

Omertron commented 9 years ago

Comment #53 originally posted by Omertron on 2010-11-02T12:37:33.000Z:

This request is very interesting and seems to be apreciate for many people, so there must be very dificult the implementation regard the long time wating.

regards

Omertron commented 9 years ago

Comment #54 originally posted by Omertron on 2010-11-04T16:16:53.000Z:

simply put.. yes it is.

Omertron commented 9 years ago

Comment #55 originally posted by Omertron on 2010-11-12T23:26:17.000Z:

I think adding a field to the XML file, as stated, is the route to go.

When PLAYed, execute a CGI script that updates xml tag to 'true'.

If it's not finished, then the user would have to manually go into the file, and mark 'false' for the time being.

Until someone, or we, create a link on the detail template that each file can have a 'Mark Watched' link. Would be easier for movies than for TV series, as they have a different detail file--but this may be overcome.

Omertron commented 9 years ago

Comment #56 originally posted by Omertron on 2010-11-23T05:15:51.000Z:

It's been awhile since I've looked into it, but from what I remember you can't run a cgi file on the pch without a hdd installed. One of Omertron's requirements is that the solution work on all setups and not just some.

Omertron commented 9 years ago

Comment #57 originally posted by Omertron on 2010-11-23T08:27:55.000Z:

A user in the forum suggested that we use the watched tag in the NFO to create a hard watched/unwatched flag in the XML file. The skin could then use this to display an overlay on the thumbnail.

I'm not sure that I want to add another flag to the thumbnail file itself because that would prevent the (future) dynamic nature of the watched/unwatched feature.

In addition to the NFO option, we could also add a search for a "< filename >.watched" file and trigger the watched/unwatched flag that way

Omertron commented 9 years ago

Comment #58 originally posted by Omertron on 2010-11-23T13:49:14.000Z:

+1 for me

I would definitely prefer a solution today (even if hard coded / static) instead of a dynamic solution in the future.

Currently I bypassed the issue building two separate jukeboxes: one for all media and one for unwatched media. (media is stored only once, I used symbolic links to make two folder trees). It works but it's difficult to manage.

Omertron commented 9 years ago

Comment #59 originally posted by Omertron on 2010-11-23T14:33:10.000Z:

Yeah I actually gave up on moviejukebox because of this and stated to write my own jukebox in php with sqlite backend.

I'm not sure what the developers are concentrating on but I would have thought this should be high priority.

Omertron commented 9 years ago

Comment #60 originally posted by Omertron on 2010-11-23T14:43:32.000Z:

Well, you're welcome on the project if you want to make your developpement for this feature part of moviejukebox instead of doing YetAnotherMovieJukebox ;)

Don't worry, we didn't forgot you guys, we just need to find a way to handle that which will be compatible and easly manageable for everyone.

Omertron commented 9 years ago

Comment #61 originally posted by Omertron on 2010-11-23T14:59:32.000Z:

This definetly should be a high priority! If two and a half year were not enough to find an universal solution then maybe it is time to make some compromises. I think we would be happy with any rough solution.

Omertron commented 9 years ago

Comment #62 originally posted by Omertron on 2010-11-23T15:11:19.000Z:

Actually Stuart, .unwatched would probably be more useful. YAMJ could create these files whenever it detects a new movie and then we could then manually delete each one once watched (or the php/hdd bods could script it). And my reasoning for deleting a file rather than create a file is that it's more user (read wife/kid) friendly.

Would also be good if the location of these files could be overridden in the properties so they could all be placed together in the same folder so the 'users' can easier find them.

Omertron commented 9 years ago

Comment #63 originally posted by Omertron on 2010-11-23T15:50:38.000Z:

It doesn't matter if its ".watched" or ".unwatched" we could just detect it and act accordingly.

@mugnaini: That's what I have today, however I use libraries to merge the two directories together, and then just move the watched files to the "archive" jukebox folders (which is just a mirror of the unwatched).

@Caasaudio: I've recently added some support for SQLite. At the moment it's fairly simplistic and just dumps the movie list to a db file, but the framework is there.

I'll "fix" this as my next priority.

Omertron commented 9 years ago

Comment #64 originally posted by Omertron on 2010-11-23T16:10:18.000Z:

@Stuart: I've used the "libraries solution" for a long time, it has some drawbacks (impossible to see Drama+Unwatched or 2010+Unwatched; not able to use with TV Series).

With the "symbolic links solution" now I have an unwatched jukebox for day-to-day use (genre filtering, year filtering, only unwatched tv series episodes) and a full jukebox with all the media collection (mainly used to impress friends ;)

Omertron commented 9 years ago

Comment #65 originally posted by Omertron on 2010-11-23T20:07:17.000Z:

It's too bad we couldn't somehow use the .jsp playlist files for TV shows

ER 3|0|0|file:///opt/sybhttpd/localhost.drives/HARD_DISK/PCH-C200/ER/Season%2001/ER%20S01E03%20-%20Day%20One.mkv|

I wonder if adding anything after the last | slash would be ignored by NMT and simply seen as comment, therefore YAMJ could add 'watched|' to the end of the line. The problem is that one episode is added to many .jsp files in the folder.

Right now is a good time to revisit this with the upcoming NTFS r+w being added to the A100/A110 series firmware (in beta now for A100). Now YAMJ could simply assume that each movie/TV-episode location is in a writable folder for YAMJ to update. Next time YAMJ runs, it can check for updated files (.watched) in each folder.

Personally for now, I would only like to see one .watched per movie folder and one per TV season. Movies could be one/many per folder.

Omertron commented 9 years ago

Comment #66 originally posted by Omertron on 2010-11-23T20:48:03.000Z:

I don't know what you mean with the JSP files? How would adding something to a playlist help with the watched/unwatched?

YAMJ isn't going to write anything to the folder, the skin may do this (or a third party program can do this), but not YAMJ per-se.

Initially I'll just do a watched/unwatched file on a per-filename basis.

The problem with this approach is that this is an all or nothing approach for TV show seasons at the moment. You've either watched them all or you haven't. I think I know how to do it for individual files, but it'll take some more work and will mean that it's harder for a skin to determine if there's an unwatched file within the movie/tvshow

Omertron commented 9 years ago

Comment #67 originally posted by Omertron on 2010-11-23T22:26:27.000Z:

r1971 Updates issue 29 Added a simple watched/unwatched flag to the XML. This is on a movie/TV season level at the moment, but it will be further extended shortly. This needs skin support before it's truly useful, so you'll have to bug your favourite skin authors for support.

Omertron commented 9 years ago

Comment #68 originally posted by Omertron on 2010-11-24T11:19:56.000Z:

Why not use the TVrage history field, I always keep mine up-to-date. I suspect one would have to log on and retrieve via the api..

I bet some one clever out there can do this.

regards

Omertron commented 9 years ago

Comment #69 originally posted by Omertron on 2010-11-24T14:35:19.000Z:

This issue was updated by revision r1974.

Added ".watched" and ".unwatched" filename support. Please see the Watched wiki page

Omertron commented 9 years ago

Comment #70 originally posted by Omertron on 2011-01-01T19:43:14.000Z:

Not the best solution but i guess we have to live with it :) Just a question because i didn't manage to make it to work. Does the .watched file need to be an exact copy of the video file? Or a dummy file will work as well?

Omertron commented 9 years ago

Comment #71 originally posted by Omertron on 2011-01-05T16:35:11.000Z:

As stated in the Wiki Watched pagehttp://code.google.com/p/moviejukebox/wiki/Watched, there only needs to be the existence of a file (0 bytes) -- like creating an empty txt file with no contents.

Omertron commented 9 years ago

Comment #72 originally posted by Omertron on 2011-01-15T19:34:31.000Z:

Do you know any skin where i can see this unwatched category?

Omertron commented 9 years ago

Comment #73 originally posted by Omertron on 2011-01-19T08:55:58.000Z:

actual a tv shows season is only marked as watched if all episodes are "watched". If this a tag "watchedDate" is written in the xml for every filepart/episode. If not all episodes are watched i missed the "watchedDate" tag in the xml. Why not use it to mark single episodes as watched? Can you please enhance the code for this.

gt

Omertron commented 9 years ago

Comment #74 originally posted by Omertron on 2011-01-19T08:58:06.000Z:

hmm forget a second request. Want to see a single index for watched or unwatched movies like "NEW TV" or "NEW MOVIE".

thanks again

gt

Omertron commented 9 years ago

Comment #75 originally posted by Omertron on 2011-01-19T14:06:34.000Z:

What if the html page when you click the watch button writes to a txt files that contains all the filenames of the watched elements, something like this:

“10th and Wolf (2007).mp4” “Ace Ventura, Pet Detective (1994).mkv” “All Good Things (2010).mkv” …

Then when you run yamj, the movies in this file will be marked as watched. Is this possible?

Omertron commented 9 years ago

Comment #76 originally posted by Omertron on 2011-01-19T14:20:30.000Z:

There is no ability of the stock PCH browser to write to a file

Omertron commented 9 years ago

Comment #77 originally posted by Omertron on 2011-01-19T14:39:30.000Z:

Okay, if it’s not possible to write to a file from html, is it maybe possible to make a php version of yamj? (example php=true in the confige file). So all your yamj-files are stored on a web-server running php, and then I guess it would be easier to make yamj dynamic, right? I guess most people don’t use a server for storing there media files and yamj, but those of us that do, this would be great. :)

I got very little experience in programing and web-scripting, so excuse me if I’m totally wrong...

Omertron commented 9 years ago

Comment #78 originally posted by Omertron on 2011-01-19T14:42:47.000Z:

The gaya webbrowser is not capable of running php without an additional component (so not standard on all PCHs)

Making a user install a HDD and install the NMT apps before adding and configuring an alternative webserver is a little cumbersome

Omertron commented 9 years ago

Comment #79 originally posted by Omertron on 2011-01-19T14:59:02.000Z:

I think having it available would make a lot of people installing a disk into the PCH immediately an option. There are also sata to usb adapters so no problem installing an usb stick either and seing it straigt as a HDD.

Omertron commented 9 years ago

Comment #80 originally posted by Omertron on 2011-01-19T15:24:13.000Z:

Is it possible to make yamj read from a txt file with the folder name of the movie,(one folder per line) like this:

10th and Wolf (2007) Ace Ventura, Pet Detective (1994) All Good Things (2010) ...

And then mark the movie inside the folder as watched? Because then I can just make a bat file that write down the folder names to a file, and delete the movies I haven’t seen from the file. So if you see a new movie you just add the folder name to the text file, and when yamj reruns it will be flagged as watched. This seems lot easier than making a file for every movie, especially when you got a lot of movies...

Omertron commented 9 years ago

Comment #81 originally posted by Omertron on 2011-03-23T13:07:46.000Z:

Just a quick update on this issue.

We're looking into getting a script working that will allow you to create the watched file for each movie from the skin.

You'll still need to update YAMJ to get it into the indexes, etc, but it's getting towards a proper solution.

r2237 also adds a category for watched/unwatched to make things a little more useful

Omertron commented 9 years ago

Comment #82 originally posted by Omertron on 2011-03-23T17:42:52.000Z:

I've had it working for a few years now, but have no time to pack everything up in to a nice and easy installable package. But here are my watch.php and unwatch.php scripts. They are very simple and could need a little work to make them fool proof, but they work for me and I never needed to do it.

My PLAY links look like this: http://192.168.0.72:9999/Jukebox/watch.php?base=Annie+Hall&file=file%3A%2F%2F%2Fopt%2Fsybhttpd%2Flocalhost.drives%2FNETWORK_SHARE%2FTimeCapsule%2FMovies%2FAnnie%2520Hall%2FAnnie%2520Hall.avi

Here's what my watch.php looks like that creates an empty file (name of the movie file + ".wtch") in a "wtch" dir.

<?php //include("functions.inc.php");

$file = urldecode($_GET["file"]); $playlist = urldecode($_GET["pl"]); $basefile = urldecode($_GET["base"]); $zcd = $_GET["zcd"]; $ep = $_GET["ep"]; $redir = $_GET["redir"];

if (!file_exists("wtch/".$basefile.".wtch")) { $fp = fopen("wtch/".$basefile.".wtch", "a+"); fclose($fp); }

if ($redir == 1) { ?>

" />

<?php

} else {

?>

Play Movie PLAY'; } else { print 'PLAY'; } } elseif ($playlist) { print 'PLAY'; } elseif ($ep) { print 'PLAY'; } ?>

<?php } ?>

My unwatch.php looks like this

<?php $basefile = urldecode($_GET["base"]);

if (file_exists("wtch/".$basefile.".wtch")) { unlink("wtch/".$basefile.".wtch"); } ?>

" />

I have 5 PHP files that creates a dynamic YAMJ with Aeon skin.

list.php - generates the movie and series listings. If a wtch file exist on a movie, it is not shown detail.php - movie detail page tvdetail.php - series detail page. If a wtch file exist for an episode, a check mark is shown in front the episode. The "cursor" goes automatically to fir not watched episode watch/unwatch.php - creates the wtch file that keeps track of what is watched and not

Omertron commented 9 years ago

Comment #83 originally posted by Omertron on 2011-03-25T02:48:40.000Z:

Howdy,

The attached zip is a working demo, see the README.TXT file, hopefully it makes sense, not verified all of it.

Basically it works on the filename.watched file idea. This is DYNAMIC, yamj does not need to check any files during a re-run. The code of course must become part of the generated html pages. Some info...

1) This is a shell script CGI. PHP could have been used, but this avoids the apps install issue. Of course some Javascript. 2) All watched files should be placed in a single R/W location, avoids read-only mounts etc. 3) The script handles, create/delete/exists. 4) You toggle the watched status with a button.

This code is part of my development. I am using a method of dynamic data loading with NMT Gaya. You are seeing a form of AJAX :).

I hope this is useful, tested on 2 x PCH C200 local and network drives.

Cheers NearZero (Steve007)

Omertron commented 9 years ago

Comment #84 originally posted by Omertron on 2011-03-25T10:05:05.000Z:

This looks cool. Is it possible to make it work for two or more users? Like if the watch files from each user i stored in its own folder. Example if you got a tab in yamj that has a list of users user1, user2 etc... and then you click on one of them the folder location is changed to that user. And maybe a button where you can select multiply users. In this case the watched/unwatched system works whit more than one user.

I don't know if its possible, but it would be nice if it was. :)

Omertron commented 9 years ago

Comment #85 originally posted by Omertron on 2011-03-25T10:08:32.000Z:

This looks cool. Is it possible to make it work for two or more users? Like if the watch files from each user i stored in its own folder. Example if you got a tab in yamj that has a list of users user1, user2 etc... and then you click on one of them the folder location is changed to that user. And maybe a button where you can select multiply users(if it finds a watch file in both locations its market as watched, and when you watch a movie it write to two (or more) locations). In this case the watched/unwatched system works whit more than one user.

I don't know if its possible, but it would be nice if it was. :)

Omertron commented 9 years ago

Comment #86 originally posted by Omertron on 2011-03-25T11:40:54.000Z:

@Erik. No not possible with the current model.

Omertron commented 9 years ago

Comment #87 originally posted by Omertron on 2011-04-04T00:42:01.000Z:

Update attached. Allow watched to be implemented in default skin.

The code should be considered BETA, works for me :).

Cheers NearZero (Steve007)

Omertron commented 9 years ago

Comment #88 originally posted by Omertron on 2011-04-04T03:24:31.000Z:

Haven't tested it yet, but looks nice and simple Steve007. Thanks for your efforts!

Omertron commented 9 years ago

Comment #89 originally posted by Omertron on 2011-05-12T09:21:32.000Z:

Seems I posted the wrong zip, apologies all.

Cheers Steve

Omertron commented 9 years ago

Comment #90 originally posted by Omertron on 2011-05-12T10:38:04.000Z:

Looks great! But do anyone got it to work with "All-in-One Package SabishGT skin" (http://www.gt-projects.net/news.php)? I have tried to modify the detail.xsl but since im not a java geek i cant get it to work.

Omertron commented 9 years ago

Comment #91 originally posted by Omertron on 2011-05-12T10:40:55.000Z:

Hopefully excal will get it working with the default skin, then it can be "adapted" for use with other skins.

We need to do some work to ensure that it works on all environments and configurations (or at least as many was we can manage)

Omertron commented 9 years ago

Comment #92 originally posted by Omertron on 2011-05-13T19:02:37.000Z:

This is a working version of the watched script and detail.xsl file.

The path for the watched directory and location of the watched.cgi file needs to be set in the preferences.xsl file under the name mjb.watchedLocation

Omertron commented 9 years ago

Comment #93 originally posted by Omertron on 2011-05-16T08:39:10.000Z:

Issue 1893 has been merged into this issue.

Omertron commented 9 years ago

Comment #94 originally posted by Omertron on 2011-06-28T08:24:52.000Z:

The attached zip is to simplify the process of setting permissions on the watched.cgi file when installed on the PCH local disk. In such setups telnet or FTP must be used, this script can be run from a USB stick and handles the process easily.

Test away.

Cheers Steve

Omertron commented 9 years ago

Comment #95 originally posted by Omertron on 2011-07-17T19:55:42.000Z:

This issue was closed by revision r2605.

Omertron commented 9 years ago

Comment #96 originally posted by Omertron on 2011-07-17T19:57:11.000Z:

This has been committed to the default skin

Omertron commented 9 years ago

Comment #97 originally posted by Omertron on 2012-12-14T08:35:13.000Z:

<empty>