Jump to content
connorconway

Modify Latest Media

Recommended Posts

connorconway

There are a couple of questions here and if anyone could help me here that would be great and I'd really appreciate it; I believe this will also require a .js change but I'm just wondering which file would need editing as there are so many (I'm aware the changes will be removed per each update).

 

How would I go about changing 'Latest Media' on the Home page to different sections like,

 

- Latest Movies

[movie 1] [movie 2] [movie 3]

 

- Latest TV Shows

[tv show 1] [xxx] [yyy]

 

- Latest Music

[xxx] [yyy] [zzz]

It would also be nice to be able to split these into different sub-categories like 'Latest horror movies' if possible.

 

When a TV show is clicked from the "Latest Media" section it brings up a pop-up where you can "play", "open" or "sync".

 

Is there a way to make the default action when you click any TV show to go to the "Open" view of that TV show (But the home page for that TV show where you can then select the season and episode you want to watch. i.e. TV show name -> season -> episode

 

Is there a way to remove the "Channels" tile from the Home page? I currently have "Movies", "music", "tv" and "channels", but do not want channels to be shown for everyone.

 

Thank you for ANY assistance at all,

Connor

Edited by connorconway

Share this post


Link to post
Share on other sites
Luke

Yes this is all javascript, but there is no facility in the server to modify this. You're going to need to be familiar with the web client source code in order to accomplish this.

Share this post


Link to post
Share on other sites
connorconway

Thank you for your response Luke!

I have modified the .json and added in headings for "Latest Movies", etc.

I'm assuming these sections are populated in sections.js and am trying to do something like below (items.movies) but obviously it is causing an error. Is there a simple way of getting all the movie elements (for example) out of the list of all items?

return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {

            var html = '';

            var cardLayout = false;

            if (items.length) {
                html += '<div>';
                html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestMovies') + '</h1>';

                html += '</div>';

                html += '<div class="itemsContainer">';

                html += LibraryBrowser.getPosterViewHtml({
                    items: items.movies,
                    preferThumb: true,
                    shape: 'backdrop',
                    showUnplayedIndicator: false,
                    showChildCountIndicator: true,
                    lazy: true,
                    cardLayout: cardLayout,
                    showTitle: cardLayout,
                    showYear: cardLayout,
                    showDetailsMenu: true,
                    context: 'home'
                });
                html += '</div>';
            }

            elem.innerHTML = html;
            ImageLoader.lazyChildren(elem);

            $(elem).createCardMenus();
        });
    }

Sorry if this shouldn't really be asked,

Connor

Edited by connorconway

Share this post


Link to post
Share on other sites
dimmthewitted

Conner,

 

Please give us an update.

 

Do your javascript modifications get overwritten with Emby updates?

 

I'm thinking of modifying the latest channels myself because they suck so much and I want to customize them.

Share this post


Link to post
Share on other sites
Happy2Play

Conner,

 

Please give us an update.

 

Do your javascript modifications get overwritten with Emby updates?

 

I'm thinking of modifying the latest channels myself because they suck so much and I want to customize them.

 

Any thing modified in the system folder will get overwritten with every server update.  The entire system folder gets replaced with every update.

Share this post


Link to post
Share on other sites
dimmthewitted

Good to know that i will need to create a task to routinely update my modifications.

 

It would be great if someone could point us in the right direction of what json file his excerpt is out of.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...